dcrypt_params/traditional/ecdh.rs
1//! Constants for Elliptic Curve Diffie-Hellman
2
3// We'll refer to the ECDSA parameters from the same curve, but not import them
4// directly to avoid the unused import warning
5
6/// Size of shared secret for ECDH using P-256 in bytes
7pub const ECDH_P256_SHARED_SECRET_SIZE: usize = 32;
8
9/// Size of shared secret for ECDH using P-384 in bytes
10pub const ECDH_P384_SHARED_SECRET_SIZE: usize = 48;
11
12/// Size of public key for ECDH using P-256 in bytes (uncompressed format)
13pub const ECDH_P256_PUBLIC_KEY_SIZE: usize = 65;
14
15/// Size of public key for ECDH using P-384 in bytes (uncompressed format)
16pub const ECDH_P384_PUBLIC_KEY_SIZE: usize = 97;
17
18/// Size of private key for ECDH using P-256 in bytes
19pub const ECDH_P256_PRIVATE_KEY_SIZE: usize = 32;
20
21/// Size of private key for ECDH using P-384 in bytes
22pub const ECDH_P384_PRIVATE_KEY_SIZE: usize = 48;