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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! Common cryptographic utilities shared across implementations
//!
//! This module provides low-level cryptographic primitives used by
//! VRF, KES, and DSIGN implementations, organized into submodules:
//!
//! - [`error`] - Error types and result aliases
//! - [`curve`] - Edwards curve point and scalar operations
//! - [`hash`] - Hashing utilities (SHA-512, etc.)
//! - [`traits`] - Common traits (SignableRepresentation, ConstantTimeEq)
//! - [`security`] - Security utilities (zeroize, etc.)
//! - [`vrf_constants`] - VRF suite identifiers and domain separation constants
//!
//! # Examples
//!
//! ```rust
//! use cardano_crypto::common::{hash_sha512, zeroize};
//!
//! let data = b"example";
//! let hash = hash_sha512(data);
//! assert_eq!(hash.len(), 64);
//!
//! let mut secret = [0x55u8; 8];
//! zeroize(&mut secret);
//! assert_eq!(secret, [0u8; 8]);
//! ```
/// Security-related utilities and constant-time operations
// Re-export commonly used types and functions
pub use ;
pub use ;
pub use hash_sha512;
pub use zeroize;
pub use ;
pub use ;
/// Deprecated alias for backwards compatibility
///
/// # Example
///
/// ```rust
/// use cardano_crypto::common::Result;
///
/// fn crypto_operation() -> Result<()> {
/// Ok(())
/// }
/// # crypto_operation().unwrap();
/// ```
pub type Result<T> = Result;