mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-01-10 15:09:44 -05:00
Reorder and rename for clarification
This commit is contained in:
parent
4933d7f1b7
commit
07d544adde
@ -19,21 +19,13 @@ pub fn sign(
|
|||||||
fake_responses: [Scalar; RING_SIZE - 1],
|
fake_responses: [Scalar; RING_SIZE - 1],
|
||||||
z: Scalar,
|
z: Scalar,
|
||||||
pseudo_output_commitment: EdwardsPoint,
|
pseudo_output_commitment: EdwardsPoint,
|
||||||
L: EdwardsPoint,
|
L_0: EdwardsPoint,
|
||||||
R: EdwardsPoint,
|
R_0: EdwardsPoint,
|
||||||
I: EdwardsPoint,
|
I: EdwardsPoint,
|
||||||
) -> Signature {
|
) -> Signature {
|
||||||
let D = z * H_p_pk;
|
let D = z * H_p_pk;
|
||||||
let D_inv_8 = D * INV_EIGHT;
|
let D_inv_8 = D * INV_EIGHT;
|
||||||
|
|
||||||
let prefix = clsag_round_hash_prefix(
|
|
||||||
ring.as_ref(),
|
|
||||||
commitment_ring.as_ref(),
|
|
||||||
pseudo_output_commitment,
|
|
||||||
msg,
|
|
||||||
);
|
|
||||||
let h_0 = hash_to_scalar(&[&prefix, L.compress().as_bytes(), R.compress().as_bytes()]);
|
|
||||||
|
|
||||||
let mus = AggregationHashes::new(
|
let mus = AggregationHashes::new(
|
||||||
&ring,
|
&ring,
|
||||||
&commitment_ring,
|
&commitment_ring,
|
||||||
@ -42,6 +34,14 @@ pub fn sign(
|
|||||||
H_p_pk.compress(),
|
H_p_pk.compress(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let prefix = clsag_round_hash_prefix(
|
||||||
|
ring.as_ref(),
|
||||||
|
commitment_ring.as_ref(),
|
||||||
|
pseudo_output_commitment,
|
||||||
|
msg,
|
||||||
|
);
|
||||||
|
let h_0 = hash_to_scalar(&[&prefix, L_0.compress().as_bytes(), R_0.compress().as_bytes()]);
|
||||||
|
|
||||||
let h_last = fake_responses
|
let h_last = fake_responses
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
|
Loading…
Reference in New Issue
Block a user