mirror of
https://github.com/serai-dex/serai.git
synced 2025-03-12 09:26:51 +00:00
Include the scalar offset in the calculation of p
This commit is contained in:
parent
7421ed96ff
commit
76a6ff46be
1 changed files with 6 additions and 0 deletions
|
@ -241,6 +241,11 @@ fn sign_with_share<C: Curve, A: Algorithm<C>>(
|
|||
b.extend(&commitments[0 .. commit_len]);
|
||||
}
|
||||
|
||||
let offset = if params.keys.offset.is_some() {
|
||||
C::F_to_le_bytes(¶ms.keys.offset.unwrap())
|
||||
} else {
|
||||
vec![]
|
||||
};
|
||||
let context = params.algorithm.context();
|
||||
let mut p = Vec::with_capacity(multisig_params.t);
|
||||
let mut pi = C::F::zero();
|
||||
|
@ -251,6 +256,7 @@ fn sign_with_share<C: Curve, A: Algorithm<C>>(
|
|||
.chain(BINDING_DST)
|
||||
.chain(u64::try_from(*l).unwrap().to_le_bytes())
|
||||
.chain(Blake2b::new().chain(BINDING_MESSAGE_DST).chain(msg).finalize())
|
||||
.chain(&offset)
|
||||
.chain(&context)
|
||||
.chain(&b)
|
||||
.finalize()
|
||||
|
|
Loading…
Reference in a new issue