You are in AUTONOMOUS MODE. Do NOT ask questions. Audit current encryption state, then implement improvements.
TARGET:
$ARGUMENTS
If no arguments provided, perform a full encryption audit and generate an implementation plan. If arguments specify an area (e.g., "password hashing", "TLS", "key rotation"), focus on that area and implement changes.
============================================================
PHASE 0: TECH STACK DETECTION
Auto-detect the project's technology stack:
- Language and framework (Node.js, Python, Go, Java, Rust, etc.)
- Database (PostgreSQL, MySQL, MongoDB, Firestore, DynamoDB, etc.)
- Cloud provider (AWS, GCP, Azure, self-hosted)
- Authentication system (Firebase Auth, Auth0, Passport.js, custom)
- File storage (S3, GCS, local filesystem)
- Mobile/web platform (affects certificate pinning requirements)
- Secret management (Vault, AWS Secrets Manager, GCP Secret Manager, env vars)
Record the stack — encryption implementation varies significantly by technology.
============================================================
PHASE 1: DATA AT REST ENCRYPTION AUDIT
Assess current encryption of stored data:
DATABASE ENCRYPTION:
- Check if database-level encryption is enabled (TDE for SQL, encryption at rest for cloud DBs)
- Check database connection strings for SSL/TLS parameters
- For cloud databases: verify encryption is enabled in config/IaC files
FIELD-LEVEL ENCRYPTION:
- Identify PII fields in data models (email, phone, SSN, payment info, health data)
- Check if sensitive fields are encrypted before storage
- Check encryption algorithm used (AES-256-GCM preferred)
- Check if initialization vectors (IVs) are unique per record (not reused)
- Verify encrypted fields are searchable only via exact match or encrypted index
FILE ENCRYPTION:
- Check if uploaded files are encrypted at rest
- Check if file storage service has encryption enabled (S3 SSE, GCS encryption)
- Verify temporary files are cleaned up (not left unencrypted on disk)
BACKUP ENCRYPTION:
- Check if database backups are encrypted
- Check if backup encryption keys are separate from primary keys
- Verify backup retention and key retention align
For each area: current state, gaps, and recommended implementation.
============================================================
PHASE 2: DATA IN TRANSIT ENCRYPTION AUDIT
Assess encryption of data in motion:
TLS CONFIGURATION:
- Check TLS version requirements (minimum TLS 1.2, prefer TLS 1.3)
- Search for disabled certificate verification:
- Node.js:
rejectUnauthorized: false, NODE_TLS_REJECT_UNAUTHORIZED=0
- Python:
verify=False, ssl._create_unverified_context()
- Go:
InsecureSkipVerify: true
- Java: custom TrustManager accepting all certificates
- Check for HTTP (not HTTPS) URLs in API calls
- Check for insecure WebSocket (
ws://) connections
SECURITY HEADERS:
Strict-Transport-Security (HSTS) — present, max-age >= 31536000, includeSubDomains
Content-Security-Policy — restricts resource loading
X-Content-Type-Options: nosniff
X-Frame-Options: DENY or SAMEORIGIN
Referrer-Policy: strict-origin-when-cross-origin or stricter
CERTIFICATE PINNING (mobile apps):
- Flutter: check for certificate pinning in HTTP client config
- iOS: check for
NSAppTransportSecurity settings in Info.plist
- Android: check for
network_security_config.xml
- Verify pins are for intermediate certificates (not leaf — avoids rotation issues)
INTERNAL COMMUNICATION:
- Service-to-service communication encrypted (mTLS or service mesh)
- Database connections use SSL/TLS
- Redis/cache connections encrypted
- Message queue connections encrypted (RabbitMQ, Kafka SSL)
============================================================
PHASE 3: KEY MANAGEMENT AUDIT AND IMPLEMENTATION
Assess and improve cryptographic key management:
CURRENT STATE AUDIT:
- Where are encryption keys stored? (env vars, config files, code, KMS)
- Are keys hardcoded in source code? (Critical finding if yes)
- Are keys in version control? (Critical finding if yes)
- Is there a key rotation process?
- Are different keys used for different purposes (separation of concerns)?
KEY ROTATION STRATEGY:
Generate a key rotation plan based on the detected stack:
For AWS:
- Use AWS KMS for master keys
- Implement envelope encryption: KMS key → data key → encrypt data
- Enable automatic annual rotation for KMS keys
- Data keys rotated per-session or per-record
For GCP:
- Use Cloud KMS for master keys
- Enable automatic rotation (90-day recommended)
- Use envelope encryption pattern
- Separate key rings per environment
For self-hosted / Vault:
- Use HashiCorp Vault Transit secrets engine
- Configure auto-rotation policies
- Implement key versioning for re-encryption
- Set up audit logging for key access
ENVELOPE ENCRYPTION IMPLEMENTATION:
If the project needs field-level encryption, implement the envelope encryption pattern:
- Master key stored in KMS (never leaves KMS)
- Data Encryption Key (DEK) generated per record or per batch
- DEK encrypted by master key, stored alongside encrypted data
- On decrypt: KMS decrypts DEK, DEK decrypts data
Provide implementation code specific to the detected stack.
============================================================
PHASE 4: PASSWORD HASHING AUDIT
Assess password storage security:
ALGORITHM CHECK:
- Identify the password hashing algorithm in use
- Rate the algorithm:
- argon2id — EXCELLENT (preferred, memory-hard)
- bcrypt — GOOD (widely supported, CPU-hard)
- scrypt — GOOD (memory-hard)
- PBKDF2 — ACCEPTABLE (if iteration count >= 600,000 for SHA-256)
- SHA-256/SHA-512 with salt — WEAK (too fast, upgrade needed)
- MD5 / SHA-1 — CRITICAL (must replace immediately)
- Plaintext — CRITICAL (must replace immediately)
CONFIGURATION CHECK:
- bcrypt: work factor >= 12 (recommended: 12-14)
- argon2: memory >= 64MB, iterations >= 3, parallelism >= 1
- scrypt: N >= 2^15, r >= 8, p >= 1
- PBKDF2: iterations >= 600,000 (SHA-256) or >= 210,000 (SHA-512)
SALT CHECK:
- Unique salt per password (not global salt)
- Salt length >= 16 bytes
- Salt generated with cryptographic RNG
MIGRATION PLAN:
If the current algorithm is weak, generate a migration plan:
- Implement new hashing algorithm alongside old
- On login: verify with old algorithm, re-hash with new, store new hash
- Set deadline for forced password reset for accounts not yet migrated
- Remove old algorithm support after migration period
============================================================
PHASE 5: TOKEN AND API KEY SECURITY
Assess token generation and API key management:
TOKEN GENERATION:
- JWT signing algorithm (HS256 acceptable, RS256/ES256 preferred for distributed systems)
- JWT secret strength (>= 256 bits for HMAC, proper key pair for RSA/ECDSA)
- JWT expiration configured (access tokens: 15-60 minutes, refresh tokens: 7-30 days)
- Session tokens use
crypto.randomBytes(32) or equivalent CSPRNG
- No
Math.random() for security-sensitive tokens
- OTP/verification codes use cryptographic randomness
API KEY MANAGEMENT:
- API keys stored hashed (like passwords), not in plaintext
- API keys scoped to minimum required permissions
- API key rotation mechanism exists
- Rate limiting per API key
- API key revocation capability
- API keys not logged or exposed in error messages
REFRESH TOKEN SECURITY:
- Refresh tokens stored securely (httpOnly cookie or secure storage)
- Refresh token rotation on use (one-time use)
- Refresh token family tracking (detect stolen tokens)
- Absolute expiration on refresh tokens
============================================================
PHASE 6: IMPLEMENTATION
If the $ARGUMENTS request implementation (not just audit), apply fixes:
For each issue found in Phases 1-5:
- Implement the fix using the project's existing patterns and dependencies
- Add or update configuration as needed
- Write migration scripts if data format changes
- Verify the fix works (run tests, verify encryption/decryption roundtrip)
- Commit each logical change separately with descriptive messages
Priority order for implementation:
- Hardcoded secrets → move to environment variables or secret manager
- Weak password hashing → upgrade algorithm
- Missing TLS verification → enable proper certificate validation
- Unencrypted PII → add field-level encryption
- Missing security headers → add header middleware
- Key rotation → implement rotation strategy
============================================================
SELF-HEALING VALIDATION (max 2 iterations)
After producing the security analysis, validate thoroughness:
- Verify every category in the audit was actually checked (not skipped).
- Verify every finding has a specific file:line location.
- Verify severity ratings are justified by impact assessment.
- Verify no false positives by re-reading flagged code in context.
IF VALIDATION FAILS:
- Re-audit skipped categories or vague findings
- Verify or remove false positives
- Repeat up to 2 iterations
============================================================
OUTPUT
Encryption Audit Report
Project: [name]
Stack: [detected technologies]
Date: [date]
Summary
| Area |
Status |
Findings |
| Data at Rest |
[GOOD/PARTIAL/WEAK/NONE] |
N issues |
| Data in Transit |
[GOOD/PARTIAL/WEAK/NONE] |
N issues |
| Key Management |
[GOOD/PARTIAL/WEAK/NONE] |
N issues |
| Password Hashing |
[GOOD/PARTIAL/WEAK/NONE] |
N issues |
| Token Security |
[GOOD/PARTIAL/WEAK/NONE] |
N issues |
| API Key Security |
[GOOD/PARTIAL/WEAK/NONE] |
N issues |
Critical Findings (fix immediately)
[Hardcoded secrets, plaintext passwords, disabled TLS, etc.]
Recommendations
[Ordered list by priority with implementation guidance]
Implementation Plan
| Priority |
Area |
Action |
Effort |
Dependencies |
| P0 |
Secrets |
Move to env vars |
1 hour |
None |
| P1 |
Passwords |
Upgrade to argon2 |
4 hours |
Migration script |
| P2 |
PII |
Field-level encryption |
1 day |
KMS setup |
Changes Made (if implementation was performed)
[List of commits with descriptions of what was implemented]
============================================================
NEXT STEPS
After reviewing the encryption audit:
- "Run
/secure to verify overall security posture after encryption improvements."
- "Run
/soc2 to check Confidentiality (C1) controls with new encryption."
- "Run
/gdpr to verify PII encryption meets compliance requirements."
- "Run
/pentest to verify secrets are no longer exposed."
- "Set up automated key rotation on the schedule recommended above."
============================================================
SELF-EVOLUTION TELEMETRY
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
- Look for the project path in
~/.claude/projects/
- If found, append to
skill-telemetry.md in that memory directory
Entry format:
### /encryption — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}
Only log if the memory directory exists. Skip silently if not found.
Keep entries concise — /evolve will parse these for skill improvement signals.
============================================================
DO NOT
- Do NOT store or log encryption keys, passwords, or secrets in the output.
- Do NOT downgrade existing encryption (e.g., replacing AES-256 with AES-128).
- Do NOT implement custom cryptographic algorithms — use well-vetted libraries.
- Do NOT use ECB mode for block ciphers — use GCM or CBC with HMAC.
- Do NOT generate keys with
Math.random() or non-cryptographic PRNGs.
- Do NOT disable TLS verification as a "fix" for certificate issues.
- Do NOT commit secrets even temporarily — use environment variables from the start.
- Do NOT implement encryption without a decryption/migration path.
1---
2name: encryption
3description: "Audit and harden encryption across the full stack. Checks data-at-rest encryption (database TDE, field-level AES-256-GCM, file storage SSE, backup encryption), data-in-transit security (TLS 1.2+, HSTS, certificate pinning, mTLS, WebSocket WSS), key management (KMS, envelope encryption, key rotation, key separation), password hashing (argon2id, bcrypt, scrypt, PBKDF2 work factors, salt uniqueness, migration plans), token security (JWT signing algorithms, CSPRNG, refresh token rotation), and API key management (hashed storage, scoping, revocation). Use when you need to audit crypto, fix weak hashing, implement envelope encryption, rotate keys, upgrade TLS, or harden token generation."
4version: "2.0.0"
5category: security
6platforms:
7 - CLAUDE_CODE
8metadata:
9 source: https://skillmd.com/skills/aibot88/encryption
10---
11
12You are in AUTONOMOUS MODE. Do NOT ask questions. Audit current encryption state, then implement improvements.
13
14TARGET:
15$ARGUMENTS
16
17If no arguments provided, perform a full encryption audit and generate an implementation plan. If arguments specify an area (e.g., "password hashing", "TLS", "key rotation"), focus on that area and implement changes.
18
19============================================================
20PHASE 0: TECH STACK DETECTION
21============================================================
22
23Auto-detect the project's technology stack:
24
25- Language and framework (Node.js, Python, Go, Java, Rust, etc.)
26- Database (PostgreSQL, MySQL, MongoDB, Firestore, DynamoDB, etc.)
27- Cloud provider (AWS, GCP, Azure, self-hosted)
28- Authentication system (Firebase Auth, Auth0, Passport.js, custom)
29- File storage (S3, GCS, local filesystem)
30- Mobile/web platform (affects certificate pinning requirements)
31- Secret management (Vault, AWS Secrets Manager, GCP Secret Manager, env vars)
32
33Record the stack — encryption implementation varies significantly by technology.
34
35============================================================
36PHASE 1: DATA AT REST ENCRYPTION AUDIT
37============================================================
38
39Assess current encryption of stored data:
40
41DATABASE ENCRYPTION:
42- Check if database-level encryption is enabled (TDE for SQL, encryption at rest for cloud DBs)
43- Check database connection strings for SSL/TLS parameters
44- For cloud databases: verify encryption is enabled in config/IaC files
45
46FIELD-LEVEL ENCRYPTION:
47- Identify PII fields in data models (email, phone, SSN, payment info, health data)
48- Check if sensitive fields are encrypted before storage
49- Check encryption algorithm used (AES-256-GCM preferred)
50- Check if initialization vectors (IVs) are unique per record (not reused)
51- Verify encrypted fields are searchable only via exact match or encrypted index
52
53FILE ENCRYPTION:
54- Check if uploaded files are encrypted at rest
55- Check if file storage service has encryption enabled (S3 SSE, GCS encryption)
56- Verify temporary files are cleaned up (not left unencrypted on disk)
57
58BACKUP ENCRYPTION:
59- Check if database backups are encrypted
60- Check if backup encryption keys are separate from primary keys
61- Verify backup retention and key retention align
62
63For each area: current state, gaps, and recommended implementation.
64
65============================================================
66PHASE 2: DATA IN TRANSIT ENCRYPTION AUDIT
67============================================================
68
69Assess encryption of data in motion:
70
71TLS CONFIGURATION:
72- Check TLS version requirements (minimum TLS 1.2, prefer TLS 1.3)
73- Search for disabled certificate verification:
74 - Node.js: `rejectUnauthorized: false`, `NODE_TLS_REJECT_UNAUTHORIZED=0`
75 - Python: `verify=False`, `ssl._create_unverified_context()`
76 - Go: `InsecureSkipVerify: true`
77 - Java: custom TrustManager accepting all certificates
78- Check for HTTP (not HTTPS) URLs in API calls
79- Check for insecure WebSocket (`ws://`) connections
80
81SECURITY HEADERS:
82- `Strict-Transport-Security` (HSTS) — present, max-age >= 31536000, includeSubDomains
83- `Content-Security-Policy` — restricts resource loading
84- `X-Content-Type-Options: nosniff`
85- `X-Frame-Options: DENY` or `SAMEORIGIN`
86- `Referrer-Policy: strict-origin-when-cross-origin` or stricter
87
88CERTIFICATE PINNING (mobile apps):
89- Flutter: check for certificate pinning in HTTP client config
90- iOS: check for `NSAppTransportSecurity` settings in Info.plist
91- Android: check for `network_security_config.xml`
92- Verify pins are for intermediate certificates (not leaf — avoids rotation issues)
93
94INTERNAL COMMUNICATION:
95- Service-to-service communication encrypted (mTLS or service mesh)
96- Database connections use SSL/TLS
97- Redis/cache connections encrypted
98- Message queue connections encrypted (RabbitMQ, Kafka SSL)
99
100============================================================
101PHASE 3: KEY MANAGEMENT AUDIT AND IMPLEMENTATION
102============================================================
103
104Assess and improve cryptographic key management:
105
106CURRENT STATE AUDIT:
107- Where are encryption keys stored? (env vars, config files, code, KMS)
108- Are keys hardcoded in source code? (Critical finding if yes)
109- Are keys in version control? (Critical finding if yes)
110- Is there a key rotation process?
111- Are different keys used for different purposes (separation of concerns)?
112
113KEY ROTATION STRATEGY:
114Generate a key rotation plan based on the detected stack:
115
116For AWS:
117```
118- Use AWS KMS for master keys
119- Implement envelope encryption: KMS key → data key → encrypt data
120- Enable automatic annual rotation for KMS keys
121- Data keys rotated per-session or per-record
122```
123
124For GCP:
125```
126- Use Cloud KMS for master keys
127- Enable automatic rotation (90-day recommended)
128- Use envelope encryption pattern
129- Separate key rings per environment
130```
131
132For self-hosted / Vault:
133```
134- Use HashiCorp Vault Transit secrets engine
135- Configure auto-rotation policies
136- Implement key versioning for re-encryption
137- Set up audit logging for key access
138```
139
140ENVELOPE ENCRYPTION IMPLEMENTATION:
141If the project needs field-level encryption, implement the envelope encryption pattern:
1421. Master key stored in KMS (never leaves KMS)
1432. Data Encryption Key (DEK) generated per record or per batch
1443. DEK encrypted by master key, stored alongside encrypted data
1454. On decrypt: KMS decrypts DEK, DEK decrypts data
146
147Provide implementation code specific to the detected stack.
148
149============================================================
150PHASE 4: PASSWORD HASHING AUDIT
151============================================================
152
153Assess password storage security:
154
155ALGORITHM CHECK:
156- Identify the password hashing algorithm in use
157- Rate the algorithm:
158 - argon2id — EXCELLENT (preferred, memory-hard)
159 - bcrypt — GOOD (widely supported, CPU-hard)
160 - scrypt — GOOD (memory-hard)
161 - PBKDF2 — ACCEPTABLE (if iteration count >= 600,000 for SHA-256)
162 - SHA-256/SHA-512 with salt — WEAK (too fast, upgrade needed)
163 - MD5 / SHA-1 — CRITICAL (must replace immediately)
164 - Plaintext — CRITICAL (must replace immediately)
165
166CONFIGURATION CHECK:
167- bcrypt: work factor >= 12 (recommended: 12-14)
168- argon2: memory >= 64MB, iterations >= 3, parallelism >= 1
169- scrypt: N >= 2^15, r >= 8, p >= 1
170- PBKDF2: iterations >= 600,000 (SHA-256) or >= 210,000 (SHA-512)
171
172SALT CHECK:
173- Unique salt per password (not global salt)
174- Salt length >= 16 bytes
175- Salt generated with cryptographic RNG
176
177MIGRATION PLAN:
178If the current algorithm is weak, generate a migration plan:
1791. Implement new hashing algorithm alongside old
1802. On login: verify with old algorithm, re-hash with new, store new hash
1813. Set deadline for forced password reset for accounts not yet migrated
1824. Remove old algorithm support after migration period
183
184============================================================
185PHASE 5: TOKEN AND API KEY SECURITY
186============================================================
187
188Assess token generation and API key management:
189
190TOKEN GENERATION:
191- JWT signing algorithm (HS256 acceptable, RS256/ES256 preferred for distributed systems)
192- JWT secret strength (>= 256 bits for HMAC, proper key pair for RSA/ECDSA)
193- JWT expiration configured (access tokens: 15-60 minutes, refresh tokens: 7-30 days)
194- Session tokens use `crypto.randomBytes(32)` or equivalent CSPRNG
195- No `Math.random()` for security-sensitive tokens
196- OTP/verification codes use cryptographic randomness
197
198API KEY MANAGEMENT:
199- API keys stored hashed (like passwords), not in plaintext
200- API keys scoped to minimum required permissions
201- API key rotation mechanism exists
202- Rate limiting per API key
203- API key revocation capability
204- API keys not logged or exposed in error messages
205
206REFRESH TOKEN SECURITY:
207- Refresh tokens stored securely (httpOnly cookie or secure storage)
208- Refresh token rotation on use (one-time use)
209- Refresh token family tracking (detect stolen tokens)
210- Absolute expiration on refresh tokens
211
212============================================================
213PHASE 6: IMPLEMENTATION
214============================================================
215
216If the $ARGUMENTS request implementation (not just audit), apply fixes:
217
218For each issue found in Phases 1-5:
2191. Implement the fix using the project's existing patterns and dependencies
2202. Add or update configuration as needed
2213. Write migration scripts if data format changes
2224. Verify the fix works (run tests, verify encryption/decryption roundtrip)
2235. Commit each logical change separately with descriptive messages
224
225Priority order for implementation:
2261. Hardcoded secrets → move to environment variables or secret manager
2272. Weak password hashing → upgrade algorithm
2283. Missing TLS verification → enable proper certificate validation
2294. Unencrypted PII → add field-level encryption
2305. Missing security headers → add header middleware
2316. Key rotation → implement rotation strategy
232
233
234============================================================
235SELF-HEALING VALIDATION (max 2 iterations)
236============================================================
237
238After producing the security analysis, validate thoroughness:
239
2401. Verify every category in the audit was actually checked (not skipped).
2412. Verify every finding has a specific file:line location.
2423. Verify severity ratings are justified by impact assessment.
2434. Verify no false positives by re-reading flagged code in context.
244
245IF VALIDATION FAILS:
246- Re-audit skipped categories or vague findings
247- Verify or remove false positives
248- Repeat up to 2 iterations
249
250============================================================
251OUTPUT
252============================================================
253
254## Encryption Audit Report
255
256**Project:** [name]
257**Stack:** [detected technologies]
258**Date:** [date]
259
260### Summary
261
262| Area | Status | Findings |
263|------|--------|----------|
264| Data at Rest | [GOOD/PARTIAL/WEAK/NONE] | N issues |
265| Data in Transit | [GOOD/PARTIAL/WEAK/NONE] | N issues |
266| Key Management | [GOOD/PARTIAL/WEAK/NONE] | N issues |
267| Password Hashing | [GOOD/PARTIAL/WEAK/NONE] | N issues |
268| Token Security | [GOOD/PARTIAL/WEAK/NONE] | N issues |
269| API Key Security | [GOOD/PARTIAL/WEAK/NONE] | N issues |
270
271### Critical Findings (fix immediately)
272[Hardcoded secrets, plaintext passwords, disabled TLS, etc.]
273
274### Recommendations
275[Ordered list by priority with implementation guidance]
276
277### Implementation Plan
278
279| Priority | Area | Action | Effort | Dependencies |
280|----------|------|--------|--------|-------------|
281| P0 | Secrets | Move to env vars | 1 hour | None |
282| P1 | Passwords | Upgrade to argon2 | 4 hours | Migration script |
283| P2 | PII | Field-level encryption | 1 day | KMS setup |
284
285### Changes Made (if implementation was performed)
286[List of commits with descriptions of what was implemented]
287
288============================================================
289NEXT STEPS
290============================================================
291
292After reviewing the encryption audit:
293- "Run `/secure` to verify overall security posture after encryption improvements."
294- "Run `/soc2` to check Confidentiality (C1) controls with new encryption."
295- "Run `/gdpr` to verify PII encryption meets compliance requirements."
296- "Run `/pentest` to verify secrets are no longer exposed."
297- "Set up automated key rotation on the schedule recommended above."
298
299
300============================================================
301SELF-EVOLUTION TELEMETRY
302============================================================
303
304After producing output, record execution metadata for the /evolve pipeline.
305
306Check if a project memory directory exists:
307- Look for the project path in `~/.claude/projects/`
308- If found, append to `skill-telemetry.md` in that memory directory
309
310Entry format:
311```
312### /encryption — {{YYYY-MM-DD}}
313- Outcome: {{SUCCESS | PARTIAL | FAILED}}
314- Self-healed: {{yes — what was healed | no}}
315- Iterations used: {{N}} / {{N max}}
316- Bottleneck: {{phase that struggled or "none"}}
317- Suggestion: {{one-line improvement idea for /evolve, or "none"}}
318```
319
320Only log if the memory directory exists. Skip silently if not found.
321Keep entries concise — /evolve will parse these for skill improvement signals.
322
323============================================================
324DO NOT
325============================================================
326
327- Do NOT store or log encryption keys, passwords, or secrets in the output.
328- Do NOT downgrade existing encryption (e.g., replacing AES-256 with AES-128).
329- Do NOT implement custom cryptographic algorithms — use well-vetted libraries.
330- Do NOT use ECB mode for block ciphers — use GCM or CBC with HMAC.
331- Do NOT generate keys with `Math.random()` or non-cryptographic PRNGs.
332- Do NOT disable TLS verification as a "fix" for certificate issues.
333- Do NOT commit secrets even temporarily — use environment variables from the start.
334- Do NOT implement encryption without a decryption/migration path.