Skip to main content

Use arrow keys to navigate, Enter to select, Escape to close menu.

Is Encryption Legal?

Using encryption is permitted in many jurisdictions, and no serious legal system treats mathematics itself as contraband. The friction sits elsewhere: export and import controls, employer policies, escrow demands, litigation holds and record-retention duties. This page explains those boundaries. It is informational only and is not legal advice.

What the law actually regulates

Three levers, applied differently

Governments rarely prohibit the act of encrypting a file. They regulate where software may travel, who must hand over plaintext, and how long records must remain readable. Those three levers do most of the work, and they apply differently in each jurisdiction.

Practical effect: an individual encrypting a personal document faces one situation. A company shipping products across borders, or a firm answering a court order, faces another.

Try it: name the lever that applies to you before the law.

  • Export and import rules target software and hardware movement, not arithmetic.
  • Disclosure duties can compel you to produce readable records that you control.
  • Sector rules for finance, health and tax may demand access to specific records for years.

Export controls and import restrictions

The honest answer is: it depends

The Wassenaar Arrangement coordinates export controls on dual-use goods among dozens of participating states, and cryptographic products appear on those control lists with carve-outs for mass-market and publicly available software. Similar regional regimes exist, so the honest answer is: it depends on applicable law. A lawyer should check it before you ship.

Some countries also restrict imports or require registration of cryptographic products, which is why regulated buyers often ask vendors for classification documents rather than assurances. Note the boundary: TLS 1.3 (RFC 8446) is ordinary infrastructure today, yet its export classification is still a paperwork exercise in some markets.

Try it: list the jurisdictions you ship into, then their import rules.

  • Mass-market and public-domain exemptions exist, but their scope varies by regime.
  • Import registration duties sometimes apply even where use is clearly permitted.
  • Classification requests are administrative tasks for lawyers, not cryptographic problems.

Internal policy, escrow and employers

Escrow is the wrong architecture for you

Most people who run into trouble with encryption are not prosecuted by a state. They are blocked by an employer, a school or a platform rule. Corporate device policies commonly forbid unsanctioned encryption on managed endpoints, because a security team that cannot inspect traffic cannot investigate an incident.

Key escrow arrangements make this explicit. A recovery key is held by an administrator or a third party, so data can be retrieved when an employee leaves or a device is seized. If your threat model includes that administrator, escrow is the wrong architecture for the data you want to protect. Say so early, because retrofitting escrow onto a zero-knowledge design is not possible.

Try it: read your employer's device policy and check your tool.

  • Managed devices may forbid any tool the security team cannot audit.
  • Escrow keeps recovery possible, but hands a copy of the key to someone else.
  • Where escrow is mandatory, discuss it before deployment rather than after.

eDiscovery, subpoenas and litigation holds

The friction that surprises technical teams

Courts decide disputes on evidence, and parties in many civil systems must preserve relevant records once litigation is reasonably anticipated. Encryption does not create an exemption from that duty. If you withhold responsive data, a judge can impose sanctions. If you genuinely cannot decrypt what you preserved, you must explain why in a way that survives scrutiny.

This is the friction that surprises technical teams. A hosting provider that stores only ciphertext can hand over what it has, which is an unreadable blob, while the account holder still controls the key. If the key is lost, nobody can restore the records, and no court order changes that arithmetic. The judgment is blunt: for records you may need to produce under compulsion, plan how you will decrypt and select them, or do not encrypt those records at all.

Try it: list the records you must produce and test one decryption.

  • A litigation hold freezes deletion, including automatic expiry you configured earlier.
  • Zero-knowledge storage does not shield you from your own disclosure obligations.
  • Lost keys mean genuinely unproducible records, which needs documenting early.

Record retention versus data minimisation

One rule per record class

A workable approach separates records by purpose, sets an expiry time for each class, and rotates keys so that deleting a key makes a whole set of ciphertext practically unreadable.

The primitive behind that design is public and testable. Open the DevTools console on any page served over HTTPS and run crypto.subtle.deriveKey with your passphrase and a random salt. The call derives a 256-bit AES-GCM key, the primitive specified in NIST SP 800-38D. It does not return a policy decision about how long you may keep the data.

Try it: derive a key with your passphrase and a random salt.

  • Decide a retention period before you save anything sensitive.
  • Destroy keys deliberately when a retention period ends.
  • Map every record class to a rule you can defend to an auditor.

Common questions

Is encryption legal for ordinary personal use?

In many jurisdictions, yes, and everyday browsing already depends on it through TLS. That general answer is not a ruling about your country, your profession or your data. Check the rules that apply to you, especially if you handle regulated records.

Is encryption illegal anywhere?

Restrictions exist in some places, and they range from registration duties to outright limits on particular tools. Whether a restriction reaches you depends on applicable law and on facts we cannot assess here. Ask a qualified lawyer in the relevant jurisdiction.

Can my employer forbid encrypted files?

Yes. A workplace policy can prohibit unsanctioned tools on managed devices, and breaching it may have employment consequences even where encryption itself is lawful. Read the acceptable-use policy and ask your security team where the boundary sits.

Encrypt a file in your browser

ZeyroVault runs free, browser-based encryption tools with no account and no sign-up. Your data and your keys stay on your device.