Configuring hsm for key storage

From oyi77/1ai-skills · View interactive version

Configuring hsm for key storage is an AI agent skill from the GitHub repository oyi77/1ai-skills. Use when hardware Security Modules (HSMs) are tamper-resistant physical devices that safeguard cryptographic keys and perform cryptographic operations in a hardened environment. Keys stored in an HSM never lea. Use when working with configuring hsm for key storage.

How to use this skill

Skill file

Configuring HSM for Key Storage

Overview

Hardware Security Modules (HSMs) are tamper-resistant physical devices that safeguard cryptographic keys and perform cryptographic operations in a hardened environment. Keys stored in an HSM never leave the device boundary, providing the highest level of key protection. This skill covers configuring HSMs using the PKCS#11 standard interface, including key generation, signing, encryption, and key management using both physical HSMs and SoftHSM2 for development.

When to Use

Trigger phrases:

Prerequisites

Objectives

Key Concepts

This section covers key concepts for configuring hsm for key storage.

HSM Compliance Levels

| FIPS Level | Protection | Use Case |

|-----------|-----------|----------|

| FIPS 140-2 Level 1 | Software only | Development |

| FIPS 140-2 Level 2 | Tamper-evident, role-based auth | General production |

| FIPS 140-2 Level 3 | Tamper-resistant, identity-based auth | Financial, government |

| FIPS 140-2 Level 4 | Physical tamper response | Military, classified |

PKCS#11 Architecture

Application --> PKCS#11 API --> HSM Provider --> Hardware HSM
                                    |
                              (SoftHSM2 for dev)

Key Objects in PKCS#11

| Object Type | Description | Operations |

|-------------|-------------|-----------|

| CKO_SECRET_KEY | Symmetric keys (AES) | Encrypt, Decrypt, Wrap |

| CKO_PUBLIC_KEY | Public keys (RSA, EC) | Verify, Encrypt, Wrap |

| CKO_PRIVATE_KEY | Private keys (RSA, EC) | Sign, Decrypt, Unwrap |

| CKO_CERTIFICATE | X.509 certificates | Storage, retrieval |

Security Considerations

Validation Criteria

When NOT to Use

Red Flags

Verification

Process

  1. Analyze the task requirements
  2. Apply domain expertise
  3. Verify output quality

Anti-Rationalization Table

| Rationalization | Reality |

|---|---|

| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |

| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |

| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.