跳到主要内容
uencoder

Cryptographic 关键 Management Reference

Reference 为键 generation, storage, rotation, derivation, 和 lifecycle 管理最佳实践.

Key Lifecycle

Cryptographic keys follow a lifecycle: generation, activation, rotation, deactivation, and destruction. Keys must be generated using cryptographically secure random sources to ensure unpredictability. Rotation frequency depends on the threat model and data sensitivity. Destroyed keys must be securely erased from all storage media including memory.

generation
CSPRNG required
crypto.getRandomValues
rotation
Periodic or event-driven
compromise triggers
destruction
Secure erase, zero memory
crypto.zeroFree

Storage and Hierarchy

Keys should be stored in a hierarchy with a master key protecting data-encryption keys. Hardware security modules (HSMs) or trusted execution environments (TEEs) provide the strongest protection for root keys. Key derivation functions like HKDF derive multiple keys from a master secret. Separation of duties ensures no single person has access to all key material.

HSM
Hardware-protected key storage
FIPS 140-2/3
hierarchy
Master -> DEK -> data
envelope encryption
HKDF
Derive keys from master
RFC 5869

相关工具

参考链接