lib/schnorr.rb in tapyrus-0.2.1 vs lib/schnorr.rb in tapyrus-0.2.2
- old
+ new
@@ -74,10 +74,10 @@
# @param (Integer) x a x coordinate for R.
# @param (ECDSA::Point) p a public key.
# @return (Integer) digest e.
def create_challenge(x, p, message)
r_x = ECDSA::Format::IntegerOctetString.encode(x, GROUP.byte_length)
- p_str= ECDSA::Format::PointOctetString.encode(p, compression:true)
+ p_str= p.to_hex.htb
(ECDSA.normalize_digest(Digest::SHA256.digest(r_x + p_str + message), GROUP.bit_length)) % GROUP.order
end
end
\ No newline at end of file