Skip to content

Struct keys::PublicKey

zaun_community_protocol::keys::PublicKey · Struct

pub struct PublicKey(…)

A composite public key, 1 985 bytes.

pub fn from_bytes(bytes: &[u8]) -> Result<Self, KeyEncodingError>

Parses the encoding, checking the suite byte and length.

KeyEncodingError for an unknown suite or a wrong length.

pub fn as_bytes(&self) -> &[u8]

The full encoding, suite byte first.

pub fn suite(&self) -> Suite

The suite.

pub fn mldsa(&self) -> &[u8]

The ML-DSA-65 component (RFC 10073 serialisation, first part).

pub fn ed25519(&self) -> &[u8]

The Ed25519 component (RFC 10073 serialisation, second part).

Clone, Debug, Decode, Deserialize<'de>, Encode, Eq, Hash, PartialEq, Serialize, StructuralPartialEq

Full rustdoc page