pub enum Security {
Plain,
Mode5,
Mode7 {
counter: u32,
mac: bool,
},
Mode10 {
counter: u32,
},
}Available on crate feature
oms only.Expand description
How the records are protected.
Variants§
Plain
None: anyone in range could have sent it.
Mode5
Mode 5: AES-128-CBC with the meter’s key, IV from the address and access number. Confidential, not authenticated.
Mode7
Mode 7: AES-128-CBC with a key derived from the meter’s key and counter (KDF-A).
With mac, an AFL CMAC (8 bytes) over the transport layer authenticates it.
Fields
Mode10
Mode 10: AES-128-CCM with a key derived from counter; the 8-byte tag
authenticates the header, the records and the tail.
Trait Implementations§
impl Copy for Security
impl Eq for Security
impl StructuralPartialEq for Security
Auto Trait Implementations§
impl Forget for Security
impl Freeze for Security
impl Move for Security
impl RefUnwindSafe for Security
impl Send for Security
impl Sync for Security
impl Unpin for Security
impl UnsafeUnpin for Security
impl UnwindSafe for Security
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