AI and Encryption: Template Pack

From the AI Security From Zero series on falkster.com: https://falkster.com/blog/ai-security-and-encryption

Download

ai-security-and-encryption-pack.md12 KB2,087 wordsFree to use, no signup

From the AI Security From Zero series on falkster.com: https://falkster.com/blog/ai-security-and-encryption

For COOs, product managers, and the CISO, CTO, CPO, engineering, legal, and go-to-market teams who work with them. The short story: AI has not been shown to break the math of strong modern encryption. It does find bugs in crypto code faster, make leaked keys easier to find and use, and help attackers talk people out of login codes. Quantum computing is the real long-term threat to today's public-key encryption, and "harvest now, decrypt later" means long-lived data is exposed today.

This isn't legal advice. Confirm every algorithm, setting, and date with your security team before you act on it.

How to use this pack: Start with the cryptographic inventory, because you can't migrate what you can't find. Then fill in the data-lifetime table with product and security together; anything you don't need to keep, delete, because data you don't keep can't be decrypted later. Run the key and secret exposure check on every AI agent and coding tool this month, and write each agent's four lines: what it may do alone; when a person joins, and how; who reads its work, and how often; who can stop it today. Send the vendor questions with every renewal. The COO runs the quarterly review using the other templates as inputs. Product managers paste the spec section into every feature that creates or reads sensitive data.

Reference dates (confirm with your security team): NIST FIPS 203, 204, and 205 published August 13, 2024; HQC selected as a backup March 11, 2025. NIST IR 8547 (final, October 2026): quantum-vulnerable public-key algorithms deprecated after 2030, disallowed after 2035. UK NCSC: discovery and plan by 2028, highest-priority migration by 2031, complete by 2035. EU coordinated roadmap (June 23, 2025): start by end of 2026, critical infrastructure no later than end of 2030. NSA CNSA 2.0: new national security system acquisitions compliant from January 1, 2027; quantum-resistant by 2035; December 2, 2026 advisory to accelerate. CA/Browser Forum: maximum certificate life falls from 398 to 47 days between March 2026 and March 2029.

Method credits: NIST IR 8547 and CSWP 39 (crypto-agility), the NSA's inventory, assess, triage steps, the UK NCSC's migration timelines and cryptographic agility blog, the Cryptography Incident Review Group's recommendations (highest security level, hybrids with different math, agility). Templates by Falk Gottlob. Every name, number, and date inside the templates is an illustration, except where a template names an agency milestone.

1. Cryptographic inventory (Step 1)

Copy and adapt
## Cryptographic inventory: [company or product], updated [date] by [name]
Owner: [COO delegate]   Technical lead: [CISO or security engineer]

| # | System or flow | What's protected | Use (data in transit / at rest / signing / login) | Algorithm and key size | Library or product, version | Where keys live (KMS / HSM / vendor / file) | Who can reach the keys (people, services, AI agents) | Quantum-vulnerable? | Can we swap the algorithm by config? | Owner | Vendor involved |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | [Public API] | [customer records] | [in transit] | [TLS 1.3, classical key exchange] | [load balancer, vendor A] | [vendor A] | [ops team] | [yes] | [yes, vendor setting] | [name] | [vendor A] |
| 2 | [Database backups] | [all customer data] | [at rest] | [AES-256] | [cloud storage] | [cloud KMS] | [backup service, 2 admins] | [low: symmetric] | [n/a] | [name] | [cloud B] |
| 3 | [Mobile app update signing] | [app integrity] | [signing] | [ECDSA] | [build pipeline] | [CI secret store] | [CI, release bot] | [yes] | [no: needs rebuild] | [name] | [none] |
| 4 | [Partner file exchange] | [claims files] | [in transit] | [SFTP with RSA keys] | [vendor C gateway] | [config file on server] | [3 engineers, coding agent?] | [yes] | [unknown] | [name] | [vendor C] |

Gaps to chase: [systems with "unknown" in any column]
Next review: [date]

2. Data-lifetime and harvest-now priority table (Step 2)

