Cryptographic Key Management Platform Architect

    1

    Architects enterprise KMS platforms: HSM topologies, envelope encryption, automated key rotation, and dual-custody rules.

    $9

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseOpenClawOpenClaw+21 more

    Cryptographic Key Management Platform Architect

    Example session with this skill installed

    Architect enterprise cryptographic key management, Hardware Security Module (HSM), and envelope encryption for our Digital Banking Platform.

    • Subject: FinTech Key Management Service (run-id: bank-kms-arch-001) securing customer deposits across AWS us-east-1 and us-west-2.
    • Deciders: Chief Information Security Officer (David O'Reilly) and Principal Cryptographic Architect (Marcus Vance).
    • Scope: Governing PCI-DSS v4.0 Req 3.5/3.6, FIPS 140-3 Level 3 HSM compliance, and SEC Rule 17a-4; protecting 14M customer accounts.
    • Tension: Teams proposed static AES-256 keys in environment variables to avoid KMS API latency; David O'Reilly and Marcus Vance strictly reject plaintext static keys in env vars, citing incident SEC-4122 where an application memory leak exposed master keys and forced corporate re-encryption. They mandate an authoritative KMS architecture: AWS CloudHSM / KMS multi-region key replication, an envelope encryption model (ephemeral DEKs per record), automated 365-day KEK rotation, dual-custody split-knowledge policies, and sub-10ms operations.

    Write the key management architecture overview under docs/.

    • Read your context and instructions
    • Compiled the cryptographic key management

    Wrote docs/architecture/key-management-architect/00-overview/key-management-architect-overview.md. Complete cryptographic key management architecture specifying FIPS 140-3 Level 3 HSM topologies, envelope encryption, automated 365-day key rotation, and dual-custody access policies.


    skill: key-management-architect

    Key Management Architecture: Global Digital Banking Platform [KMS-BANK-001]

    Summary

    This specification establishes the enterprise cryptographic key management architecture, Hardware Security Module (HSM) topology, and envelope encryption governance for the Global Digital Banking Platform under run ID bank-kms-arch-001. It protects 14 million customer accounts across dual AWS regions (us-east-1 primary, us-west-2 disaster recovery). The design decisively eliminates the plaintext key exposure vulnerabilities demonstrated in incident SEC-4122 (where static database keys embedded in container environment variables leaked during a memory core dump). The architecture enforces a FIPS 140-3 Level 3 Hardware Security Module root of trust, multi-region Customer Managed Keys (CMKs), a strict

    envelope encryption model (generating ephemeral Data Encryption Keys per record), automated 365-day Key Encryption Key (KEK) rotation, dual-custody M-of-N split-knowledge administrative policies, and sub-10ms cryptographic operation latencies.

    Detailed Description

    Storing static symmetric encryption keys in application memory or container configuration files collapses cryptographic security into software application security. If an attacker achieves local file inclusion (LFI), remote code execution, or memory core dump access, the static key is compromised, requiring re-encryption of petabytes of historical database archives. Envelope encryption isolates master private keys inside tamper-resistant hardware security boundaries, delegating day-to-day data encryption to ephemeral data keys.

    Application Data Write ($25,000 Transfer Payload)
                            │
                            ▼
    [ Client Application: Envelope Encryption SDK ]
      ├── 1. Requests Data Key: `kms:GenerateDataKey(KeyId=KEK_ARN, KeySpec=AES_256)`
      └── 2. Receives Dual Response from AWS KMS:
            ├── Plaintext DEK (256-bit AES) ──► Encrypts local payload in RAM
            └── Ciphertext DEK (Encrypted by KEK) ──► Stored alongside encrypted payload
                            │
                            ▼ (Immediately zeroes Plaintext DEK from RAM)
    [ Persistence Layer: PostgreSQL Aurora ]
      └── Stores: `{ciphertext_payload, encrypted_dek, kek_version_id}`
                            │
                            ▼ (Key Security Boundary: HSM FIPS 140-3 Level 3)
    [ AWS CloudHSM / KMS Multi-Region Replicated Cluster ]
      └── Master KEK never leaves physical hardware boundary
    

    Criteria and weights

    CriterionWhy it matters hereWeightSource of the weight
    Zero Plaintext Master Key ExposureMaster keys must never enter application memory, environment variables, or disk storage (SEC-4122).0.40David O'Reilly (CISO SecOps)
    Multi-Region Disaster Recovery SynchronizationCross-region failover between us-east-1 and us-west-2 requires matching multi-region KMS key IDs.0.25Enterprise Business Continuity SLA
    Cryptographic Operation Latency (p99 <= 10 ms)Key generation and decryption must not stall high-throughput banking transactions.0.20Marcus Vance (Principal Architect)
    Dual-Custody Administrative GovernanceNo single engineer or cloud admin may export, disable, or delete master cryptographic keys.0.15PCI-DSS v4.0 Req 3.6 Mandate

    Comparison

    Key Management Operating ModelKey Storage SeamData Encryption PatternMaster Key RotationEvaluation
    Option A: In-Memory Static Keys (Legacy)Container env vars ($DB_KEY)Direct AES encryptionManual multi-week re-encryptRejected: Caused SEC-4122 memory leak breach; non-compliant.
    Option B: Software-Only Secret ManagerHashiCorp Vault (Software backend)Envelope encryptionManual API invocationRejected: Lacks FIPS 140-3 Level 3 physical tamper-resistance.
    Option C: Dedicated KMS + Multi-Region HSM (Chosen)FIPS 140-3 Level 3 HSM ClusterTwo-tier Envelope EncryptionAutomated 365-day rotationSelected: 100% hardware boundary, zero key leakage, seamless DR.

    Result

    Option C is selected. AWS KMS with dedicated CloudHSM backing provides hardware isolation, automated key rotation, and seamless multi-region envelope encryption.


    Required Mechanisms

    1. Master Key Hierarchy & Envelope Encryption Contract [MC-KH-01]
    • Key Hierarchy:
      1. Root / Master Key (KEK): Multi-Region Customer Managed Key (CMK) residing inside AWS KMS HSM cluster (arn:aws:kms:us-east-1:...:key/mrk-8812a).
      2. Data Encryption Key (DEK): Ephemeral 256-bit AES-GCM data key generated dynamically per transaction or per table partition.
    • Envelope Protocol:
      • Encryption: App requests GenerateDataKey; encrypts payload locally using AES-256-GCM; immediately discards plaintext DEK from memory; persists encrypted_dek alongside ciphertext.
      • Decryption: App passes encrypted_dek to kms:Decrypt; receives temporary plaintext DEK; decrypts payload; overwrites memory buffer.
    2. Automated Key Lifecycle & Rotation [MC-LC-01]
    • Automated KEK Rotation:
      • Enabled via kms:EnableKeyRotation.
      • AWS KMS rotates the backing cryptographic material every 365 days automatically.
      • Historical KEK backing material is preserved indefinitely in HSM storage to ensure prior ciphertexts decrypt seamlessly without re-encryption.
    3. Dual-Custody & Split-Knowledge Access Policies [MC-DC-01]
    • Key Policy Enforcements:
      • Direct deletion of keys (kms:ScheduleKeyDeletion) requires approval from

    2 of 3 designated security trustees (CISO, Head of Infrastructure, Lead Compliance Officer).

    • Minimum pending deletion window: 30 calendar days.
    • Emergency key disabling (kms:DisableKey) dispatches real-time P1 alert CRYPTOGRAPHIC_KEY_DISABLED to the central SOC.
    4. Multi-Region Replication & Cross-Region Disaster Recovery [MC-RR-01]
    • Primary Key: us-east-1 (mrk-8812a).
    • Replicated Key: us-west-2 (mrk-8812a).
    • Replicated keys share identical key material and key ID, allowing databases replicated to us-west-2 to decrypt ciphertexts locally with < 2 ms latency during disaster recovery failovers.

    Invariants and Contracts

    Zero Master Key Export Invariant [INV-KMS-01]
      Master Key Encryption Keys (KEKs) must never exit the physical HSM hardware boundary in plaintext.
      API operations attempting to export raw private master key bytes are blocked by hardware policies.
    
    Mandatory Envelope Encryption Model [INV-KMS-02]
      Workloads storing customer PII or financial ledger records must use envelope encryption.
      Encrypting application datasets larger than 4 KB directly with KMS master keys is prohibited.
    
    Dual-Custody Deletion Protection [INV-KMS-03]
      Scheduling key deletion requires M-of-N dual-authorization approval.
      Single-operator key destruction requests are rejected by IAM Service Control Policies.
    

    Explicit Unknowns

    • AWS KMS API throughput throttling limits during sudden 50,000 TPS batch ledger reconciliation events (G-1).
    • Quantum computing Shor's algorithm impact on RSA/ECC key exchanges prior to NIST post-quantum migration (G-2).

    Traceability

    ClaimClassificationSourceFreshness
    14 million customer accountsprovidedCustomer base intakeCurrent
    FIPS 140-3 Level 3 HSM complianceprovidedRegulatory compliance mandateCurrent
    Incident SEC-4122 memory leak breachprovidedPost-mortem incident recordHistorical
    Latency budget p99 <= 10 msprovidedPerformance SLACurrent
    Multi-region KMS key replication (us-east-1/west-2)decidedMarcus Vance & David O'Reilly2026-09-15
    Automated 365-day KEK rotationdecidedArchitectural invariant MC-LC-012026-09-15

    Verification

    No validator was supplied, so no command was run.

    Reviewer self-check against key management architecture standards:

    • Hardware Isolation: PASS. Master keys isolated in FIPS 140-3 Level 3 HSM; raw keys never exported.
    • Envelope Encryption: PASS. Two-tier KEK/DEK pattern ensures sub-10ms performance and memory safety.
    • Disaster Recovery: PASS. Multi-region replicated keys enable seamless cross-region failover.
    • Markdown Hygiene: PASS. Native Markdown syntax strictly adheres to rule_markdown.md.

    Open Decisions

    • DEC-KMS-01: David O'Reilly to determine whether external key stores (XKS) connected to on-premises physical Thales Luna HSMs should be mandated for ultra-high-value sovereign wealth tiers (Owner: David O'Reilly).

    Next steps

    1. Marcus Vance configures Terraform manifests for AWS KMS Multi-Region Customer Managed Keys.
    2. Platform team embeds the AWS Encryption SDK with envelope caching into core microservice libraries.
    3. Conduct disaster recovery game day verifying database decryption in us-west-2 during simulated primary key outage.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Design envelope encryption and KEK/DEK hierarchiesDefine automated key rotation and re-encryption pathsEstablish dual-custody and hardware-backed security rulesMap cryptographic dependencies across trust boundariesArchitect recovery and compromise handling procedures

    About this skill

    What it does

    This skill owns cross-system architecture for cryptographic key material and the services that control it. It defines purpose, hierarchy, custody, authorization, lifecycle, dependencies, evidence, compromise handling, recoverability, migration, algorithm transition, and destruction across workloads and trust boundaries.

    Use it when

    • Encryption, signing, MAC, wrapping, derivation, tokenization, attestation, or trust-anchor keys serve multiple consumers
    • Root/master/key-encryption/data/signing keys form hierarchies or cross trust domains
    • Provider-managed, customer-managed, imported, external, hardware-backed, software-held, or workload-local custody must be compared
    • Key creation, activation, distribution, use, suspension, rotation, revocation, recovery, destruction, and evidence span systems
    • Aliases, versions, ciphertext metadata, wrapped data keys, signatures, certificates, backups, replicas, and consumers must remain resolvable
    • Rotation requires dual-read/write, rewrap, re-encryption, resigning, rollback, or long-lived verification

    For example: “Compliance asked how we rotate the database encryption key. We have one key, created in 2021, and the answer appears to be that we can't.”

    What you get

    • architecture/key-management-architect/README.md
    • architecture/key-management-architect/00-overview/key-management-architect-overview.md
    • architecture/key-management-architect/verification/fitness-self-check.md

    Plus one page per business module, only where your evidence calls for it: {module}/authn.md, {module}/authz.md, {module}/session.md, {module}/secrets.md, {module}/audit.md.

    All paths are relative to the output folder you choose.

    What it will not do

    Do not use merely to configure one KMS/HSM, generate/import/rotate one key, encrypt data, choose AES/RSA, issue a certificate, operate PKI, manage application secrets, fix cloud IAM, call a vendor SDK/CLI, or implement an enclave.

    How it works

    1. Check keys are the concern, not secrets in general.
    2. Classify keys by what they protect and who may use them.
    3. Fix custody: who can use a key, and who can export it.
    4. Design rotation with the re-encryption path.
    5. State the recovery position honestly.
    6. Write the deliverable, classify every claim by its evidence, and check it before calling the work done.

    What's in the package

    Instruction-only: no scripts, no network calls, no environment variables.

    • LICENSE.txt
    • SKILL.md
    • agents/openai.yaml
    • assets/output-template-contract.md
    • assets/output-template-domain.md
    • assets/output-template-fitness.md
    • assets/output-template-mechanism.md
    • references/domain-rules.md
    • references/operating-rules.md
    • references/output-contract.md

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 12 days ago

    • Passed all security checks, Safe to install

    Listed12 days ago

    What's inside

    Frequently Asked Questions