mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Allow offsetting FROST keys multiple times
This commit is contained in:
@@ -239,7 +239,10 @@ pub struct MultisigKeys<C: Curve> {
|
||||
impl<C: Curve> MultisigKeys<C> {
|
||||
pub fn offset(&self, offset: C::F) -> MultisigKeys<C> {
|
||||
let mut res = self.clone();
|
||||
res.offset = Some(offset);
|
||||
// Carry any existing offset
|
||||
// Enables schemes like Monero's subaddresses which have a per-subaddress offset and then a
|
||||
// one-time-key offset
|
||||
res.offset = Some(offset + res.offset.unwrap_or(C::F::zero()));
|
||||
res
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user