File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ mod tests {
106106 #[ allow( non_snake_case) ]
107107 let I = signing_key * H_p_pk ;
108108
109- let signature = sign (
109+ let ( signature, _ ) = sign (
110110 msg_to_sign,
111111 signing_key,
112112 signing_key_index,
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ pub fn sign(
2929 L : EdwardsPoint ,
3030 R : EdwardsPoint ,
3131 I : EdwardsPoint ,
32- ) -> Clsag {
32+ ) -> ( Clsag , Scalar ) {
3333 let D = z * H_p_pk ;
3434 let D_inv_8 = D * INV_EIGHT ;
3535 let adjusted_commitment_ring =
@@ -97,11 +97,16 @@ pub fn sign(
9797 h_prev = h
9898 }
9999
100- responses [ signing_key_index ] = alpha - h_prev * ( ( mu_P * signing_key ) + ( mu_C * z) ) ;
100+ let stupid_constant = h_prev * mu_C * z;
101101
102- Clsag {
103- s : responses. to_vec ( ) ,
104- c1 : h_0,
105- D : D_inv_8 ,
106- }
102+ responses[ signing_key_index] = alpha - h_prev * mu_P * signing_key - stupid_constant;
103+
104+ (
105+ Clsag {
106+ s : responses. to_vec ( ) ,
107+ c1 : h_0,
108+ D : D_inv_8 ,
109+ } ,
110+ stupid_constant,
111+ )
107112}
You can’t perform that action at this time.
0 commit comments