mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Implement Lelantus Spark's Chaum Pedersen proof with a FROST algorithm
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user