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¶
Added¶
EcdsaSecretKey::dh_exchange, emitting adh::EcdsaShared, which holds the compressed shared point atdh::ECDSA_SHARED_LENlength.EcdsaSecretKey::encrypt_ss_aes256cbcpkcs7_unauth_sha256dhandEcdsaSecretKey::decrypt_ss_aes256cbcpkcs7_unauth_sha256dh, the encryption scheme defined in DIP-0015 used by DashPay for contact requests.EcdsaError::InvalidCiphertext, for an envelope that is malformed or badly padded.
Changed¶
- The BLS-IES scheme has been moved to
dash_pkc::dhand renamed to reflect its explicit construction.dash_pkc::blsno longer exports them.BlsIesBlob,BlsIesMulti,BlsIesBlobBytesandBlsIesMultiBytesare nowdh::BlsEsEnvelope,dh::BlsEsMultiEnvelope,dh::BlsEsEnvelopeBytesanddh::BlsEsMultiEnvelopeBytes. TheirTypeId::TYPE_IDvalues change with their names.- Their
dataandblobsaccessors are nowciphertextandciphertexts,to_blobis nowto_envelope. MAX_IES_RECIPIENTSis nowdh::BLS_MAX_MULTI_RECIPIENTS,IV_SEED_LENis nowdh::BLS_IV_SEED_LEN.BlsPublicKey::ies_encrypt_asandBlsPublicKey::ies_encrypt_multi_asare nowBlsPublicKey::encrypt_es_aes256cbc_unauth_rawdh_asandBlsPublicKey::encrypt_multi_es_aes256cbc_unauth_rawdh_as.BlsSecretKey::ies_decrypt_asandBlsSecretKey::ies_decrypt_multi_asare nowBlsSecretKey::decrypt_es_aes256cbc_unauth_rawdh_asandBlsSecretKey::decrypt_multi_es_aes256cbc_unauth_rawdh_as.BlsScheme::ies_seal_as,BlsScheme::ies_open_asandBlsScheme::ies_keyare nowBlsScheme::encrypt_es_aes256cbc_unauth_rawdh_as,BlsScheme::decrypt_es_aes256cbc_unauth_rawdh_asandBlsScheme::rawdh_key.BlsDhBytesis nowdh::BlsShared,BLS_DH_LENis nowdh::BLS_SHARED_LEN.
- The
ecdsafeature now depends onaesandsha2.
0.3.0-beta - 2026-11-07¶
Added¶
BlsSecretKey::recover_sharesandBlsScheme::recover_sk_shares, recovering a master secret key from threshold shares by interpolation in the scalar field.BlsScheme::is_canonical_pkandBlsScheme::is_canonical_sig, each scheme's rule foris_canonical::<S>().BlsScheme::g1_bytesandBlsScheme::g2_bytes, each scheme's byte layout of a point;BlsScheme::pk_ietf_bytes, the IETF compressed form of a G1 encoding in that layout, andBlsScheme::sig_ietf_x_bytes, thexof a G2 encoding in the IETF compressed layout with the sign bit clear.BlsPublicKey::ies_encrypt_as,BlsPublicKey::ies_encrypt_multi_as,BlsSecretKey::ies_decrypt_asandBlsSecretKey::ies_decrypt_multi_as, which take the BLS-IES symmetric key from the leading 32 bytes of the shared point's encoding under a schemeTthe caller names, andBlsScheme::dh_bytes_as,BlsScheme::ies_seal_asandBlsScheme::ies_open_asbeneath them.
Changed¶
BlsPkBytes::to::<BlsScChia>()andBlsPublicKey::<BlsScChia>::from_bytesreadx = 0with the sign bit set, (0, -2), as the reference implementation does.is_canonical::<BlsScChia>()onBlsPkBytesandBlsSigBytesaccepts legacy encodings of anxwith no point on the curve, as the reference implementation does; for signatures, only with the sign bit clear.to::<BlsScChia>()still refuses them, having no point to return.
Removed¶
BlsPublicKey::ies_encrypt,BlsPublicKey::ies_encrypt_multi,BlsSecretKey::ies_decrypt,BlsSecretKey::ies_decrypt_multi,BlsScheme::ies_sealandBlsScheme::ies_open, in favour of their_asforms, which name the encoding the BLS-IES symmetric key is read from.
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.