• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. encryption question

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 142
  • Views 16923
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

encryption question

mctang
mctang over 9 years ago

Hi  All,

1. I type the following command in CIW

     encrypt( "abc.il" , "abc_enc.il")

    Could anther user convert abc_enc.il to ASCII file ?

2.  I type the following command in CIW

     encrypt( "abc.il" , "abc_enc.il", "pass" )

    Could anther user convert abc_enc.il to ASCII skill file if the user has the password ?

Thanks,

ManChak

  • Cancel
  • skillUser
    skillUser over 9 years ago

    Hi ManChak,

    1) potentially, simply loading the abc_enc.il file will decrypt it in virtual memory, with a SKILL debug key it could be pretty printed and/or written out. By default the function is read-protected.  Also you can set the function to be read and write protected by putting it in a context instead; this is your safest bet.

    2) essentially the same as 1) - you need to provide the password to read the file, I believe, and then you're in the same position as in 1).

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mctang
    mctang over 9 years ago
    Hi Lawrence,
    1. Thank you for your info. Could you point me to the document to generate context file ? Foundry pdk uses context file, but I do not know how to generate it.

    2. Regarding item 2, does the user need password to run my skill code ? Or the password is just used to convert abc_enc.il into ASCII file.

    Thanks,
    ManChak
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 9 years ago
    Hi ManChak,

    1. Look for "setContext" and "saveContext" in the documentation. I'm not going to search for you, you can type "context" in the Search box in a design window, or even in the cdnshelp tool, or perhaps in the Cadence Online Support site. The docs include a short example that explains the basic flow:

    ;; to create a context named "current" and saved as "myContext.cxt" (I'd be more consistent with the name):
    setContext( "current")
    load("mySkillCode.il")
    defInitProc("current" 'myInit) ;; this is entirely optional
    saveContext("myContext.cxt")

    2. The password is needed to read/load the code but after that it can be run without needing a password. I personally wouldn't bother with this method, I think I'd use a context file.

    Best regards,
    Lawrence.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    To answer the original questions, a non-password encrypted file is pretty easy to see the source; I won't go into the details here - but you should simply class this as a minor deterrent against somebody being able to mess with the code, rather than any protection.

    If you provide a password when encrypting the file, then the method typically used to see the source no longer works. You do need to provide the password when loading the file (second argument to the load() function), and as with all encryption, the code is read protected (you cannot use the pp() function). I wouldn't say the encryption is "strong" but I'm not sure I'm aware of anyone who has gone to the lengths to figure out how to crack the encryption.

    As Lawrence said, generally a context file offers the best protection as you're essentially providing the compiled virtual machine code. Provided you remember to set writeProtect before you create the context, the code won't be pp-able.

    I tend to use password-encryption for small fixes that need protecting, and context files for bigger chunks of code.

    Kind Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mctang
    mctang over 9 years ago

    Hi Andrew and Lawrence,

    Thank you for your info.

    ManChak

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information