← Back to CryptoToolkit

Production handoff

Learn with the lab. Ship with production cryptography.

CryptoToolkit makes crypto mechanics visible, but its browser demos should not protect real secrets. This checklist shows what has to change when a lesson becomes a real product design.

Do not port the demo

Use maintained production primitives instead of copying educational code. The handoff starts by naming the real library, key owner, rotation trigger, envelope format, and rollback plan.

NeedUse insteadWhy
Browser encryptionWeb Crypto APINative key objects and vetted AES-GCM implementation.
Backend AEADlibsodium or Google TinkMisuse-resistant wrappers, tested primitives, and keyset support.
Password hashingBackend Argon2id libraryCalibrated memory and iteration parameters under server policy.
Key storageKMS, HSM, or Vault TransitKeys are separated from app data and app logs.

Minimum questions before production

  1. What exact asset is protected: message, file, database field, token, backup, or session?
  2. What attacker is in scope: stolen storage, malicious admin, network attacker, offline guesser, or tenant escape?
  3. Where are keys generated, stored, rotated, revoked, backed up, and destroyed?
  4. How are nonces allocated and prevented from repeating?
  5. Which metadata is authenticated as AAD?
  6. How will old ciphertexts decrypt after a key or algorithm migration?

Safe AEAD envelope shape

A production envelope should bind security metadata into the authentication tag:

suite_id || key_id || nonce || ciphertext || tag

Pass fields such as suite_id, key_id, tenant, resource type, and resource ID as AAD when they are security-relevant. The AAD does not need to be secret, but it must not be silently mutable.

Misuse tests to require

Use CryptoToolkit for the lesson boundary

Start with the AES-GCM, GCM nonce reuse, HMAC, and constant-time modules to understand what can fail. Then move production work to Web Crypto, libsodium, Tink, or a mature language-native library with key management around it.

For the repository version of this checklist, read docs/production-handoff.md on GitHub.