Skip to content

Struct crypto::voice::VoiceIdentity

zaun_community_protocol::crypto::voice::VoiceIdentity · Struct

pub struct VoiceIdentity { … }

A voice session’s X-Wing key pair. The secret is the 32-byte X-Wing seed, zeroized on drop and never printed. It lives only as long as the voice session; it is never stored.

pub fn generate() -> Result<Self, VoiceError>

A fresh key pair from the OS CSPRNG.

VoiceError::Rng when the CSPRNG fails.

pub fn from_seed(seed: &[u8; 32]) -> Result<Self, VoiceError>

The key pair of an X-Wing seed (the X-Wing decapsulation key, draft the protocol). Tests and known-answer vectors only; real sessions use Self::generate.

VoiceError::PublicKey if the derived public key does not re-parse (never expected).

pub const fn public_key(&self) -> &VoicePublicKey

The public half, published in the key package.

Debug

Full rustdoc page