Changelog¶
All notable changes to dash-pkc will be documented in this file.
The format is based on Keep a Changelog, and this crate adheres to Semantic Versioning.
Unreleased¶
0.2.0-beta - 2026-10-20¶
Added¶
Bls{Public,Secret}Key::negate,BlsSecretKey::mul_tweak,EcdsaPublicKey::negateandEcdsaSecretKey::mul_tweak.portablefeature, forwardingblst/portable, for binaries that run on any CPU of the target architecture.to::<S>()onBlsPkBytes,BlsSkBytes,BlsSigBytes,BlsIesBlobBytesandBlsIesMultiBytes, which validates the bytes under schemeSand returns the typed value.EcdsaRecSigBytes::from_bytes_mask, which accepts any header byte and masks it into a recovery id and compression flag.ECDSA_REC_SIG_LEN, the length of a compact recoverable signature.BlsSecretKey::sign_message,BlsSkShare::sign_message,BlsPublicKey::verify_message,BlsSignature::{fast,secure}_verify_aggregates_message,BlsSignature::verify_aggregates_messagesandBlsScheme::plaintext_msg, taking a message of any length. The legacy scheme signs the message's SHA-256 digest.is_canonical::<S>()onBlsPkBytes,BlsSigBytesandBlsSkBytes, behind theblsfeature. It rejects bytes that decode under schemeSonly after masking, or not at all. Null bytes count as canonical.
Changed¶
- The minimum supported Rust version is raised from 1.85 to 1.89.
blsrequires ADX on x86_64 unlessportableis enabled.- Signing and verification methods are renamed to name their input.
BlsSecretKey::sign,BlsSkShare::sign,BlsPublicKey::verifyandBlsSignature::{fast,secure}_verify_aggregatesgain a_digestsuffix and take a 32-byte hashed message.BlsSignature::verify_aggregatesis renamed toverify_aggregates_digestsand takes&[[u8; 32]].BlsScheme::msg_refis renamed todigest_msg, andBlsScheme::Msgis passed by value asMsg<'a>.EcdsaSecretKey::signandEcdsaPublicKey::verifyare renamed tosign_digestandverify_digest.EddsaSecretKey::signandEddsaPublicKey::verifyare renamed tosign_messageandverify_message.
EcdsaSecretKey::negatetakes&selfand returns the negated key asResult<Self, EcdsaError>. It previously negated in place and returned(), and now matches the other tweaks. A call that drops the return value still compiles, though warned ifunused_must_useis enabled, but would otherwise leave the key as-is. Callers must bind the result, e.g.sk = sk.negate()?.EcdsaPublicKey::verify_digestnormalizes S before verifying, so a high-S signature verifies like its low-S twin. Callers refusing malleable signatures should check withEcdsaSignature::is_low_s.BlsPkBytes,BlsSkBytes,BlsSigBytes,BlsPkHash,BlsDhBytes,BlsIesBlobBytesandBlsIesMultiBytesdrop their scheme parameter. Callers drop the type argument and define the scheme when they exercise the operational type withto::<S>().-
The following types serialize as raw bytes for machine-readable formats, following changes to
dash-typesanddash-num. JSON and other human-readable formats are unaffected by this change.BlsPkBytes,BlsSigBytes,BlsPkHash,BlsShareId,BlsIes{Blob,Multi}Bytes,BlsPublicKey,BlsSignature,Bls{Pk,Sig}Share,BlsIes{Blob,Multi},EcdsaPkBytes,EcdsaSigBytes,EcdsaRecSigBytes,EcdsaPkHash,EcdsaPublicKey,EcdsaSignature,EcdsaRecSignature,EddsaPkBytes,EddsaSigBytes,EddsaPkHash,EddsaPublicKey,EddsaSignature. - Theserdefeature no longer impliescodec.BlsIes{Blob,Multi}andBlsIes{Blob,Multi}Bytesserialize as their wire image and implementSerializeandDeserializeonly withserdeandcodecenabled, serving as the exception.- Callers that relied on
serdeto enablecodecmust enable it explicitly. - Decoding
BlsIes{Blob,Multi}Bytes(and by extensionBlsIes{Blob,Multi}), enforces limits on lengths and counts. - A ciphertext length, blob count or blob length above
MAX_SER_SIZEis rejected even when enough bytes remain. - A value past the remaining input is reported as
DecodeError::Eof. BlsIesMultiBytesrejects more thanMAX_IES_RECIPIENTSciphertexts.BlsScheme::sk_to_bytesreturnsZeroizing<[u8; 32]>instead of a bare array. Code that binds the result as[u8; 32]must dereference it.EcdsaRecSigBytes::from_rawis renamed tofrom_bytes.
- Callers that relied on
0.1.0-beta - 2026-09-15¶
- Initial release.