Implement Lelantus Spark's Chaum Pedersen proof with a FROST algorithm

This commit is contained in:
Luke Parker
2022-05-31 02:09:09 -04:00
parent e504266c80
commit 6d9221d56c
11 changed files with 637 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ pub trait Algorithm<C: Curve>: Clone {
/// verification fails
fn verify_share(
&self,
l: u16,
verification_share: C::G,
nonce: C::G,
share: C::F,
@@ -154,6 +155,7 @@ impl<C: Curve, H: Hram<C>> Algorithm<C> for Schnorr<C, H> {
fn verify_share(
&self,
_: u16,
verification_share: C::G,
nonce: C::G,
share: C::F,

View File

@@ -217,6 +217,7 @@ fn complete<C: Curve, A: Algorithm<C>>(
// within n / 2 on average, and not gameable to n, though that should be minor
for l in &sign_params.view.included {
if !sign_params.algorithm.verify_share(
*l,
sign_params.view.verification_share(*l),
sign.B[l][0] + (sign.B[l][1] * sign.binding),
responses[l]