mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-02-09 03:18:44 -05:00
Compute h_0 correctly on Bob's side
This commit is contained in:
parent
4a5f32fe74
commit
085d95d07b
@ -361,7 +361,15 @@ impl Bob1 {
|
|||||||
.verify(RISTRETTO_BASEPOINT_POINT, T_a, self.H_p_pk, I_hat_a)?;
|
.verify(RISTRETTO_BASEPOINT_POINT, T_a, self.H_p_pk, I_hat_a)?;
|
||||||
|
|
||||||
let h_0 = {
|
let h_0 = {
|
||||||
|
let ring = self
|
||||||
|
.ring
|
||||||
|
.iter()
|
||||||
|
.flat_map(|pk| pk.compress().as_bytes().to_vec())
|
||||||
|
.collect::<Vec<u8>>();
|
||||||
|
|
||||||
let h_0 = Sha512::new()
|
let h_0 = Sha512::new()
|
||||||
|
.chain("CLSAG_0".to_string())
|
||||||
|
.chain(ring)
|
||||||
.chain(self.msg)
|
.chain(self.msg)
|
||||||
.chain((T_a + self.T_b + self.R_a).compress().as_bytes())
|
.chain((T_a + self.T_b + self.R_a).compress().as_bytes())
|
||||||
.chain(
|
.chain(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user