pub enum KeyUsage {
GlobalUnicastEncryption,
GlobalBroadcastEncryption,
Authentication,
KeyEncrypting,
Dedicated,
}Expand description
What a key is for.
Variants§
GlobalUnicastEncryption
The global unicast encryption key, which protects ordinary traffic.
GlobalBroadcastEncryption
The global broadcast encryption key, used for messages to many meters at once.
Authentication
The authentication key, which is authenticated data rather than a cipher key.
KeyEncrypting
The key-encrypting key, under which other keys are wrapped for transport.
Dedicated
The key negotiated for this association only, carried in the InitiateRequest.
Implementations§
Source§impl KeyUsage
impl KeyUsage
Sourcepub const fn key_id(self) -> Option<u8>
pub const fn key_id(self) -> Option<u8>
The Key-Id this usage has in general-ciphering’s identified-key form.
Key-Id is an enumeration of exactly two values — global-unicast-encryption-key
(0) and global-broadcast-encryption-key (1). Every other usage answers None
rather than inventing a number: the authentication key in particular is never an
identified key, because identified-key names the key that deciphers the content
and the authentication key never does that.