Class BSV::Primitives::Schnorr::Proof ¶
Inherits: Object
A Schnorr zero-knowledge proof consisting of a commitment point, blinded shared secret, and response scalar.
Attributes¶
r [R] ¶
- @return [PublicKey] the commitment point R
s_prime [R] ¶
- @return [PublicKey] the blinded shared secret S'
z [R] ¶
- @return [OpenSSL::BN] the response scalar z
Public Class Methods¶
from_binary(data) ¶
Deserialise a proof from its binary representation.
The format is: R (33 bytes) + S' (33 bytes) + z (remaining bytes). The z scalar is variable-length to accommodate both the Ruby SDK's fixed 32-byte encoding and the TS SDK's minimal encoding (which omits leading zero bytes). See issue #203. - @param data [String] binary proof data (>= 67 bytes) - @raise [ArgumentError] if data is too short - @return [Proof]
Public Instance Methods¶
initialize(r, s_prime, z) ¶
- @param
r[PublicKey] commitment point - @param
s_prime[PublicKey] blinded shared secret - @param
z[OpenSSL::BN] response scalar - @return [Proof] a new instance of Proof