EAR (Export Administration Regulations)
The US rulebook for exporting dual-use goods, technology and software – the thing that decides who may download your crypto code.
The EAR is administered by the Bureau of Industry and Security at the Department of Commerce. Every item gets an ECCN on the Commerce Control List; encryption software typically lands in 5D002. Until 1996, cryptography sat under ITAR, the arms export rules, which is what the whole Crypto Wars were fought over. Moving it to the EAR was where the thaw began.
Open source gets License Exception TSU: publicly available code may be exported freely. For years that required emailing BIS and the NSA the project's URL – a ritual thousands of projects dutifully performed. The requirement was dropped in 2021 for standard cryptography. The EAR also houses the Entity List, which in 2019 made Google stop supplying Play services to Huawei. Software law is occasionally foreign policy by other means.