Skip to content

Struct crypto::voice::KeyPackage

zaun_community_protocol::crypto::voice::KeyPackage · Struct

pub struct KeyPackage { … }

A participant’s voice key for one session in one voice channel.

2: the voice suite.

3: the community.

4: the voice channel.

5: the participant; its member key signs.

6: this participation.

7: the X-Wing public key sender keys are wrapped to.

8: ms since the epoch.

pub fn create(member_key: &SecretKey, identity: &VoiceIdentity, community_id: CommunityId, channel_id: ChannelId, member_id: MemberId, voice_session: VoiceSessionId, created_at: u64) -> Result<SignedKeyPackage, VoiceError>

Makes and signs this participant’s key package.

VoiceError::Signed when signing fails.

pub fn verify(wire: &[u8], member_key: &PublicKey, expected: &PackageExpectation) -> Result<SignedKeyPackage, VoiceError>

Verifies a peer’s key package from the wire under member_key (the roster’s key for expected.member_id), then checks the community, channel and member.

VoiceError::Length, VoiceError::Signed (checked before decoding) or VoiceError::Mismatch.

Clone, Debug, Decode, Encode, Eq, PartialEq, SignedObject, StructuralPartialEq

Full rustdoc page