| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cometa.Pool.BlsKey
Description
Stake-pool BLS public keys and proofs of possession. Validation checks byte lengths only; it does not authenticate the key or verify its proof.
mkBlsKey publicKey proof validates 96 key bytes and 48 proof bytes.
Synopsis
- data BlsKey
- mkBlsKey :: ByteString -> ByteString -> Either Error BlsKey
- publicKeyBytes :: BlsKey -> ByteString
- possessionProofBytes :: BlsKey -> ByteString
- encodeCbor :: BlsKey -> ByteString
- decodeCbor :: ByteString -> Either Error BlsKey
Documentation
BLS public key (96 bytes) and possession proof (48 bytes). Only lengths are checked; construction does not verify group membership or proof validity. Equality and ordering compare public-key bytes, then proof bytes.
mkBlsKey :: ByteString -> ByteString -> Either Error BlsKey Source #
Validate public-key bytes (first argument, 96 bytes) and possession-proof
bytes (second argument, 48 bytes). InvalidPoolBlsKeyLength reports both
actual lengths. No cryptographic validation occurs.
publicKeyBytes :: BlsKey -> ByteString Source #
Exact 96 public-key bytes.
possessionProofBytes :: BlsKey -> ByteString Source #
Exact 48 possession-proof bytes.
encodeCbor :: BlsKey -> ByteString Source #
Fresh definite CBOR with shortest integer encodings. Re-encoding semantic data may change transaction identity.
decodeCbor :: ByteString -> Either Error BlsKey Source #
Decode the complete value. Definite or indefinite arrays and
nonminimal unsigned integers are accepted. All field bounds, arities, UTF-8
and trailing bytes are checked; violations return
InvalidPoolCbor. The original encoding is not retained.