Copy and adapt
## Data-lifetime and harvest-now priority: [product], v[number], [date]
Owner: [product manager]   Reviewed with: [security, legal, COO delegate]

| Data type | Example | Where it travels or rests | How long it must stay secret | Do we need to keep it? For how long? | Exposed to harvest-now? | Priority (1 = move first) | Action |
|---|---|---|---|---|---|---|---|
| [Identity documents] | [passport scans] | [upload API, storage, vendor D] | [lifetime of the person] | [only until verified, then delete?] | [yes, on every link using classical key exchange] | [1] | [delete after verification; hybrid TLS on upload path] |
| [Health or financial history] | [statements, records] | [API, backups] | [10+ years] | [legal minimum: [n] years] | [yes] | [1] | [hybrid key exchange on all links; review backups] |
| [Session tokens] | [login cookies] | [browser to API] | [hours] | [hours] | [low] | [4] | [no change] |
| [Internal analytics] | [aggregated usage] | [warehouse] | [1 to 2 years] | [aggregate only?] | [low to medium] | [3] | [drop raw events after [n] days] |

Rule: if "do we need to keep it?" is no, deleting it beats encrypting it better.

3. Key and secret exposure check for AI agents and coding tools (Step 3)

Copy and adapt
## Key and secret exposure check for AI agents and coding tools: [team], [date]
Checked by: [name]   Security partner: [name]

| Agent or tool | Where it runs (laptop / CI / cloud) | Can it read .env, config, or secrets folders? | Can it read cloud or KMS credentials? | Can it see decrypted customer data? | Can it send data out (web, email, repo, API)? | Raw keys in prompts, logs, or memory? | Fix | Owner | Due |
|---|---|---|---|---|---|---|---|---|---|
| [Coding assistant] | [developer laptops] | [yes] | [yes, via local profile] | [no] | [yes, can push to repos] | [unknown] | [move secrets to manager; block .env reads; scan commits] | [name] | [date] |
| [Support agent] | [vendor cloud] | [no] | [no] | [yes, ticket attachments] | [yes, email replies] | [no] | [redact before agent reads; human sends] | [name] | [date] |
| [Ops agent] | [cloud] | [no] | [yes, admin role] | [yes] | [yes] | [no] | [scope to read-only; broker for writes] | [name] | [date] |

Also check
- [ ] Secret scanning on every repo, including commits made with AI tools
- [ ] Every key that ever lived in a file, chat, ticket, or prompt: rotated
- [ ] Old keys: when were they last tested and revoked?
- [ ] AI vendor: does it store prompts or files that might contain secrets? For how long?

Four lines for each agent above: may do alone / when a person joins / who reads its work / who can stop it today.

4. Vendor post-quantum and key-handling questions (Step 5)

Copy and adapt
## Vendor post-quantum and key-handling questions: [vendor], [date]
Asked by: [procurement or COO delegate]   Reviewed by: [security]

Post-quantum readiness
1. Which of your services use quantum-vulnerable key exchange or signatures today? Which already use hybrid or post-quantum methods (for example ML-KEM)?
2. What is your migration plan, with dates, against NIST IR 8547 (deprecate after 2030, disallow after 2035) or the NCSC milestones (2028, 2031, 2035)?
3. Can we choose the algorithm or security level by configuration, or does a change need a new release?
4. Which crypto libraries do you ship, and how fast did you patch the January 2026 OpenSSL fixes?

Key handling
5. Who holds the encryption keys for our data: us, you, or a third party? Can we bring or control our own keys?
6. How often are keys rotated, and how would you tell us about a key compromise? Within how many hours?
7. Can any of your staff, or your AI systems, read our decrypted data? Under what controls and logs?

AI-specific
8. Do your AI features or agents ever see our keys, secrets, or decrypted records? Can we switch that off?
9. Do you keep prompts, files, or logs that might contain our secrets? Where, for how long, and are they encrypted?
10. Are our data or prompts used to train any model?

