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

Return Option in more places #147

Merged
merged 82 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
f86f435
Attempt 2
dvdplm May 21, 2024
7891be5
Second iteration on the traits, and Signed and Bounded types
dvdplm May 22, 2024
bae4dd9
Relax bounds and cleanup Bounded<T>
dvdplm May 22, 2024
ba3c7ab
Relax bounds and cleanup of Signed<T>
dvdplm May 22, 2024
5cb00fb
Moar cleanup of Signed<T>
dvdplm May 22, 2024
f797a59
Instantiate U512Mod and the other sizes
dvdplm May 27, 2024
2b86c3e
Import the UxxxMod types
dvdplm May 27, 2024
168d47c
Start sorting out PaillierParams
dvdplm May 27, 2024
40db0c1
Add a neg() method to Signed – unclear if this is the right thing to do
dvdplm May 27, 2024
66e062b
Start sorting out the Paillier keys
dvdplm May 27, 2024
d37500a
Implement pow_signed and pow_signed_vartime
dvdplm May 29, 2024
045f2b0
Implement Neg for Signed<T>
dvdplm May 29, 2024
d641efc
Remove the ConditionallyNegatable impl for Signed
dvdplm May 30, 2024
9805814
Add a new ToMod trait to provide the to_mod method
dvdplm May 30, 2024
8e65579
Low hanging fruit paillier/
dvdplm May 30, 2024
7e61d5a
More low-hanging fruit in cggmp21
dvdplm May 30, 2024
0711859
Implement pow_bounded as a free standing function
dvdplm May 30, 2024
c3b37a4
Impl pow_signed_wide as free standing fn
dvdplm May 31, 2024
c5327e6
Impl pow_signed_extra_wide
dvdplm May 31, 2024
26dd709
Impl pow_signed_vartime
dvdplm May 31, 2024
99f0c7a
Switch to pre-relase version of k256
dvdplm Jun 3, 2024
d40fef5
Rename from_xof to uint_from_xof
dvdplm Jun 3, 2024
94510ac
Add clones where needed
dvdplm Jun 3, 2024
1d1ecfa
Switch to HybridArray
dvdplm Jun 3, 2024
b285d3d
ECDSA signatures changed a bit in the latest
dvdplm Jun 3, 2024
3b30e3b
Add the clones. Sigh.
dvdplm Jun 3, 2024
58ae16a
Cleanup
dvdplm Jun 3, 2024
939c47b
Add note to self
dvdplm Jun 3, 2024
2af6086
Sort out serde bounds after wrapping in `Odd`
dvdplm Jun 3, 2024
8a666c2
Merge branch 'master' into dp-update-crypto-bigint-104
dvdplm Jun 3, 2024
c050473
Sort out const NonZero construction with to_nz()
dvdplm Jun 4, 2024
b251a3e
Handle change in bits_vartime retval
dvdplm Jun 4, 2024
5d4e67a
Revert making PublicKeyPaillier.modulus an `Odd`
dvdplm Jun 4, 2024
23a5e05
Fix test failure in SecretKeyPaillier.to_precomputed
dvdplm Jun 5, 2024
04771c2
PaillierParams::HalUint needs ToMod as well
dvdplm Jun 5, 2024
3090602
Silence some warnings
dvdplm Jun 5, 2024
10b2f8c
cleanup
dvdplm Jun 5, 2024
520e324
Update HasWide to accomodate the upstream changes when splitting Uint…
dvdplm Jun 5, 2024
98f574e
Remove unused dependency
dvdplm Jun 21, 2024
3867029
Some docs and new todos
dvdplm Jun 21, 2024
52310c2
Better wording
dvdplm Jun 21, 2024
8c06b64
Update dependencies
dvdplm Jul 29, 2024
c6e1850
Consolidate traits and remove the to_mod impl in Signed (not used)
dvdplm Jul 29, 2024
1f4d76e
Consolidate imports
dvdplm Jul 29, 2024
0dff552
Merge branch 'master' into dp-update-crypto-bigint-104
dvdplm Jul 30, 2024
bf05cea
Vendor HashingSerializer
dvdplm Jul 30, 2024
860473f
Silence a few warnings
dvdplm Jul 31, 2024
87b06a3
Move the `misc` module into `uint`
dvdplm Jul 31, 2024
532a0fd
Remove the `HasWide` requirement for `ExtraWideUint` and the matching…
dvdplm Jul 31, 2024
fd0024f
Remove dead code from the Chain trait
dvdplm Jul 31, 2024
2c0e9be
Remove vendored hashing_serializer and patch it with upstream fix
dvdplm Jul 31, 2024
1bbacb8
Removing vendored module
dvdplm Jul 31, 2024
445108d
Tests for `Signed::neg(self)` (and some docs)
dvdplm Aug 1, 2024
a126a72
Add a todo
dvdplm Aug 2, 2024
088cc64
Add CheckedSub impl for Signed (with tests)
dvdplm Aug 2, 2024
30844a5
Merge branch 'master' into dp-update-crypto-bigint-104
dvdplm Aug 5, 2024
05f4ab1
Clean up dev deps
dvdplm Aug 5, 2024
196ee9a
Resolve a todo: displaydoc is updated
dvdplm Aug 5, 2024
ba0714a
Resolved todo: displaydoc is updated
dvdplm Aug 5, 2024
259df78
Normalize asserts and make sure we panic if bounds are OoB
dvdplm Aug 6, 2024
2d39288
More tests for Signed
dvdplm Aug 6, 2024
65fc99e
Add tests for PartialOrd on Signed
dvdplm Aug 6, 2024
834bcf9
Add tests to Bounded to illustrate the behaviour
dvdplm Aug 6, 2024
37044c7
Cleanup stale TODOs
dvdplm Aug 7, 2024
312f9ba
Move uint_from_xof
dvdplm Aug 19, 2024
f4f71c1
Move `pow_*` to a new `uint::pow` module
dvdplm Aug 19, 2024
b02782a
Adding pow.rs file
dvdplm Aug 19, 2024
d6a40fc
Proper justifications for `expect`s
dvdplm Aug 19, 2024
144e4f8
Rename ToMod –> ToMontgomery
dvdplm Aug 20, 2024
dd1f41c
Bump a few versions
dvdplm Aug 22, 2024
3131879
Revert PartialEq impl to use the derive instead. Implies strict boun…
dvdplm Aug 22, 2024
32c99d9
Merge branch 'master' into dp-update-crypto-bigint-104
dvdplm Aug 27, 2024
35a4244
Use pre-release version of hashing-serializer
dvdplm Aug 28, 2024
62ec55b
Fix wasm build?
dvdplm Aug 29, 2024
1ba240e
Add ecdsa to [patch] section
dvdplm Sep 12, 2024
f3c6796
verifying_key() returns Option
dvdplm Sep 12, 2024
c310c4e
Make bounded_from_scalar and signed_from_scalar return Option
dvdplm Sep 12, 2024
2634eaf
Fallout from returning Option
dvdplm Sep 12, 2024
43656ed
Prefer `contains`
dvdplm Sep 12, 2024
49d7eb3
Merge branch 'master' into dp-error-handling
dvdplm Sep 24, 2024
0b03b43
Merge branch 'master' into dp-error-handling
dvdplm Oct 15, 2024
da35145
Merge branch 'master' into dp-error-handling
fjarri Oct 18, 2024
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
17 changes: 9 additions & 8 deletions synedrion/src/cggmp21/entities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ impl<P: SchemeParams, I: Clone + Ord + PartialEq + Debug> KeyShare<P, I> {
}

