Development Documentation (main branch) - For stable release docs, see docs.rs/eidetica

Module crypto

Module crypto 

Source
Expand description

Cryptographic functions for user system

Provides password hashing and key encryption using:

  • Argon2id for password hashing
  • AES-256-GCM for key encryption

Constants§

KEY_LENGTH
Derived key length for AES-256 (32 bytes)
NONCE_LENGTH
Nonce length for AES-GCM (12 bytes standard)
SALT_LENGTH
Salt string length for Argon2 (base64 encoded, 22 chars)

Functions§

decrypt_private_key
Decrypt a private key.
derive_encryption_key
Derive an encryption key from a password and salt using Argon2id
encrypt_private_key
Encrypt a private key with a password-derived encryption key.
hash_password
Hash a password using Argon2id
verify_password
Verify a password against its hash