pub enum Authenticity {
None,
Encrypted,
Authenticated {
counter: u32,
},
}Expand description
What was cryptographically verified about a telegram. Only
Authenticity::Authenticated makes a radio reading evidence.
Variants§
None
Nothing: plaintext, or still encrypted. Anyone in radio range can send this.
Encrypted
Decrypted with the meter’s key (mode 5, ELL, or mode 7 without a MAC):
confidential, but not integrity-protected. These modes are malleable: without
the key, an attacker can change bits of the plaintext through the IV inputs in the
header (mode 5) or the CTR ciphertext with a fixed-up CRC (ELL), and 2F 2F and the
payload CRC still pass. And anyone holding the key, often shared by a fleet, can
send anything. Not evidence of a reading.
Authenticated
The mode-7 AFL CMAC or the mode-10 CCM tag was verified with the key derived for
this message. It covers the transport layer from its CI on (records, tail) and the
counter, and binds the meter’s identification number (through the key
derivation). Mode 7 does not cover the link layer’s manufacturer, version or
device type, nor the ELL and the AFL’s other fields: compare
Application::meter with your key table before you attribute the reading. Mode
10’s nonce binds all eight address bytes.