![]() |
|||||||||||||||||||||||||||||||
|
Q3, 2006
An Open IP Encryption Flow is Essential to the Future of the Semiconductor Industry
FPGA-Based Solutions for Video and Image Processing Verilog 2001
Coding Style to Infer LatticeECP2 sysDSP Blocks Synplicity Open IP Protection Methodology in Riviera
Efficient Development of Wireless IP with High Level Modeling and Synthesis |
Synplicity Open IP Protection Methodology in RivieraBy Jaroslaw Kaczynski, Research Engineer, ALDEC, Inc. Introduction Lack of industry-wide standard for IP (Intellectual Property) encryption and decryption was affecting both IP vendors and their customers for long period of time. While easy to use, unencrypted IP cores were prohibitively expensive for some customers, availability of cheaper (but encrypted) versions working with customer tools was spotty. Maintaining multiple IP core versions for multiple tools was also cumbersome for IP vendors. Fortunately for IP users, IP vendors and tool vendors the situation is going to change. New Solution ALDEC, Inc. in cooperation with Synplicity®, Inc., introduces a new methodology of handling IP protection in simulation and synthesis, compatible with the recently published Verilog standard IEEE Std 1364-2005 and forthcoming VHDL 2006 standard. This new methodology enables easy encryption of IP cores for secure delivery from the IP vendor to the customer. The encryption and decryption involves no action on the side of the customer – all required activities concern IP vendor and tool vendors only. Customers can open delivered IP source but will only see unintelligible, encrypted and encoded text. The compiler of a compatible tool will be able to decrypt the source on-the-fly, leaving no traces that could compromise the security of encryption. Availability Coordinated encryption->simulation->synthesis flow is available starting with Riviera release 2006.06 and the Synplify/Synplify Pro software release 8.6.1. Cryptography Fundamentals Key Terms Cryptography is a discipline of mathematics and computer science dealing with information security and related issues, particularly encryption and authentication. While applied to IP security, cryptology teaches how to turn open source of the IP (plaintext) into secure IP (ciphertext) readable only by authorized tools. This process is called encryption and uses various algorithms called ciphers. The reverse process, recreating original plaintext from the ciphertext, is called decryption. Treated together, encryption, message delivery and decryption create cryptosystem. Symetric Ciphers One group of encryption algorithms, called symmetric key algorithms, uses one secret key that allows both encryption and decryption of the text. Security of the cryptosystem based on symmetric key ciphers depends on the length of the key used and the particular algorithms utilized during encryption/decryption. The popular ciphers belonging to this group are DES, 3DES and AES; they are all characterized by high speed and low implementation cost of encryption and decryption. Although they can be broken, the cost to do so is of the hundreds of thousands of dollars magnitude, making them secure for IP applications. Asymmetric Ciphers The other group of algorithms is called asymmetric key algorithms and uses two keys: public key and public key. Intended recipient of the information generates both keys on his site, keeping the private key secret, and publishing the public key to all possible senders of information. The most popular cipher from this group is called RSA and uses very large prime numbers for key generation. It is considered highly secure, but its implementation is slow and expensive, especially for encryption of longer texts. Hybrid Cryptosystems To utilize high security of asymmetric algorithms and low cost of symmetric algorithms in one solution, the following mixed or hybrid cryptosystem can be used:
The hybrid cryptosystem with carefully selected algorithms (e.g. AES for message encryption and RSA for secret key encryption) is very secure and easy to implement at the same time, making it perfect choice for IP delivery. New Methodology Usage Coordinated encryption->simulation->synthesis flow supported by Riviera and Synplify uses hybrid cryptosystem described above. Encryption with Perl Script To encrypt the source, creator of the code can use the ‘protectip’ Perl script delivered with the tool installation. Linux/Unix users should have Perl interpreter and OpenSSL (open source encryption/decryption toolkit) component already installed with their operating system. MS Windows users should download and install OpenSSL binaries (from http://gnuwin32.sourceforge.net/packages/openssl.htm and some publicly available Perl distribution, such as ActivePerl (from http://www.activestate.com/Products/ActivePerl/). Here are the most important switches supported by the script:
Table 1: Parameters of the 'protectip' script To learn the scope and meaning of all switches supported by the script, it should be run without any parameters. Cipher and key selection are the most critical options: Selecting “des-cbc” cipher provides fastest, but least secure encryption and requires specification of either 8-character text key or 64-bit hexadecimal key (16 hex digits). Please note that DES algorithm uses only 7 bits out of each byte of the key, so the effective key length is 56 bits. Selecting “3des-cbc” provides significantly more secure, but slower encryption. TripleDES algorithm uses plain DES algorithm 3 times with different keys, so you have to specify either 24-character text key or 192-bit hexadecimal key (48 hex digits). Selecting “aes128-cbc” provides the most secure, and still fast encryption, requiring either 16-character text key or 128-bit hexadecimal key (32 hex digits). For most IP cores, selecting “aes128-cbc” seems to be the best choice; only some special factors may justify the use of other supported algorithms. Quick tests conducted on Intel machine with 2 GHz clock show that encrypting 1 megabyte source file using ‘protectip’ script and any of the supported ciphers takes less than 2 seconds. Times required for decryption may differ, since special measures are taken to ensure that no critical information is compromised during the process. To encrypt file memory.v using AES cipher with MY_AES_SAMPLEKEY text key and store the result in memory_ip.v file, the following command line can be used: protectip -in memory.v -out memory_ip.v -c aes128-cbc -k MY_AES_SAMPLEKEY -om persistent_key -v (On MS Windows platform renaming the script to protectip.pl may be required for correct execution; first item in the command line should be modified appropriately in this case.) A sample encrypted file created by the previously listed command line is shown below: %%% protect protected_file Encrypted IP Delivery After compilation of the encrypted file in the Riviera environment, only the name of the encrypted module is visible (names of ports are not displayed). To facilitate easy instantiation of the encrypted module, IP core vendors are advised to add an unencrypted wrapper module instantiating the protected module. The text of the wrapper can be placed between the obligatory first line with “%%% protect protected_file” pragma and the line with “%%% protect begin_protected” pragma, as shown below: %%% protect protected_file Conclusion The new methodology described in this document should quickly gain popularity among other tool vendors, providing unified, easy to use but secure way of IP protection handling in FPGA and ASIC design flow. Reference: |
||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||