pub struct LongTermKeyBundle { /* private fields */ }Expand description
Key-bundle with public keys to be used until the pre-key expired.
Note that while pre-keys are signed for X3DH, bundles should be part of an authenticated messaging format where the whole payload (and thus it’s lifetime) is signed by the same identity to prevent replay and impersonation attacks.
Implementations§
Source§impl LongTermKeyBundle
impl LongTermKeyBundle
pub fn new( identity_key: PublicKey, signed_prekey: PreKey, prekey_signature: XSignature, ) -> Self
Trait Implementations§
Source§impl Clone for LongTermKeyBundle
impl Clone for LongTermKeyBundle
Source§fn clone(&self) -> LongTermKeyBundle
fn clone(&self) -> LongTermKeyBundle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LongTermKeyBundle
impl Debug for LongTermKeyBundle
Source§impl<'de> Deserialize<'de> for LongTermKeyBundle
impl<'de> Deserialize<'de> for LongTermKeyBundle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl KeyBundle for LongTermKeyBundle
impl KeyBundle for LongTermKeyBundle
fn identity_key(&self) -> &PublicKey
fn signed_prekey(&self) -> &PublicKey
fn onetime_prekey(&self) -> Option<&PublicKey>
fn onetime_prekey_id(&self) -> Option<OneTimePreKeyId>
fn lifetime(&self) -> &Lifetime
fn verify(&self) -> Result<(), KeyBundleError>
Source§impl PartialEq for LongTermKeyBundle
impl PartialEq for LongTermKeyBundle
Source§impl<ID> PreKeyRegistry<ID, LongTermKeyBundle> for KeyRegistry<ID>
impl<ID> PreKeyRegistry<ID, LongTermKeyBundle> for KeyRegistry<ID>
type State = KeyRegistryState<ID>
type Error = KeyRegistryError
fn key_bundle( y: Self::State, id: &ID, ) -> Result<(Self::State, Option<LongTermKeyBundle>), Self::Error>
Source§impl Serialize for LongTermKeyBundle
impl Serialize for LongTermKeyBundle
impl Eq for LongTermKeyBundle
impl StructuralPartialEq for LongTermKeyBundle
Auto Trait Implementations§
impl Freeze for LongTermKeyBundle
impl RefUnwindSafe for LongTermKeyBundle
impl Send for LongTermKeyBundle
impl Sync for LongTermKeyBundle
impl Unpin for LongTermKeyBundle
impl UnwindSafe for LongTermKeyBundle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more