1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Cryptographic primitives used by Ave.
//!
//! The crate exposes:
//! - hashes with algorithm identifiers
//! - Ed25519 key generation, signing and verification
//! - signed payloads with timestamp and content hash
//! - compact string formats for hashes, public keys and signatures
//!
//! Current identifiers:
//! - `B`: Blake3 digest
//! - `E`: Ed25519 key or signature
//!
//! Secret keys are kept in encrypted memory through `memsecurity` and are
//! decrypted only when a signing operation needs them.
//!
//! ```rust
//! use ave_identity::{BLAKE3_HASHER, Hash, KeyPair, KeyPairAlgorithm};
//!
//! let keypair = KeyPair::generate(KeyPairAlgorithm::Ed25519).unwrap();
//! let digest = BLAKE3_HASHER.hash(b"hello");
//! let signature = keypair.sign(digest.hash_bytes()).unwrap();
//!
//! assert!(keypair.public_key().verify(digest.hash_bytes(), &signature).is_ok());
//! ```
pub use CryptoError;
pub use ;
pub use ;
pub use ;
pub use TimeStamp;