Contract asks: [PQ roadmap commitment] [key compromise notice in [n] hours] [no training on our data] [right to audit or attestation]
Answer quality: [clear / vague / refused]   Follow-up owner: [name]

5. COO: quarterly crypto and key-risk review

Copy and adapt
## Quarterly crypto and key-risk review: [company], Q[n] [year]
Chair: [COO]   Attending: [CISO], [CTO], [CPO], [procurement lead], [legal]   Time: 60 minutes

1. Inventory health (10 min)
   - Rows in inventory: [n]   Rows with an owner: [n]   Rows with "unknown": [n]
   - New systems added this quarter without an inventory row: [list]

2. Migration progress against milestones (15 min)
   | Milestone | Our target date | Agency reference | Status | Blocker | Owner |
   |---|---|---|---|---|---|
   | Discovery complete | [date] | NCSC: by 2028 | [on track / at risk] | [ ] | [name] |
   | Priority-1 data links on hybrid or PQ key exchange | [date] | NCSC: highest priority by 2031; NIST federal: 2030 | [ ] | [ ] | [name] |
   | Long-lived signing keys (firmware, app updates) plan | [date] | NSA CNSA 2.0 | [ ] | [ ] | [name] |
   | All quantum-vulnerable public-key use retired | [date] | NIST: disallowed after 2035 | [ ] | [ ] | [name] |

3. Keys and secrets (10 min)
   - Keys past rotation date: [n]   Certificates expiring in 30 days without automation: [n]
   - Secrets found in repos, chats, or AI tool logs this quarter: [n]   All rotated? [yes/no]
   - AI agents with any path to raw keys: [n] (target: 0)

4. Vendors (10 min)
   - Vendors asked the PQ and key-handling questions: [n] of [n]
   - Vague or refused answers: [list]   Action: [renewal clause / replace / accept risk, signed by [name]]

5. Incidents and drills (10 min)
   - Key compromise drill run this quarter? [yes/no]   Gaps found: [list]   Gaps closed: [n]
   - External claims or rumors reviewed, and how fast we answered internally: [ ]

6. Decisions and asks (5 min)
   - Budget change needed: [amount, reason]
   - Board summary (three sentences): [ ]
   - Regulator or customer reporting due: [ ]

6. Product manager: encryption and data-lifetime spec section, with acceptance criteria

Copy and adapt
## Spec section: Encryption and data lifetime
Feature: [name]   PM: [name]   Security reviewer: [name]   Date: [date]

1. Data this feature creates or reads
   | Data | Sensitivity | How long it must stay secret | Retention we will keep | Why we need it that long |
   |---|---|---|---|---|
   | [uploaded ID image] | [high] | [lifetime] | [delete [n] days after verification] | [fraud review window] |
   | [derived risk score] | [medium] | [2 years] | [2 years] | [audit] |

2. Protection
   - In transit: [protocol and key exchange per security standard; hybrid PQ where available]
   - At rest: [encryption per security standard; key owner: us / vendor / customer]
   - Harvest-now priority (from data-lifetime table): [1 / 2 / 3 / 4]

3. Crypto-agility
   - Algorithms and key sizes are set by configuration, not code: [yes / no, and plan]
   - Library and version listed in the cryptographic inventory: [yes]

4. AI and agents
   - AI components that read this data: [list]
   - Do they see decrypted data? [yes/no]   Raw keys or secrets? [must be no]
   - Can they send data out? [where]   Four lines written for each agent: [link]

5. Customer promises
   - What we will say: [exact wording, approved by security and legal]
   - What we will not say: ["unbreakable", "quantum-proof" without evidence]

Acceptance criteria
- [ ] Data older than the retention period is deleted, verified by [test]
- [ ] No raw key, token, or secret appears in prompts, model logs, or agent memory (canary test passes)
- [ ] Changing the algorithm or key size needs a config change only, shown in staging
- [ ] All new endpoints pass the TLS configuration scan; no weak or expiring certificates
- [ ] Customer-facing encryption copy matches section 5 and is signed off by security
- [ ] Feature added to the cryptographic inventory with an owner

More from the toolkit

All templates →