Skip to content

Commit

Permalink
fix R verification
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradStaniec committed Jan 15, 2025
1 parent 43cb649 commit c9ae343
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crypto/schnorr-adaptor-signature/sign_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,9 @@ func encVerify(

expRHat.ToAffine()

// fail if expected R'.y is odd
if expRHat.Y.IsOdd() {
return fmt.Errorf("expected R'.y is odd")
if R.Y.IsOdd() {
return fmt.Errorf("expected R.y is odd")
}

// ensure R' is same as the expected R' = s'*G - e*P
if !expRHat.X.Equals(&RHat.X) {
return fmt.Errorf("expected R' = s'*G - e*P is different from the actual R'")
Expand Down

0 comments on commit c9ae343

Please sign in to comment.