Use a non-constant generator in FROST

This commit is contained in:
Luke Parker
2022-08-13 05:07:07 -04:00
parent 6f776ff004
commit 885d816309
12 changed files with 29 additions and 24 deletions

View File

@@ -330,7 +330,7 @@ impl<C: Curve> FrostKeys<C> {
/// Returns the group key with any offset applied
pub fn group_key(&self) -> C::G {
self.core.group_key + (C::GENERATOR * self.offset.unwrap_or_else(C::F::zero))
self.core.group_key + (C::generator() * self.offset.unwrap_or_else(C::F::zero))
}
/// Returns all participants' verification shares without any offsetting
@@ -354,7 +354,7 @@ impl<C: Curve> FrostKeys<C> {
let offset_share = self.offset.unwrap_or_else(C::F::zero) *
C::F::from(included.len().try_into().unwrap()).invert().unwrap();
let offset_verification_share = C::GENERATOR * offset_share;
let offset_verification_share = C::generator() * offset_share;
Ok(FrostView {
group_key: self.group_key(),