/// Return the verifying key to which this set of shares corresponds.
pub fn verifying_key(&self) -> VerifyingKey {
pub fn verifying_key(&self) -> Option<VerifyingKey> {
// TODO (#5): need to ensure on creation of the share that the verifying key actually exists
// (that is, the sum of public keys does not evaluate to the infinity point)
self.verifying_key_as_point().to_verifying_key().unwrap()
self.verifying_key_as_point().to_verifying_key()
}

/// Returns the owner of this key share.
Expand Down Expand Up @@ -338,7 +338,8 @@ where
let hat_s = RandomizerMod::random(rng, &public_keys[&id_j]).retrieve();
let hat_r = RandomizerMod::random(rng, pk_i).retrieve();

let hat_cap_d = &all_cap_k[id_j] * P::signed_from_scalar(x_i.expose_secret())
let hat_cap_d = &all_cap_k[id_j]
* P::signed_from_scalar(x_i.expose_secret()).unwrap()
+ CiphertextMod::new_with_randomizer_signed(
&public_keys[&id_j],
&-hat_beta,
Expand Down Expand Up @@ -390,8 +391,8 @@ where
.iter()
.filter(|id| id != &&id_i)
.map(|id_j| {
P::signed_from_scalar(key_shares[id_j].secret_share.expose_secret())
* P::signed_from_scalar(&k_i)
P::signed_from_scalar(key_shares[id_j].secret_share.expose_secret()).unwrap()
* P::signed_from_scalar(&k_i).unwrap()
- hat_betas[&(id_j.clone(), id_i.clone())]
})
.sum();
Expand All @@ -401,8 +402,8 @@ where
.filter(|id| id != &&id_i)
.map(|id_j| hat_betas[&(id_i.clone(), id_j.clone())])
.sum();
let product_share_nonreduced = P::signed_from_scalar(x_i.expose_secret())
* P::signed_from_scalar(&k_i)
let product_share_nonreduced = P::signed_from_scalar(x_i.expose_secret()).unwrap()
* P::signed_from_scalar(&k_i).unwrap()
+ alpha_sum
+ beta_sum;

Expand Down Expand Up @@ -447,6 +448,6 @@ mod tests {
KeyShare::<TestParams, VerifyingKey>::new_centralized(&mut OsRng, &ids, Some(&sk));
assert!(shares
.values()
.all(|share| &share.verifying_key() == sk.verifying_key()));
.all(|share| &share.verifying_key().unwrap() == sk.verifying_key()));
}
}
15 changes: 11 additions & 4 deletions synedrion/src/cggmp21/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,21 @@ pub trait SchemeParams: Debug + Clone + Send + PartialEq + Eq + Send + Sync + 's
}

/// Converts a curve scalar to the associated integer type, wrapped in `Bounded`.
fn bounded_from_scalar(value: &Scalar) -> Bounded<<Self::Paillier as PaillierParams>::Uint> {
fn bounded_from_scalar(
value: &Scalar,
) -> Option<Bounded<<Self::Paillier as PaillierParams>::Uint>> {
const ORDER_BITS: u32 = ORDER.bits_vartime();
Bounded::new(Self::uint_from_scalar(value), ORDER_BITS).unwrap()
Bounded::new(Self::uint_from_scalar(value), ORDER_BITS)
}

/// Converts a curve scalar to the associated integer type, wrapped in `Signed`.
fn signed_from_scalar(value: &Scalar) -> Signed<<Self::Paillier as PaillierParams>::Uint> {
Self::bounded_from_scalar(value).into_signed().unwrap()
/// Returns `None` if:
/// - the bound provided by [`ORDER_BITS`] is invalid for the associated integer type from [`PaillierParams`];
/// - the scalar value encodes a negative value
fn signed_from_scalar(
value: &Scalar,
) -> Option<Signed<<Self::Paillier as PaillierParams>::Uint>> {
Self::bounded_from_scalar(value).and_then(Bounded::into_signed)
}

/// Converts an integer to the associated curve scalar type.
Expand Down
2 changes: 1 addition & 1 deletion synedrion/src/cggmp21/protocols/interactive_signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ mod tests {
for signature in signatures.values() {
let (sig, rec_id) = signature.to_backend();

let vkey = key_shares[&Id(0)].verifying_key();
let vkey = key_shares[&Id(0)].verifying_key().unwrap();

// Check that the signature can be verified
vkey.verify_prehash(&message.to_bytes(), &sig).unwrap();
Expand Down
31 changes: 17 additions & 14 deletions synedrion/src/cggmp21/protocols/presigning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
let aux = (&self.context.ssid_hash, &destination);
let psi0 = EncProof::new(
rng,
&P::signed_from_scalar(&self.context.k),
&P::signed_from_scalar(&self.context.k).unwrap(),
&self.context.rho,
self.context.aux_info.secret_aux.paillier_sk.public_key(),
&self.cap_k,
Expand Down Expand Up @@ -357,7 +357,8 @@

let cap_f =
CiphertextMod::new_with_randomizer_signed(pk, beta.expose_secret(), &r.retrieve());
let cap_d = &self.all_cap_k[destination] * P::signed_from_scalar(&self.context.gamma)
let cap_d = &self.all_cap_k[destination]
* P::signed_from_scalar(&self.context.gamma).unwrap()
+ CiphertextMod::new_with_randomizer_signed(
target_pk,
&-beta.expose_secret(),
Expand All @@ -370,7 +371,7 @@
&hat_r.retrieve(),
);
let hat_cap_d = &self.all_cap_k[destination]
* P::signed_from_scalar(self.context.key_share.secret_share.expose_secret())
* P::signed_from_scalar(self.context.key_share.secret_share.expose_secret()).unwrap()
+ CiphertextMod::new_with_randomizer_signed(
target_pk,
&-hat_beta.expose_secret(),
Expand All @@ -382,7 +383,7 @@

let psi = AffGProof::new(
rng,
&P::signed_from_scalar(&self.context.gamma),
&P::signed_from_scalar(&self.context.gamma).unwrap(),
&beta,
s.clone(),
r.clone(),
Expand All @@ -398,7 +399,7 @@

let hat_psi = AffGProof::new(
rng,
&P::signed_from_scalar(self.context.key_share.secret_share.expose_secret()),
&P::signed_from_scalar(self.context.key_share.secret_share.expose_secret()).unwrap(),
&hat_beta,
hat_s.clone(),
hat_r.clone(),
Expand All @@ -414,7 +415,7 @@

let hat_psi_prime = LogStarProof::new(
rng,
&P::signed_from_scalar(&self.context.gamma),
&P::signed_from_scalar(&self.context.gamma).unwrap(),
&self.context.nu,
pk,
&self.all_cap_g[self.my_id()],
Expand Down Expand Up @@ -556,8 +557,8 @@

let alpha_sum: Signed<_> = payloads.values().map(|p| p.alpha).sum();
let beta_sum: Signed<_> = artifacts.values().map(|p| p.beta.expose_secret()).sum();
let delta = P::signed_from_scalar(&self.context.gamma)
* P::signed_from_scalar(&self.context.k)
let delta = P::signed_from_scalar(&self.context.gamma).unwrap()
* P::signed_from_scalar(&self.context.k).unwrap()
+ alpha_sum
+ beta_sum;

Expand All @@ -567,7 +568,8 @@
.map(|artifact| artifact.hat_beta.expose_secret())
.sum();
let chi = P::signed_from_scalar(self.context.key_share.secret_share.expose_secret())
* P::signed_from_scalar(&self.context.k)
.unwrap()
* P::signed_from_scalar(&self.context.k).unwrap()
+ hat_alpha_sum
+ hat_beta_sum;

Expand Down Expand Up @@ -652,7 +654,7 @@

let psi_pprime = LogStarProof::new(
rng,
&P::signed_from_scalar(&self.context.k),
&P::signed_from_scalar(&self.context.k).unwrap(),
&self.context.rho,
pk,
&self.all_cap_k[self.my_id()],
Expand Down Expand Up @@ -784,7 +786,7 @@

let p_aff_g = AffGProof::<P>::new(
rng,
&P::signed_from_scalar(&self.context.gamma),
&P::signed_from_scalar(&self.context.gamma).unwrap(),

Check warning on line 789 in synedrion/src/cggmp21/protocols/presigning.rs

View check run for this annotation

Codecov / codecov/patch

synedrion/src/cggmp21/protocols/presigning.rs#L789

Added line #L789 was not covered by tests
beta,
s.to_mod(target_pk),
r.to_mod(pk),
Expand Down Expand Up @@ -816,12 +818,13 @@
// Mul proof

let rho = RandomizerMod::random(rng, pk);
let cap_h = (&self.all_cap_g[self.my_id()] * P::bounded_from_scalar(&self.context.k))
.mul_randomizer(&rho.retrieve());
let cap_h = (&self.all_cap_g[self.my_id()]
* P::bounded_from_scalar(&self.context.k).unwrap())
.mul_randomizer(&rho.retrieve());

Check warning on line 823 in synedrion/src/cggmp21/protocols/presigning.rs

View check run for this annotation

Codecov / codecov/patch

synedrion/src/cggmp21/protocols/presigning.rs#L821-L823

Added lines #L821 - L823 were not covered by tests

let p_mul = MulProof::<P>::new(
rng,
&P::signed_from_scalar(&self.context.k),
&P::signed_from_scalar(&self.context.k).unwrap(),

Check warning on line 827 in synedrion/src/cggmp21/protocols/presigning.rs

View check run for this annotation

Codecov / codecov/patch

synedrion/src/cggmp21/protocols/presigning.rs#L827

Added line #L827 was not covered by tests
&self.context.rho,
&rho,
pk,
Expand Down
22 changes: 13 additions & 9 deletions synedrion/src/cggmp21/protocols/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ impl<P: SchemeParams, I: Debug + Clone + Ord + Serialize> FinalizableToResult<I>

let p_aff_g = AffGProof::<P>::new(
rng,
&P::signed_from_scalar(self.inputs.key_share.secret_share.expose_secret()),
&P::signed_from_scalar(self.inputs.key_share.secret_share.expose_secret())
.unwrap(),
&values.hat_beta,
values.hat_s.to_mod(target_pk),
values.hat_r.to_mod(pk),
Expand Down Expand Up @@ -221,8 +222,9 @@ impl<P: SchemeParams, I: Debug + Clone + Ord + Serialize> FinalizableToResult<I>
let cap_x = self.inputs.key_share.public_shares[&my_id];

let rho = RandomizerMod::random(rng, pk);
let hat_cap_h = (&self.inputs.presigning.cap_k * P::bounded_from_scalar(x.expose_secret()))
.mul_randomizer(&rho.retrieve());
let hat_cap_h = (&self.inputs.presigning.cap_k
* P::bounded_from_scalar(x.expose_secret()).unwrap())
.mul_randomizer(&rho.retrieve());

let aux = (&self.ssid_hash, &my_id);

Expand All @@ -231,7 +233,7 @@ impl<P: SchemeParams, I: Debug + Clone + Ord + Serialize> FinalizableToResult<I>
for id_l in self.other_ids() {
let p_mul = MulStarProof::<P>::new(
rng,
&P::signed_from_scalar(x.expose_secret()),
&P::signed_from_scalar(x.expose_secret()).unwrap(),
&rho,
pk,
&self.inputs.presigning.cap_k,
Expand Down Expand Up @@ -263,8 +265,8 @@ impl<P: SchemeParams, I: Debug + Clone + Ord + Serialize> FinalizableToResult<I>

let r = self.inputs.presigning.nonce;

let ciphertext = ciphertext * P::bounded_from_scalar(&r)
+ &self.inputs.presigning.cap_k * P::bounded_from_scalar(&self.inputs.message);
let ciphertext = ciphertext * P::bounded_from_scalar(&r).unwrap()
+ &self.inputs.presigning.cap_k * P::bounded_from_scalar(&self.inputs.message).unwrap();

let rho = ciphertext.derive_randomizer(sk);
// This is the same as `s_part` but if all the calculations were performed
Expand All @@ -274,8 +276,10 @@ impl<P: SchemeParams, I: Debug + Clone + Ord + Serialize> FinalizableToResult<I>
.presigning
.ephemeral_scalar_share
.expose_secret(),
) * P::signed_from_scalar(&self.inputs.message)
+ self.inputs.presigning.product_share_nonreduced * P::signed_from_scalar(&r);
)
.unwrap()
* P::signed_from_scalar(&self.inputs.message).unwrap()
+ self.inputs.presigning.product_share_nonreduced * P::signed_from_scalar(&r).unwrap();

let mut dec_proofs = Vec::new();
for id_l in self.other_ids() {
Expand Down Expand Up @@ -399,7 +403,7 @@ mod tests {
message: &Scalar,
) {
let (sig, rec_id) = signature.to_backend();
let vkey = key_shares[&Id(0)].verifying_key();
let vkey = key_shares[&Id(0)].verifying_key().unwrap();

// Check that the signature can be verified
vkey.verify_prehash(&message.to_bytes(), &sig).unwrap();
Expand Down
3 changes: 3 additions & 0 deletions synedrion/src/curve/arithmetic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ impl Scalar {
Point::GENERATOR * self
}

/// Invert the [`Scalar`]. Returns [`None`] if the scalar is zero.
pub fn invert(&self) -> CtOption<Self> {
self.0.invert().map(Self)
}
Expand Down Expand Up @@ -183,6 +184,8 @@ impl Point {
Self(key.as_affine().into())
}

/// Convert a [`Point`] to a [`VerifyingKey`] wrapped in an [`Option`]. Returns [`None`] if the
/// `Point` is the point at infinity.
pub fn to_verifying_key(self) -> Option<VerifyingKey> {
VerifyingKey::from_affine(self.0.to_affine()).ok()
}
Expand Down
5 changes: 5 additions & 0 deletions synedrion/src/uint/bounded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ where
self.bound as usize
}

/// Creates a new [`Bounded`] wrapper around `T`, restricted to `bound`.
///
/// Returns `None` if the bound is invalid, i.e.:
/// - The bound is bigger than a `T` can represent.
/// - The value of `T` is too big to be bounded by the provided bound.
pub fn new(value: T, bound: u32) -> Option<Self> {
if bound > T::BITS || value.bits() > bound {
return None;
Expand Down
4 changes: 2 additions & 2 deletions synedrion/src/www02/entities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ mod tests {
nt_share0.secret_share.expose_secret() + nt_share1.secret_share.expose_secret(),
Scalar::from(sk.as_nonzero_scalar())
);
assert_eq!(&nt_share0.verifying_key(), sk.verifying_key());
assert_eq!(&nt_share1.verifying_key(), sk.verifying_key());
assert_eq!(&nt_share0.verifying_key().unwrap(), sk.verifying_key());
assert_eq!(&nt_share1.verifying_key().unwrap(), sk.verifying_key());
}
}
4 changes: 2 additions & 2 deletions synedrion/src/www02/key_resharing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl<P: SchemeParams, I: Clone + Ord + Debug> FirstRound<I> for Round1<P, I> {
let message_destinations = if inputs.old_holder.is_some() {
// It is possible that a party is both an old holder and a new holder.
// This will be processed separately.
let mut new_holders_except_me = inputs.new_holders.clone();
let mut new_holders_except_me = inputs.new_holders;
new_holders_except_me.remove(&my_id);
new_holders_except_me
} else {
Expand Down Expand Up @@ -238,7 +238,7 @@ impl<P: SchemeParams, I: Clone + Ord + Debug> Round<I> for Round1<P, I> {
direct_msg: Self::DirectMessage,
) -> Result<Self::Payload, <Self::Result as ProtocolResult>::ProvableError> {
if let Some(new_holder) = self.new_holder.as_ref() {
if new_holder.inputs.old_holders.iter().any(|id| id == from) {
if new_holder.inputs.old_holders.contains(from) {
let public_subshare_from_poly = broadcast_msg
.public_polynomial
.evaluate(&self.new_share_ids[self.my_id()]);
Expand Down
2 changes: 1 addition & 1 deletion synedrion/tests/sessions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ async fn interactive_signing() {

for signature in signatures {
let (sig, rec_id) = signature.to_backend();
let vkey = key_shares[&verifiers[0]].verifying_key();
let vkey = key_shares[&verifiers[0]].verifying_key().unwrap();

// Check that the signature can be verified
vkey.verify_prehash(message, &sig).unwrap();
Expand Down
Loading