Static ReadonlyKEY_The byte length of a SchnorrPublicKey.
A copy of the bytes; mutating it does not touch this value.
StaticfromRestore a SchnorrPublicKey from a fixed-size array of bytes.
StaticfromGet hex string representation.
Get base64 representation.
Verify a BIP-340 signature. A key that is not an x-only point is an
InvalidData failure (the reference's schnorr_verify panics on it).
The reference: the digest of the raw key bytes, as the reference computes it.
The first four bytes of reference() in hex, the reference's ref_hex_short.
The reference's Display: the type name over the short reference.
Schnorr (x-only) public key for BIP-340 signatures (secp256k1, 32 bytes)
A
SchnorrPublicKeyis a 32-byte "x-only" public key used with the BIP-340 Schnorr signature scheme. Unlike compressed ECDSA public keys (33 bytes) that include a prefix byte indicating the parity of the y-coordinate, Schnorr public keys only contain the x-coordinate of the elliptic curve point.Schnorr signatures offer several advantages over traditional ECDSA signatures:
Schnorr signatures were introduced to Bitcoin via the Taproot upgrade (BIP-340).
Note: SchnorrPublicKey does not have CBOR serialization in the reference implementation, so we keep it simple here.