Expand description
Secure memory management for cryptographic operations
§Secure Memory Management for Cryptographic Operations
This module provides memory-protected storage for cryptographic keys and sensitive data. All allocations are automatically zeroized on drop and protected against memory dumps.
§Security Features
- Automatic zeroization on drop (prevents key recovery)
- Memory locking to prevent swapping to disk
- Protected allocation regions
- Constant-time comparison operations
- Guard pages to detect buffer overflows
§Performance Features
- Pool-based allocation to reduce fragmentation
- Batch allocation for multiple keys
- Efficient reuse of protected memory regions
- Minimal overhead for secure operations
Structs§
- Pool
Stats - Statistics for secure memory pool
- Secure
Memory - Secure memory container that automatically zeroizes on drop
- Secure
Memory Pool - Pool for managing secure memory allocations
- Secure
String - Secure string with automatic zeroization
- Secure
Vec - Secure vector with automatic zeroization
Enums§
- Secure
Memory Error - Error types for secure memory operations
Functions§
- allocate_
secure - Convenience function to allocate secure memory from global pool
- global_
secure_ pool - Get the global secure memory pool
- secure_
string_ with_ capacity - Convenience function to create a secure string from global pool
- secure_
vec_ with_ capacity - Convenience function to create a secure vector from global pool