dcrypt_algorithms/ec/b283k/
constants.rs

1//! Shared constants for sect283k1 operations
2
3/// Size of a sect283k1 scalar in bytes (283 bits -> 36 bytes)
4pub const B283K_SCALAR_SIZE: usize = 36;
5
6/// Size of a sect283k1 field element in bytes (283 bits -> 36 bytes)
7pub const B283K_FIELD_ELEMENT_SIZE: usize = 36;
8
9/// Size of an uncompressed sect283k1 point in bytes: format byte (0x04) + x-coordinate + y-coordinate
10pub const B283K_POINT_UNCOMPRESSED_SIZE: usize = 1 + 2 * B283K_FIELD_ELEMENT_SIZE; // 73 bytes
11
12/// Size of a compressed sect283k1 point in bytes: format byte (0x02/0x03) + x-coordinate
13pub const B283K_POINT_COMPRESSED_SIZE: usize = 1 + B283K_FIELD_ELEMENT_SIZE; // 37 bytes
14
15/// Size of the KDF output for sect283k1 ECDH-KEM (matches SHA-384 output)
16pub const B283K_KEM_SHARED_SECRET_KDF_OUTPUT_SIZE: usize = 48;