Sketch fn signature for verification
This commit is contained in:
parent
b5898aa958
commit
dbf84ff1b6
|
@ -17,7 +17,7 @@ pub fn commit_polynomial(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compute a witness polynomial in that satisfies `witness(x) = (f(x)-v)/(x-u)`
|
/// Compute a witness polynomial in that satisfies `witness(x) = (f(x)-v)/(x-u)`
|
||||||
fn generate_element_proof(
|
pub fn generate_element_proof(
|
||||||
element_index: usize,
|
element_index: usize,
|
||||||
polynomial: &DensePolynomial<Fr>,
|
polynomial: &DensePolynomial<Fr>,
|
||||||
roots_of_unity: &Powers<Bls12_381>,
|
roots_of_unity: &Powers<Bls12_381>,
|
||||||
|
@ -36,6 +36,16 @@ fn generate_element_proof(
|
||||||
Ok(proof)
|
Ok(proof)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn verify_element_proof(
|
||||||
|
element: &Fr,
|
||||||
|
commitment: &Commitment<Bls12_381>,
|
||||||
|
proof: &Proof<Bls12_381>,
|
||||||
|
element_index: usize,
|
||||||
|
roots_of_unity: &Powers<Fr>,
|
||||||
|
) -> bool {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use crate::kzg::commit_polynomial;
|
use crate::kzg::commit_polynomial;
|
||||||
|
|
Loading…
Reference in New Issue