In this blog, we will
go through the encryption mechanism in verilog and systemverilog using
Questa-Sim. The protection expressions “`pragma protect” for
Verilog/SystemVerilog specify the encryption algorithm used to protect the
source code.
For protecting the code, first you need to
identify the portion of code which you need to encrypt and then use the
“`pragma protect” directive in your code followed by compiling your code with “+protect”
argument.
Example:
vlog +protect file.v or vlog +protect file.sv
By executing above code, it creates
“file.vp”/”file.svp” in the “work” library which is a protected version of file
and protected code will be encrypted. This file can be delivered to the end customer.
Here, you can give the file name during
compilation option also.
Example:
vlog file.v +protect=protected_file.vp
After executing above code, it creates
“protected_file.vp” which is a protected version of “file.v”.
If specific pragma keyword is not specified
then tool will use its default value.
Below are some examples and usages of syntax
for encryption:
Figure 1 |
Figure 2 |
Here, encryption envelope which is encrypted
using session key and recorded in decryption enveloped as data_block. A copy of
session key is encrypted and recorded in key_block.
Below is the example to overwrite data_keyname
and data_method to create decryption envelope from the encryption envelope.
Figure 3 |
Figure 4 |
Below is the example to
overwrite key_keyname and key_method to create key_block for encryption of
session key.
Figure 5 |
Figure 6 |
Same thing can be applied in the verilog code
to encrypt any logic.
Reference:
(1) IEEE Standard for SystemVerilog— Unified Hardware Design, Specification, and Verification Language,IEEE Std 1800™-2012
(2) Questa SIM User’s Manual, v10.3a
Latest version of HDL encryption tools are available at https://ipencrypter.com
ReplyDeleteFrom IP Encrypter
IP author can use ipecrypt to encrypt HDL IPs (Verilog or VHDL files).
The ipencrypter is a suite that provides tools and modules for encryption, decryption, rights management and licensing for electronic design intellectual property (IP) conforming to IEEE Std 1735™-2014 standard (IEEE P1735 v2). ipencypter supports SystemVerilog and VHDL languages.
good posts
ReplyDeleterecommed file encryption software to encrypt some files on cnet
I was surfing net and luckily ran over this site and discovered extremely fascinating stuff here. Its truly amusing to peruse. I delighted in a ton. Much obliged for sharing this great data
ReplyDeleteencryption
great
ReplyDelete