File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
mithril-stm/src/signature_scheme/schnorr_signature Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,13 @@ impl SchnorrSignature {
5555 let msg_hash_point = ProjectivePoint :: hash_to_projective_point ( msg) ?;
5656
5757 // Computing random_point_1_recomputed = response * H(msg) + challenge * commitment_point
58- let challenge_scalar = ScalarFieldElement :: from_base_field ( & self . challenge ) ?;
58+ let challenge_as_scalar = ScalarFieldElement :: from_base_field ( & self . challenge ) ?;
5959 let random_point_1_recomputed =
60- self . response * msg_hash_point + challenge_scalar * self . commitment_point ;
60+ self . response * msg_hash_point + challenge_as_scalar * self . commitment_point ;
6161
6262 // Computing random_point_2_recomputed = response * prime_order_generator_point + challenge * vk
6363 let random_point_2_recomputed =
64- self . response * prime_order_generator_point + challenge_scalar * verification_key. 0 ;
64+ self . response * prime_order_generator_point + challenge_as_scalar * verification_key. 0 ;
6565
6666 // Since the hash function takes as input scalar elements
6767 // We need to convert the EC points to their coordinates
Original file line number Diff line number Diff line change @@ -82,8 +82,7 @@ impl SchnorrSigningKey {
8282 . collect ( ) ;
8383
8484 let challenge = compute_poseidon_digest ( & points_coordinates) ;
85- let challenge_as_scalar = ScalarFieldElement :: from_base_field ( & challenge) ?;
86- let challenge_times_sk = challenge_as_scalar * self . 0 ;
85+ let challenge_times_sk = ScalarFieldElement :: from_base_field ( & challenge) ? * self . 0 ;
8786 let response = random_scalar - challenge_times_sk;
8887
8988 Ok ( SchnorrSignature {
You can’t perform that action at this time.
0 commit comments