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.
Methods
Section titled “Methods”generate
Section titled “generate”pub fn generate() -> Result<Self, VoiceError>A fresh key pair from the OS CSPRNG.
Errors
Section titled “Errors”VoiceError::Rng when the CSPRNG fails.
from_seed
Section titled “from_seed”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.
Errors
Section titled “Errors”VoiceError::PublicKey if the derived public key does not re-parse (never expected).
public_key
Section titled “public_key”pub const fn public_key(&self) -> &VoicePublicKeyThe public half, published in the key package.
Trait implementations
Section titled “Trait implementations”Debug