All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
P value in the MAC of a credential was previously being marked
unconditionally as cind (a computationally independent point, for
which the client does not know its relative discrete log to any linear
combination of other cind points). While this is usually correct,
it is not true when the credential is "incomplete"; that is, marked
by ? in the CMZ statement (see the P? credential in
tests/rate_limiting.rs, for example).
Incomplete credentials are not expected to have valid MACs at all, and
so their P values can be freely chosen by the client. The previous
assumption that the P value was cind thus led to unsound protocols
in some cases involving such incomplete credentials. The fix is to no
longer mark P as cind for incomplete credentials. Thanks to Lloyd
Fournier of Frostsnap for the report.A automatically via a RFC 9380
hash-to-group of the generator. Applications no longer need to call
cmz_group_init at startup.CMZGroup trait, cmz_generator_a function, and curve features
for the automatic derivation. Ristretto support is enabled by default;
P-256 and secp256k1 are available through the p256 and k256
features.sigma-compiler 0.3.0, rand 0.10, group 0.14, ff 0.14Point types must now implement
group::prime::PrimeGroup, group::GroupEncoding, and
hash2group::FromHash<hash2group::rfc9380::ExpandMsgXmd<sha2::Sha512>>.
This combination of traits is now called CMZGroup.rng parameter in various APIs generated by cmz changed from
type &mut (impl CryptoRng + RngCore) to type &mut (impl CryptoRng +
Rng) (due to the update to rand 0.10)cmz simultaneously for more than one group was
broken before, and is now fixed.bincode to postcard for serialization. The bincode
crate is no longer maintained. Note that this causes a binary
incompatibility with previous versions of the cmz crate. That is,
previous versions and this one will not interoperate.CMZCredential, skip the private key.
That way, you don't accidentally send the private key if the issuer
creates a credential completely on its own (not via a typical
credential issuing protocol) and sends it to the client. Thanks to
Morgan Hill from Radically Open Security.serialize_with_privkey and deserialize_with_privkey if you
explicitly do want to keep the private key when serializing a
CMZCredential (for example, if the issuer is saving a credential to
its own storage).set_keypair function to CMZ credentials. This function sets
both the private and public keys, without recomputing the public key
from the private key. Using this function saves computation when you
have both keys at hand.dump feature enables the corresponding dump feature of the
sigma_compiler crate.sigma-compiler version 0.2.0sigma_compiler macro. We need the generated statements to be
identical, not just equivalent (e.g., the same statements in a
different order) because the order of the elements in the proof
depends on the order of the statements.