diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dbb335a9277f5ebff035f490f7c97666d0df3f9..b6bfc5215db104ff41cc216d638cc600e8c64450 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ +# CHANGELOG + ## Pending -- MarlinPC's `supported_degree` fix. ### Breaking changes @@ -8,3 +9,19 @@ ### Improvements ### Bug fixes + +## v0.3.0 + +### Breaking changes + +- [\#78](https://github.com/arkworks-rs/poly-commit/pull/78) Fix MarlinPC's CommitterKey to return the correct `supported_degree`. + +### Features + +### Improvements + +### Bug fixes + +## v0.2.0 + +- initial release of `ark-poly-commit`. \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 53f10ec0beab5070044f30319500bd57eba9d787..e606cd1bd97ce0279298b05f4f603c576295006d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ark-poly-commit" -version = "0.2.0" +version = "0.3.0" authors = [ "Alessandro Chiesa <alexch@berkeley.edu>", "Mary Maller <mary.maller.15@ucl.ac.uk>", @@ -21,15 +21,15 @@ license = "MIT/Apache-2.0" edition = "2018" [dependencies] -ark-serialize = { version = "^0.2.0", default-features = false, features = [ "derive" ] } -ark-ff = { version = "^0.2.0", default-features = false } -ark-ec = { version = "^0.2.0", default-features = false } -ark-poly = {version = "^0.2.0", default-features = false } +ark-serialize = { version = "^0.3.0", default-features = false, features = [ "derive" ] } +ark-ff = { version = "^0.3.0", default-features = false } +ark-ec = { version = "^0.3.0", default-features = false } +ark-poly = {version = "^0.3.0", default-features = false } -ark-std = { version = "^0.2.0", default-features = false } -ark-relations = { version = "^0.2.0", default-features = false, optional = true } -ark-r1cs-std = { version = "^0.2.0", default-features = false, optional = true } -ark-nonnative-field = { version = "^0.2.0", default-features = false, optional = true } +ark-std = { version = "^0.3.0", default-features = false } +ark-relations = { version = "^0.3.0", default-features = false, optional = true } +ark-r1cs-std = { version = "^0.3.0", default-features = false, optional = true } +ark-nonnative-field = { version = "^0.3.0", default-features = false, optional = true } hashbrown = { version = "0.9", optional = true } digest = "0.9" @@ -39,9 +39,9 @@ derivative = { version = "2", features = [ "use_core" ] } tracing = { version = "0.1", default-features = false, features = [ "attributes" ] } [dev-dependencies] -ark-ed-on-bls12-381 = { version = "^0.2.0", default-features = false } -ark-bls12-381 = { version = "^0.2.0", default-features = false, features = [ "curve" ] } -ark-bls12-377 = { version = "^0.2.0", default-features = false, features = [ "curve" ] } +ark-ed-on-bls12-381 = { version = "^0.3.0", default-features = false } +ark-bls12-381 = { version = "^0.3.0", default-features = false, features = [ "curve" ] } +ark-bls12-377 = { version = "^0.3.0", default-features = false, features = [ "curve" ] } blake2 = { version = "0.9", default-features = false } [profile.release] diff --git a/src/ipa_pc/mod.rs b/src/ipa_pc/mod.rs index 0202a4badec7c9ccfe6796a8e73c408b8466449b..03ca3f8c724259128465ba42233fe0d49f190304 100644 --- a/src/ipa_pc/mod.rs +++ b/src/ipa_pc/mod.rs @@ -149,7 +149,8 @@ impl<G: AffineCurve, D: Digest, P: UVPolynomial<G::ScalarField>> InnerProductArg let h_prime = vk.h.mul(round_challenge); - let mut round_commitment_proj = combined_commitment_proj + &h_prime.mul(combined_v.into()); + let mut round_commitment_proj = + combined_commitment_proj + &h_prime.mul(&combined_v.into_repr()); let l_iter = proof.l_vec.iter(); let r_iter = proof.r_vec.iter(); diff --git a/src/kzg10/mod.rs b/src/kzg10/mod.rs index 66b268840fa30e8eea6055130c00282093a6478c..e4f1c49c3b9318cb52d1edef53a12afef37aa767 100644 --- a/src/kzg10/mod.rs +++ b/src/kzg10/mod.rs @@ -344,8 +344,8 @@ where if let Some(random_v) = proof.random_v { gamma_g_multiplier += &(randomizer * &random_v); } - total_c += &c.mul(randomizer.into()); - total_w += &w.mul(randomizer); + total_c += &c.mul(randomizer.into_repr()); + total_w += &w.mul(randomizer.into_repr()); // We don't need to sample randomizers from the full field, // only from 128-bit strings. randomizer = u128::rand(rng).into(); diff --git a/src/marlin/marlin_pst13_pc/mod.rs b/src/marlin/marlin_pst13_pc/mod.rs index 696b2580c3309d917d3420c2b619e42bc74bcab3..9a268b23c36a26bb2c49c9045170b5835dfef0db 100644 --- a/src/marlin/marlin_pst13_pc/mod.rs +++ b/src/marlin/marlin_pst13_pc/mod.rs @@ -255,7 +255,7 @@ where .collect(); let beta_h: Vec<_> = betas .iter() - .map(|b| h.mul((*b).into()).into_affine()) + .map(|b| h.mul(&(*b).into_repr()).into_affine()) .collect(); let h = h.into_affine(); let prepared_h = h.into(); @@ -628,7 +628,7 @@ where if let Some(random_v) = proof.random_v { gamma_g_multiplier += &(randomizer * &random_v); } - total_c += &c.mul(randomizer.into()); + total_c += &c.mul(&randomizer.into_repr()); ark_std::cfg_iter_mut!(total_w) .enumerate() .for_each(|(i, w_i)| *w_i += &w[i].mul(randomizer)); @@ -636,8 +636,8 @@ where // only from 128-bit strings. randomizer = u128::rand(rng).into(); } - total_c -= &g.mul(g_multiplier.into()); - total_c -= &gamma_g.mul(gamma_g_multiplier.into()); + total_c -= &g.mul(&g_multiplier.into_repr()); + total_c -= &gamma_g.mul(&gamma_g_multiplier.into_repr()); end_timer!(combination_time); let to_affine_time = start_timer!(|| "Converting results to affine for pairing"); diff --git a/src/sonic_pc/mod.rs b/src/sonic_pc/mod.rs index 806221ed90b91a122999c456a88bf75e16d15a80..0782dfc1cd5b8733866e1b099bf0cded278c5f25 100644 --- a/src/sonic_pc/mod.rs +++ b/src/sonic_pc/mod.rs @@ -5,7 +5,7 @@ use crate::{LabeledCommitment, LabeledPolynomial, LinearCombination}; use crate::{PCRandomness, PCUniversalParams, PolynomialCommitment}; use ark_ec::{AffineCurve, PairingEngine, ProjectiveCurve}; -use ark_ff::{One, UniformRand, Zero}; +use ark_ff::{One, PrimeField, UniformRand, Zero}; use ark_std::rand::RngCore; use ark_std::{convert::TryInto, marker::PhantomData, ops::Div, vec}; @@ -60,7 +60,7 @@ impl<E: PairingEngine, P: UVPolynomial<E::Fr>> SonicKZG10<E, P> { let mut comm_with_challenge: E::G1Projective = comm.0.mul(curr_challenge); if let Some(randomizer) = randomizer { - comm_with_challenge = comm_with_challenge.mul(randomizer.into()); + comm_with_challenge = comm_with_challenge.mul(&randomizer.into_repr()); } // Accumulate values in the BTreeMap @@ -80,7 +80,7 @@ impl<E: PairingEngine, P: UVPolynomial<E::Fr>> SonicKZG10<E, P> { if let Some(randomizer) = randomizer { witness = proof.w.mul(randomizer); - adjusted_witness = adjusted_witness.mul(randomizer.into()); + adjusted_witness = adjusted_witness.mul(&randomizer.into_repr()); } *combined_witness += &witness;