Cryptography Standard
Document control
| Field | Value |
|---|---|
| Owner | Ron Benisty — CTO & CSO (ron.b@iontwrks.com) |
| Status | Approved |
| Version | 1.0 |
| Classification | Confidential |
| Approved by | Ron Benisty — CTO & CSO |
| Approval date | 2026-05-26 (Tuesday) |
| Last reviewed | 2026-05-26 |
| Review cycle | Annual — next review due May 2027 |
| Parent policy | Secure 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 andincludeSubDomains. - 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
| Purpose | Algorithm | Notes |
|---|---|---|
| Password hashing | Argon2id | WorkOS only |
| HMAC / message integrity | HMAC-SHA-256 | minimum |
| File / artifact checksum — security-relevant | SHA-256 or SHA-3 | SBOM digests, image digests, evidence integrity |
| File checksum — non-security | Any | ETag for cache validation, etc. |
| Banned for security purposes | MD5, SHA-1 | Allowed only for non-security checksums (e.g. cache keys) |
7. Random numbers
- CSPRNG only — Node's
crypto.randomBytes/crypto.randomUUID; neverMath.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
cryptomodule or WebCrypto — never roll our own primitives. - Allowed libraries:
argon2,bcrypt(rare),jose(JWT). All locked by SHA inpackage-lock.json(Supply Chain). - Banned APIs:
eval,Functionconstructor for crypto, any code path that performs raw padding / cipher work outsidecryptoor 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
| Version | Date | Author | Description of change | Approved by |
|---|---|---|---|---|
| 1.0 | 2026-05-26 | Ron Benisty (CTO & CSO) | Initial version — establishes the Cryptography Standard. | Ron Benisty (CTO & CSO) |