Key Generation Policies
PCI DSS 4.0.1 Requirement 3.7.1 requires you to implement key-management policies and procedures that include the generation of strong cryptographic keys used to protect stored account data. To operationalize it, you need a documented key-generation standard, approved tools (HSM/KMS), role-based controls, and evidence that keys are created with approved algorithms, lengths, entropy, and separation of duties. (PCI DSS v4.0.1 Requirement 3.7.1)
Key takeaways:
- Document how keys are generated, by whom, using what systems, and under what approvals. (PCI DSS v4.0.1 Requirement 3.7.1)
- Treat “key generation” as a controlled change with access control, logging, and repeatable procedures.
- Keep audit-ready evidence: configurations, access lists, logs, and key metadata that proves keys were generated correctly.
“Key generation policies” sounds like paperwork, but assessors treat it as a technical control with governance wrapped around it. PCI DSS 4.0.1 Requirement 3.7.1 focuses on whether your organization can consistently generate strong cryptographic keys for protecting stored account data, without relying on ad hoc admin behavior or unsafe defaults. (PCI DSS v4.0.1 Requirement 3.7.1)
For a CCO or GRC lead, the practical goal is simple: make key generation a defined, approved, repeatable process that engineering can follow and auditors can verify. Your documentation has to match reality, and your reality has to produce keys that are defensible: generated by approved systems, from strong randomness sources, with role separation, and with logs that show what happened.
This page translates the requirement into an operational checklist: who it applies to, what you need to build, what evidence to retain, where audits get stuck, and how to execute quickly without boiling the ocean. It also flags common implementation traps that cause failed PCI interviews, such as “we generate keys in code,” “the cloud provider handles it,” or “only one person knows how keys are created.”
Regulatory text
PCI DSS 4.0.1 Requirement 3.7.1: “Key-management policies and procedures are implemented to include generation of strong cryptographic keys.” (PCI DSS v4.0.1 Requirement 3.7.1)
Operator interpretation (plain English)
You must have documented key-management policies and procedures that specifically cover how your organization generates cryptographic keys, and those keys must be strong (appropriate algorithms/strength, generated from appropriate randomness, created in a controlled way). (PCI DSS v4.0.1 Requirement 3.7.1)
Assessors typically look for two things:
- A written standard that defines approved key-generation methods (systems, roles, approvals, algorithms/parameters).
- Proof the standard is followed for keys that protect stored account data (e.g., encryption keys for PAN at rest, database TDE keys, tokenization vault keys).
Who this applies to
Applies to:
- Merchants
- Service Providers
- Payment Processors
All in the operational context of systems that store account data or manage cryptographic keys that protect that stored data. (PCI DSS v4.0.1 Requirement 3.7.1)
Practical scoping notes (what to include)
Include key generation for:
- Database encryption (TDE) keys and keystores used to protect stored account data
- Application-layer encryption keys used for PAN or sensitive authentication data storage (where permitted)
- Tokenization system master keys and key-encryption-keys (KEKs), if you run tokenization internally
- Backup encryption keys when backups contain stored account data
- Keys generated by third parties on your behalf (e.g., managed HSM/KMS), where you still must demonstrate policy, oversight, and evidence
Exclude from this specific requirement only if you can prove the keys do not protect stored account data (but be careful; auditors often challenge this boundary).
What you actually need to do (step-by-step)
Below is a field-tested sequence that maps to what assessors ask for during PCI reviews.
Step 1: Inventory “keys that matter”
Create or update a crypto asset inventory that lists, for each key:
- Key name/identifier (not the secret)
- Purpose (what data it protects)
- System boundary (which environment, which app/db)
- Generation mechanism (HSM, cloud KMS, on-prem KMS, etc.)
- Owner and custodian roles
- Rotation/expiration expectation
- Backup/escrow method (if any)
This inventory becomes the backbone for showing you didn’t miss a key class.
Step 2: Define “strong key” in your policy (in terms you can test)
Your policy must convert “strong” into enforceable requirements. At minimum, define:
- Approved cryptographic modules/services for generation (e.g., HSM/KMS) and prohibited methods (e.g., keys generated in app code without approved entropy controls)
- Requirements for randomness/entropy source (e.g., generated by the HSM/KMS or OS CSPRNG under controlled conditions)
- Approved key types relevant to your environment (symmetric, asymmetric), plus constraints (key sizes, curves, modes) that engineering must follow
Write this as a “shall” standard with “how to verify” notes (e.g., where the configuration evidence lives).
Step 3: Standardize the approved generation paths
Pick and standardize key-generation workflows. Typical approved paths:
- Central KMS/HSM path: security team generates KEKs in an HSM; application teams request data-encryption-keys (DEKs) via API.
- Cloud managed KMS: keys created via IaC with restricted IAM and mandatory logging; no console-only key creation except break-glass.
- Database platform keys: TDE keys created through the DB’s supported keystore integration (ideally backed by KMS/HSM).
Document the exact “clicks and commands” (or the IaC pipeline) used to generate keys, including required approvals.
Step 4: Enforce separation of duties and access control for key creation
Assessors expect key generation to be controlled by role, not convenience. Implement:
- A restricted “Key Creator” role (very small group)
- Change management gates (ticket/change record required)
- Break-glass process for emergency generation, with after-the-fact review
If you have a single admin who can generate keys and also deploy apps that consume them, treat that as a finding waiting to happen.
Step 5: Make key generation auditable (logging + review)
Ensure you can produce:
- KMS/HSM audit logs for key creation events
- Identity of the principal (human or service account)
- Time, system, and key metadata (ID/alias, purpose tags)
- Evidence of review (security review notes, change approvals)
Then operationalize periodic review of key creation events for anomalies.
Step 6: Control third-party involvement explicitly
If a third party generates or manages keys:
- Put the allowed key-generation methods in the contract/SOW
- Require evidence access (logs, attestation reports, or exportable audit events)
- Clarify responsibilities: who approves key creation, who can delete keys, who holds break-glass privileges
This avoids the common failure mode: “Our cloud provider handles it,” with no proof of your policy enforcement.
Step 7: Validate the implementation with a mini “PCI interview drill”
Before assessment, run a tabletop where you answer:
- “Show me your policy for key generation.”
- “Show me evidence that Key X was generated according to policy.”
- “Show me who can generate production keys and how you restrict that.”
If you cannot answer those in minutes, you are not operational yet.
Required evidence and artifacts to retain
Keep artifacts that demonstrate both design (policy) and operation (proof it is followed):
Governance artifacts
- Key-management policy and procedures that explicitly include key generation requirements. (PCI DSS v4.0.1 Requirement 3.7.1)
- Key-generation standard (approved systems, algorithms/parameters, entropy expectations, prohibited methods)
- RACI or role definition for key generation and approvals
- Exception process (when and how deviations are approved)
Technical artifacts
- KMS/HSM configuration snapshots (settings, key policies, IAM bindings)
- IaC code or pipeline evidence used to create keys (PR approvals, pipeline logs)
- KMS/HSM audit logs showing key creation events
- Key inventory and metadata (IDs/aliases, tags, purpose, environment)
- Evidence of monitoring/review (tickets, review notes, alerts)
Operational artifacts
- Change tickets for key creation (with approver and rationale)
- Break-glass usage records (if applicable), plus post-incident review notes
- Training or runbooks for operators performing key generation
Common exam/audit questions and hangups
Expect these to come up:
- “Define ‘strong cryptographic key’ for your environment.” If your policy says “strong” but lacks testable parameters, you will stall in interviews. (PCI DSS v4.0.1 Requirement 3.7.1)
- “Show me how keys are generated.” Assessors want to see the actual workflow (IaC, console, HSM ceremony) and the controls around it. (PCI DSS v4.0.1 Requirement 3.7.1)
- “Who can generate production keys?” If you cannot produce an access list and explain approval gates, expect a finding.
- “How do you prevent developers from generating keys ad hoc?” You need technical guardrails (IAM, pipelines, restricted APIs), not just a policy statement.
- “What about third-party managed keys?” You still need policy, oversight, and evidence, even if the platform generates the key material.
Frequent implementation mistakes (and how to avoid them)
-
Policy says “use KMS,” but teams still generate keys in application code.
Fix: block unapproved key creation with IAM controls and SDLC guardrails (linting, security reviews, secrets scanning for embedded keys). -
Console-only key creation with no approvals.
Fix: require IaC for key creation, or enforce ticket + approval and ensure logs identify the human actor. -
No mapping from “keys” to “stored account data.”
Fix: your inventory must explicitly connect each key to the dataset it protects, or scoping debates will consume the audit. -
Single point of failure operator.
Fix: define at least two trained custodians, but restrict privileges; document the coverage model. -
No evidence retention plan for audit logs.
Fix: route KMS/HSM logs to centralized logging and make them easy to search by key ID and event type.
Enforcement context and risk implications
No public enforcement cases were provided in the source catalog for this requirement, so this page does not cite specific enforcement actions.
From a risk standpoint, weak or poorly controlled key generation creates failure modes that PCI assessors treat as high impact:
- Predictable or mishandled keys can invalidate encryption as a compensating safeguard for stored account data.
- Uncontrolled key generation expands the number of keys to manage, increasing the chance of orphaned keys, unknown ownership, or improper rotation later.
- Lack of logs and approvals makes it difficult to demonstrate control effectiveness during an investigation or assessment.
Practical 30/60/90-day execution plan
Use phases so you can move without committing to arbitrary deadlines.
First 30 days (stabilize and document the minimum viable standard)
- Identify systems storing account data and the keys protecting them; draft the initial key inventory.
- Publish a key-generation standard: approved generation systems, roles, required approvals, and prohibited methods. (PCI DSS v4.0.1 Requirement 3.7.1)
- Lock down who can generate production keys in KMS/HSM; remove broad admin grants.
- Ensure key creation events are logged and centrally searchable.
Days 31–60 (turn policy into repeatable workflows)
- Implement IaC or ticket-driven workflows for key generation, with mandatory peer/security approval.
- Create runbooks for common key generation scenarios (TDE, application DEKs, backup encryption).
- Add monitoring for key creation events and begin periodic review with evidence capture.
- Add third-party requirements to contracts or operating procedures where they generate/manage keys.
Days 61–90 (audit hardening and continuous control)
- Run an internal “PCI evidence drill” for 2–3 representative keys: policy → workflow → logs → approvals.
- Close gaps found in the drill (missing logs, unclear ownership, inconsistent tagging).
- Formalize exceptions and break-glass, including after-action review.
- Consider using Daydream to track key-generation control ownership, map evidence to the requirement, and keep assessor-ready packets current without chasing teams across tickets and log tools.
Frequently Asked Questions
Does PCI DSS require an HSM for key generation?
The text provided requires policies and procedures for generating strong cryptographic keys, but it does not mandate a specific technology. (PCI DSS v4.0.1 Requirement 3.7.1) In practice, you should choose a generation method you can control, restrict, and audit.
We use cloud KMS. Is that enough to satisfy key generation policies?
Cloud KMS can satisfy the “generation” portion if your policies define approved usage and you can prove keys are created through controlled roles, workflows, and logs. (PCI DSS v4.0.1 Requirement 3.7.1) Auditors will still expect evidence of access control and repeatability.
Can developers generate encryption keys in application code?
If developers generate keys ad hoc, you must prove the keys are strong and the process is controlled and repeatable under policy. (PCI DSS v4.0.1 Requirement 3.7.1) Most teams reduce audit risk by centralizing key generation in KMS/HSM and limiting who can create production keys.
What evidence do auditors usually want for key generation?
Expect to provide the written policy/standard plus system evidence such as KMS/HSM audit logs showing key creation, the identity used, and approval records tied to the event. (PCI DSS v4.0.1 Requirement 3.7.1) Also keep an inventory that maps keys to the stored account data they protect.
How do we handle key generation performed by a third party?
Document the shared responsibility model and require evidence access (logs or attestations) that demonstrates key creation is controlled and auditable under your policy. (PCI DSS v4.0.1 Requirement 3.7.1) Treat third-party key creation as in-scope operational activity, not an outsourcing carveout.
What’s the fastest way to get assessor-ready on this requirement?
Standardize on one or two approved key-generation paths (KMS/HSM or IaC-managed KMS), lock down roles, and produce a complete evidence packet for a small set of representative keys. (PCI DSS v4.0.1 Requirement 3.7.1) Then expand coverage to all in-scope keys using the same workflow.
Frequently Asked Questions
Does PCI DSS require an HSM for key generation?
The text provided requires policies and procedures for generating strong cryptographic keys, but it does not mandate a specific technology. (PCI DSS v4.0.1 Requirement 3.7.1) In practice, you should choose a generation method you can control, restrict, and audit.
We use cloud KMS. Is that enough to satisfy key generation policies?
Cloud KMS can satisfy the “generation” portion if your policies define approved usage and you can prove keys are created through controlled roles, workflows, and logs. (PCI DSS v4.0.1 Requirement 3.7.1) Auditors will still expect evidence of access control and repeatability.
Can developers generate encryption keys in application code?
If developers generate keys ad hoc, you must prove the keys are strong and the process is controlled and repeatable under policy. (PCI DSS v4.0.1 Requirement 3.7.1) Most teams reduce audit risk by centralizing key generation in KMS/HSM and limiting who can create production keys.
What evidence do auditors usually want for key generation?
Expect to provide the written policy/standard plus system evidence such as KMS/HSM audit logs showing key creation, the identity used, and approval records tied to the event. (PCI DSS v4.0.1 Requirement 3.7.1) Also keep an inventory that maps keys to the stored account data they protect.
How do we handle key generation performed by a third party?
Document the shared responsibility model and require evidence access (logs or attestations) that demonstrates key creation is controlled and auditable under your policy. (PCI DSS v4.0.1 Requirement 3.7.1) Treat third-party key creation as in-scope operational activity, not an outsourcing carveout.
What’s the fastest way to get assessor-ready on this requirement?
Standardize on one or two approved key-generation paths (KMS/HSM or IaC-managed KMS), lock down roles, and produce a complete evidence packet for a small set of representative keys. (PCI DSS v4.0.1 Requirement 3.7.1) Then expand coverage to all in-scope keys using the same workflow.
Authoritative Sources
Operationalize this requirement
Map requirement text to controls, owners, evidence, and review workflows inside Daydream.
See Daydream