Skip to main content

Cryptography Standard

Document control

FieldValue
OwnerRon Benisty — CTO & CSO (ron.b@iontwrks.com)
StatusApproved
Version1.0
ClassificationConfidential
Approved byRon Benisty — CTO & CSO
Approval date2026-05-26 (Tuesday)
Last reviewed2026-05-26
Review cycleAnnual — next review due May 2027
Parent policySecure SDLC (SSDLC)

Satisfies ISO/IEC 27001:2022 A.8.24 (use of cryptography) and supports A.5.31 (key management) and SOC 2 CC6.1 (logical access). Closes the cryptography portion of the SSDLC gap analysis.


1. Purpose

State exactly which algorithms, key lengths, libraries, and key-management practices are mandatory across S.E.T's application code and infrastructure. Removes the "any crypto is fine" ambiguity that lint and SAST cannot catch alone.

2. In transit — TLS

  • TLS 1.2 minimum; TLS 1.3 preferred. TLS 1.0 / 1.1 and SSL are forbidden.
  • Cloudflare Full Strict termination (Architecture §Edge).
  • mTLS Authenticated Origin Pulls between Cloudflare and the ALB.
  • HSTS at Cloudflare with max-age ≥ 31536000 and includeSubDomains.
  • Cipher suites: AEAD only (e.g. ECDHE-ECDSA-AES128-GCM-SHA256, TLS_AES_128_GCM_SHA256). No CBC, no RC4, no 3DES.

3. At rest

  • AES-256 for all data at rest — RDS, EBS, S3, ECR (Architecture §Data layer).
  • AWS KMS Customer-Managed Keys (CMKs) — per environment, never crossing account boundaries.
  • Per-tenant keys (BYOK) — reserved for the premium tier (Multi-Tenancy §Encryption).
  • S3 Object Lock (Compliance mode) on Evidence, Backup, and CloudTrail-archive buckets.

4. Password hashing (local users)

  • Argon2id is the canonical algorithm — implemented by WorkOS for any local username/password account (Authentication).
  • S.E.T's own code stores no passwords — every credential check goes through WorkOS.

5. Tokens & sessions

  • JWT issued by WorkOS; signed with WorkOS's keys; verified server-side via WorkOS JWKS (Authentication).
  • No HS256 with shared secrets; signing is always asymmetric (RS256 / ES256 / EdDSA per WorkOS).
  • Access tokens short-lived (≤ 1 hour); refresh tokens rotated per WorkOS.
  • Session cookies (when used) — Secure, HttpOnly, SameSite=Strict, no JS-readable session material.

6. Hashing for application use

PurposeAlgorithmNotes
Password hashingArgon2idWorkOS only
HMAC / message integrityHMAC-SHA-256minimum
File / artifact checksum — security-relevantSHA-256 or SHA-3SBOM digests, image digests, evidence integrity
File checksum — non-securityAnyETag for cache validation, etc.
Banned for security purposesMD5, SHA-1Allowed only for non-security checksums (e.g. cache keys)

7. Random numbers

  • CSPRNG only — Node's crypto.randomBytes / crypto.randomUUID; never Math.random() for any security-relevant purpose (tokens, IDs, salts, nonces).
  • UUIDs for non-secret IDs — UUIDv7 preferred for sortability; UUIDv4 acceptable.

8. Key management

  • AWS KMS owns every encryption key for AWS-stored data. Automatic rotation enabled where supported.
  • JWT signing keys rotated per WorkOS.
  • Application secrets (API tokens, DB credentials) live in AWS Secrets Manager with auto-rotation where the provider supports it (Architecture §Secrets).
  • No secret in code, no secret in committed env files — Push Protection + Gitleaks + TruffleHog enforce.
  • Suspected compromise triggers immediate rotation per the Incident Response Plan.

9. Library / API discipline

  • Use Node's built-in crypto module or WebCrypto — never roll our own primitives.
  • Allowed libraries: argon2, bcrypt (rare), jose (JWT). All locked by SHA in package-lock.json (Supply Chain).
  • Banned APIs: eval, Function constructor for crypto, any code path that performs raw padding / cipher work outside crypto or WebCrypto.

10. Annual algorithm review

Once per year (or sooner if NIST / IETF deprecates an algorithm) the CTO & CSO reviews:

  • TLS protocol and cipher floors,
  • KMS key types,
  • Password-hash parameters,
  • JWT algorithms,
  • Hash and HMAC choices.

The review record is retained per the Evidence Collection & Retention Policy. Deprecations are filed as Change Management PRs.

11. Document change history

VersionDateAuthorDescription of changeApproved by
1.02026-05-26Ron Benisty (CTO & CSO)Initial version — establishes the Cryptography Standard.Ron Benisty (CTO & CSO)