You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cryptol currently support qualified imports to avoid function name clashes.
For example, consider AES S-Box and T-Box specifications whose top-level encryption and decryption functions are named aesEncrypt and aesDecrypt, respectively.
When trying to prove equivalences of their specification, one can currently use Cryptol qualified imports as follows:
// import aesEncrypt and aesDecrypt in AES as qualified names AESSBox::aesEncrypt and AESSBox::aesDecrypt
import AES as AESSBox(aesEncrypt, aesDecrypt)
// import aesEncrypt and aesDecrypt in AESTBox as qualified names AESTBox::aesEncrypt and AESTBox::aesDecrypt
import AESTBox as AESTBox(aesEncrypt, aesDecrypt)
Another approach that would be nice to have is renaming the imported functions, as follows:
// import function aesEncrypt and aesDecrypt in AES as top-level functions sboxEncrypt and sboxDecrypt
import AES(aesEncrypt => sboxEncrypt, aesDecrypt => sboxDecrypt)
// import function aesEncrypt and aesDecrypt in AESTBox as top-level functions tboxEncrypt and tboxDecrypt
import AESTBox(aesEncrypt => tboxEncrypt, aesDecrypt => tboxDecrypt)
This way, one can use unqualified names to refer to the functions, which would be especially useful for long module names.
The text was updated successfully, but these errors were encountered:
Cryptol currently support qualified imports to avoid function name clashes.
For example, consider AES S-Box and T-Box specifications whose top-level encryption and decryption functions are named
aesEncrypt
andaesDecrypt
, respectively.When trying to prove equivalences of their specification, one can currently use Cryptol qualified imports as follows:
Another approach that would be nice to have is renaming the imported functions, as follows:
This way, one can use unqualified names to refer to the functions, which would be especially useful for long module names.
The text was updated successfully, but these errors were encountered: