Module encryption

Module encryption 

Source
Expand description

End-to-end encryption module for MockForge

This module has been refactored into sub-modules for better organization:

  • algorithms: Core encryption algorithms (AES-GCM, ChaCha20-Poly1305)
  • key_management: Key generation, storage, and lifecycle management
  • auto_encryption: Automatic encryption configuration and processing
  • derivation: Key derivation functions (Argon2, PBKDF2)
  • errors: Error types and handling for encryption operations

§Key Management Architecture

Modules§

utils
Utility functions for encryption operations

Structs§

AutoEncryptionConfig
Configuration for automatic encryption of sensitive fields
AutoEncryptionProcessor
Automatic encryption processor for sensitive data
ContextualError
Enhanced error with context
EncryptionKey
Cryptographic key for encryption operations
ErrorContext
Error context for better debugging
FileKeyStorage
File-based key storage implementation
KeyManagementStore
Key store for managing encryption keys
KeyStore
Key store for managing encryption keys
MasterKeyManager
Master key manager for OS keychain integration
WorkspaceKeyManager
Workspace key manager for handling per-workspace encryption keys

Enums§

EncryptionAlgorithm
Encryption algorithms supported
EncryptionError
Errors that can occur during encryption/decryption operations
ErrorRecoveryStrategy
Error recovery strategies
ErrorSeverity
Error severity levels
KeyDerivationMethod
Key derivation methods

Traits§

KeyStorage
Key storage interface for different key storage backends

Functions§

decrypt_with_key
Decrypt text using a stored key
encrypt_with_key
Encrypt text using a stored key
get_key_store
Get the global key store
init_key_store
Initialize the global key store

Type Aliases§

EncryptionResult
Result type alias for encryption operations
Result