StaticfromRestore an ECPublicKey from a fixed-size array of bytes.
StaticfromRestore an ECPublicKey from a reference to an array of bytes. Validates the length.
StaticfromStaticfromGet a reference to the fixed-size array of bytes.
Get the raw public key bytes (copy).
Get hex string representation.
Get hex string representation (alias for hex()).
Get base64 representation.
Returns the compressed public key (self).
This method implements the ECKey interface. Since ECPublicKey is already a compressed public key, this returns itself.
Convert this compressed public key to uncompressed format.
Verify an ECDSA signature.
The 64-byte signature to verify
The message that was signed
true if the signature is valid
Get string representation.
Returns the CBOR tags associated with ECPublicKey.
Returns the untagged CBOR encoding.
Format: { 3: h'<33-byte-key>' } Note: No key 2 indicates this is a public key
Returns the tagged CBOR encoding.
Returns the tagged value in CBOR binary representation.
Creates an ECPublicKey by decoding it from untagged CBOR.
Format: { 3: h'<33-byte-key>' }
Creates an ECPublicKey by decoding it from tagged CBOR.
StaticfromStaticfromStaticfromStatic method to decode from untagged CBOR binary data.
Returns the UR representation of the ECPublicKey. Note: URs use untagged CBOR since the type is conveyed by the UR type itself.
Returns the UR string representation.
StaticfromStaticfrom
An interface for elliptic curve public keys that can provide their uncompressed form.
This interface extends
ECKeyto provide a method for obtaining the uncompressed representation of a public key. Elliptic curve public keys can be represented in both compressed (33 bytes) and uncompressed (65 bytes) formats:Compressed format: Uses a single byte prefix (0x02 or 0x03) followed by the x-coordinate (32 bytes), with the prefix indicating the parity of the y-coordinate.
Uncompressed format: Uses a byte prefix (0x04) followed by both x and y coordinates (32 bytes each), for a total of 65 bytes.
The compressed format is more space-efficient and is recommended for most applications, but some legacy systems require the uncompressed format.