Reference Example for Encrypting LabVIEW FPGA IP
Overview
This code shows an example of how to create and use an encryption scheme for protecting FPGA IP from being distributed to any other hardware except what was intended by the original distributor.
Downloads
Filename: encryptfpgabitfile.zip
Requirements: View
This code is intended to be an example of how to encrypt your FPGA bitfile so that it only runs with your original software and only with your original hardware.
This example includes three VIs. The first VI is Create Encryption INI File. The VI needs to be ran first and with the original hardware. It generates a encrypted .ini file to be distributed with your system. The encryption used is the Tiny Encryption Algorithm (TEA). This method requires a Key(Hex) to be set by the user. We use the original serial number in our Key to make the encrypted result hardware specific. This Key is then used through out all the remaining VIs. The second VI is the Decrypt File which shows how to decrypt the .ini file previously created and checks the validity of the result. If the .ini file, Key(Hex) or hardware serial number isn't correct, it will stop the VI. If everything is correct, it will pass a newly generated pair of encrypted random numbers to the FPGA along with the expected results and the original serial number for the Key. The third VI is the FPGA VI called Main. It decrypts the data sent down to it using the Key and compares it to the expected result. Based on the result, you can either run your code or stop the FPGA VI. For more information, please review the block diagrams of the code.
This example requires the CompactRIO Information (CRI) Component and is based off of A Design Pattern for Adding Licensing to a LabVIEW Real-Time Application and the Tiny Encryption Algorithm (TEA) for LabVIEW FPGA.
**The accompanying code represents a very specific use case for NI products. For more general examples, please refer to ni.com/examples, the LabVIEW Example Finder, or the NI driver help files that come with every NI driver.
Requirements
Filename: encryptfpgabitfile.zip
Software Requirements
Application Software: LabVIEW Professional Development System 8.6
Toolkits and Add-Ons: LabVIEW FPGA Module 8.6
Language(s): LabVIEW
Hardware Requirements
Hardware Group: CompactRIO, Reconfigurable I/O (RIO)
Driver: NI-RIO 3.0
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
