An ECDSA public key.

Fields

p: Curve,

Functions

fn fromSec1(sec1: []const u8) !PublicKey

Create a public key from a SEC-1 representation.

fn toCompressedSec1(pk: PublicKey) [compressed_sec1_encoded_length]u8

Encode the public key using the compressed SEC-1 format.

fn toUncompressedSec1(pk: PublicKey) [uncompressed_sec1_encoded_length]u8

Encoding the public key using the uncompressed SEC-1 format.

Values

compressed_sec1_encoded_length
type

Length (in bytes) of a compressed sec1-encoded key.

uncompressed_sec1_encoded_length
type

Length (in bytes) of a compressed sec1-encoded key.