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§
Source§impl<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>,
Source§impl 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§
Source§impl<AEADBLKCIPH, KEYDESCLO> Clone for SecurityContext<AEADBLKCIPH, KEYDESCLO>where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16> + Clone,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize> + Clone,
impl<AEADBLKCIPH, KEYDESCLO> Clone for SecurityContext<AEADBLKCIPH, KEYDESCLO>where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16> + Clone,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize> + Clone,
Source§fn clone(&self) -> SecurityContext<AEADBLKCIPH, KEYDESCLO>
fn clone(&self) -> SecurityContext<AEADBLKCIPH, KEYDESCLO>
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<AEADBLKCIPH, KEYDESCLO> TryWrite<&SecurityContext<AEADBLKCIPH, KEYDESCLO>> for AuxiliarySecurityHeaderwhere
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
impl<AEADBLKCIPH, KEYDESCLO> TryWrite<&SecurityContext<AEADBLKCIPH, KEYDESCLO>> for AuxiliarySecurityHeaderwhere
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16>,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize>,
impl<AEADBLKCIPH, KEYDESCLO> Copy for SecurityContext<AEADBLKCIPH, KEYDESCLO>where
AEADBLKCIPH: NewBlockCipher + BlockCipher<BlockSize = U16> + Copy,
KEYDESCLO: KeyDescriptorLookup<AEADBLKCIPH::KeySize> + Copy,
Auto Trait Implementations§
impl<AEADBLKCIPH, KEYDESCLO> Freeze for SecurityContext<AEADBLKCIPH, KEYDESCLO>where
KEYDESCLO: Freeze,
impl<AEADBLKCIPH, KEYDESCLO> RefUnwindSafe for SecurityContext<AEADBLKCIPH, KEYDESCLO>where
KEYDESCLO: RefUnwindSafe,
AEADBLKCIPH: RefUnwindSafe,
impl<AEADBLKCIPH, KEYDESCLO> Send for SecurityContext<AEADBLKCIPH, KEYDESCLO>
impl<AEADBLKCIPH, KEYDESCLO> Sync for SecurityContext<AEADBLKCIPH, KEYDESCLO>
impl<AEADBLKCIPH, KEYDESCLO> Unpin for SecurityContext<AEADBLKCIPH, KEYDESCLO>
impl<AEADBLKCIPH, KEYDESCLO> UnwindSafe for SecurityContext<AEADBLKCIPH, KEYDESCLO>where
KEYDESCLO: UnwindSafe,
AEADBLKCIPH: UnwindSafe,
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