Struct ieee802154::mac::frame::security::SecurityContext
source · [−]pub struct SecurityContext<AEADBLKCIPH, KEYDESCLO> where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>, {
pub euid: u64,
pub frame_counter: u32,
pub key_provider: KEYDESCLO,
/* private fields */
}
Expand description
A context that used to keep track of cryptographic properties that are necessary for securing/unsecuring frames
AEAD is the type that will provide an AEAD instance to be used for the encryption/decryption process
NONCEGEN is the type that will convert the nonce created using the 802.15.4 standard into a nonce of the size that can be accepted by the provided AEAD algorithm
Fields
euid: u64
The EUID used for calculating the nonce of outgoing frames
frame_counter: u32
The current frame counter
key_provider: KEYDESCLO
The key descriptor lookup to use to look up keys
Implementations
sourceimpl<AEADBLKCIPH, KEYDESCLO> SecurityContext<AEADBLKCIPH, KEYDESCLO> where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
impl<AEADBLKCIPH, KEYDESCLO> SecurityContext<AEADBLKCIPH, KEYDESCLO> where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
sourceimpl SecurityContext<Unimplemented, Unimplemented>
impl SecurityContext<Unimplemented, Unimplemented>
sourcepub fn no_security() -> Self
pub fn no_security() -> Self
A security context that is not actually capable of providing any security
Trait Implementations
sourceimpl<AEADBLKCIPH: Clone, KEYDESCLO: Clone> Clone for SecurityContext<AEADBLKCIPH, KEYDESCLO> where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
impl<AEADBLKCIPH: Clone, KEYDESCLO: Clone> Clone for SecurityContext<AEADBLKCIPH, KEYDESCLO> where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
sourcefn clone(&self) -> SecurityContext<AEADBLKCIPH, KEYDESCLO>
fn clone(&self) -> SecurityContext<AEADBLKCIPH, KEYDESCLO>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<AEADBLKCIPH, KEYDESCLO> TryWrite<&SecurityContext<AEADBLKCIPH, KEYDESCLO>> for AuxiliarySecurityHeader where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
impl<AEADBLKCIPH, KEYDESCLO> TryWrite<&SecurityContext<AEADBLKCIPH, KEYDESCLO>> for AuxiliarySecurityHeader where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
impl<AEADBLKCIPH: Copy, KEYDESCLO: Copy> Copy for SecurityContext<AEADBLKCIPH, KEYDESCLO> where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
Auto Trait Implementations
impl<AEADBLKCIPH, KEYDESCLO> RefUnwindSafe for SecurityContext<AEADBLKCIPH, KEYDESCLO> where
AEADBLKCIPH: RefUnwindSafe,
KEYDESCLO: RefUnwindSafe,
impl<AEADBLKCIPH, KEYDESCLO> Send for SecurityContext<AEADBLKCIPH, KEYDESCLO> where
AEADBLKCIPH: Send,
KEYDESCLO: Send,
impl<AEADBLKCIPH, KEYDESCLO> Sync for SecurityContext<AEADBLKCIPH, KEYDESCLO> where
AEADBLKCIPH: Sync,
KEYDESCLO: Sync,
impl<AEADBLKCIPH, KEYDESCLO> Unpin for SecurityContext<AEADBLKCIPH, KEYDESCLO> where
AEADBLKCIPH: Unpin,
KEYDESCLO: Unpin,
impl<AEADBLKCIPH, KEYDESCLO> UnwindSafe for SecurityContext<AEADBLKCIPH, KEYDESCLO> where
AEADBLKCIPH: UnwindSafe,
KEYDESCLO: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more