alloy_rpc_types_beacon/constants.rs
1/// The Domain Separation Tag for hash_to_point in Ethereum beacon chain BLS12-381 signatures.
2///
3/// This is also the name of the ciphersuite that defines beacon chain BLS signatures.
4///
5/// See:
6/// <https://github.com/ethereum/consensus-specs/blob/ffa95b7b72149960c5aded5c95fb40d64bcab199/specs/phase0/beacon-chain.md#bls-signatures>
7/// <https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-bls-signature-04>
8pub const BLS_DST_SIG: &[u8] = b"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_";
9
10/// The number of bytes in a BLS12-381 public key.
11pub const BLS_PUBLIC_KEY_BYTES_LEN: usize = 48;
12
13/// The number of bytes in a BLS12-381 secret key.
14pub const BLS_SECRET_KEY_BYTES_LEN: usize = 32;
15
16/// The number of bytes in a BLS12-381 signature.
17pub const BLS_SIGNATURE_BYTES_LEN: usize = 96;