Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative VK construction #23

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ring/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use common::Proof;
pub use piop::index;

use crate::piop::{RingCommitments, RingEvaluations};
pub use crate::piop::{params::PiopParams, ProverKey, VerifierKey};
pub use crate::piop::{params::PiopParams, ProverKey, VerifierKey, FixedColumnsCommitted};

mod piop;
pub mod ring;
Expand Down
13 changes: 12 additions & 1 deletion ring/src/piop/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,23 @@ impl<E: Pairing> VerifierKey<E::ScalarField, KZG<E>> {
pub fn from_ring_and_kzg_vk<G: SWCurveConfig<BaseField=E::ScalarField>>(
ring: &Ring<E::ScalarField, E, G>,
kzg_vk: RawKzgVerifierKey<E>,
) -> Self {
Self::from_commitment_and_kzg_vk(FixedColumnsCommitted::from_ring(ring), kzg_vk)
}

pub fn from_commitment_and_kzg_vk(
commitment: FixedColumnsCommitted<E::ScalarField, KzgCommitment<E>>,
kzg_vk: RawKzgVerifierKey<E>,
) -> Self {
Self {
pcs_raw_vk: kzg_vk,
fixed_columns_committed: FixedColumnsCommitted::from_ring(ring),
fixed_columns_committed: commitment,
}
}

pub fn commitment(&self) -> FixedColumnsCommitted<E::ScalarField, KzgCommitment<E>> {
self.fixed_columns_committed.clone()
}
}


Expand Down
Loading