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

Module crypto

Module crypto 

Source
Expand description

Cryptographic operations for Eidetica authentication

This module provides signature generation and verification for authenticating entries in the database. The PublicKey and PrivateKey enums enable crypto-agility by dispatching to algorithm-specific implementations.

Enums§

PrivateKey
Algorithm-agnostic signing key for creating signatures.
PublicKey
Algorithm-agnostic public key for signature verification.

Constants§

CHALLENGE_SIZE
Size of authentication challenges in bytes
ED25519_PRIVATE_KEY_SIZE
Size of Ed25519 private keys in bytes
ED25519_PUBLIC_KEY_SIZE
Size of Ed25519 public keys in bytes
ED25519_SIGNATURE_SIZE
Size of Ed25519 signatures in bytes

Functions§

create_challenge_response
Create a challenge response by signing a challenge
generate_challenge
Generate random challenge bytes for authentication
generate_keypair
Generate a new keypair using the default algorithm (Ed25519).
sign_data
Sign data and return a base64-encoded signature.
sign_entry
Sign an entry and return a base64-encoded signature string.
verify_challenge_response
Verify a challenge response
verify_entry_signature
Verify an entry’s signature using an algorithm-agnostic PublicKey.