Freedom of Cryptography¶
Today I learned that if you could travel back to the early 1990s with the contents of this git repository, you would have had to become a licensed arms dealer 😮 —the govt certainly would have denied you an export license— before you could post the source code (or any work that featured the source code) on the internet.
Publicly sharing the following code snippet would have landed you in prison for arms trafficking because export of cryptography from the United States was regulated at the same level as missiles, tanks, etc…😮.
In : from cryptography.fernet import Fernet In : key = Fernet.generate_key() In : f = Fernet(key) In : plain_text = b'Hello Alice' In : cipher_text = f.encrypt(plain_text) In : cipher_text Out: b'gAAAAABgMjSru96WoOLHq3ygBw93ZICzyu5aKjYQqw0MQ7G44Ch77-xqCVNmYSbB4j6Kz_Ipol3hyPWx5Ti5rui1SdRc_D7LfA==' In : f.decrypt(cipher_text) Out: b'Hello Alice'
Resources with more deailed history of the legal battles for freedom of cryptography: