Skip to main content

Module keys

Module keys 

Source
Expand description

Cryptographic key types with secure memory handling.

This module provides key types that ensure sensitive key material is:

  • Zeroized on drop to prevent memory leaks
  • Never exposed in debug output
  • Compared in constant time to prevent timing attacks

§Security

All key types in this module are designed with defense-in-depth:

  • SecretKey does not implement Clone to prevent accidental duplication
  • Debug output is redacted to prevent logging of key material
  • Comparison uses constant-time algorithms

Structs§

SecretKey
A 32-byte secret key with automatic zeroization.

Enums§

SecretKeyError
Errors related to secret key operations.

Constants§

SECRET_KEY_LEN
The length of a secret key in bytes.