diff --git a/src/libs/LibSchnorr.sol b/src/libs/LibSchnorr.sol index bc05a71..1262893 100644 --- a/src/libs/LibSchnorr.sol +++ b/src/libs/LibSchnorr.sol @@ -78,8 +78,8 @@ library LibSchnorr { v = pubKey.yParity() + 27; } - // Set r = Pₓ - uint r = pubKey.x; + // Set r = Pₓ % Q + uint r = pubKey.x % LibSecp256k1.Q(); // Compute s = Q - (e * Pₓ) (mod Q) //