Exmbus.Parser.Afl.KeyInformationField (Exmbus v0.4.0)
View SourceAFL Key Information Field (KIF) as per EN 13757-7:2018
| Bit | Field Name | Description |
|---|---|---|
| 15 to 8 | Key Version | The Key Version identifies the applied key version, as specified in 7.7.1. |
| 7 to 6 | RES | Reserved (0b0 by default) |
| 5 to 4 | KDF-Selection | The KDF-Selection identifies the applied Key Derivation Function, as specified in Table 25. |
| 3 to 0 | Key ID | The Key ID identifies the applied key, as specified in Table 24. |
In case of individual fragment authentication, the message key shall be applied for all fragments of the message. If the KI is not present, values of the configuration field in the TPL shall be used for the key selection.
Summary
Functions
Parses the Key Information Field (KI) from the AFL.
Encode the Key Information Field (KI) to binary.
Functions
Parses the Key Information Field (KI) from the AFL.
Examples
iex> decode(<<0b00000000, 0b00000000>>)
{:ok, %Exmbus.Parser.Afl.KeyInformationField{
key_version: 0,
kdf_selection: 0,
key_id: 0
}}
Encode the Key Information Field (KI) to binary.
Examples
iex> encode(%Exmbus.Parser.Afl.KeyInformationField{
...> key_version: 0,
...> kdf_selection: 0,
...> key_id: 0
...> })
<<0x00, 0x00>>
iex> encode(nil)
<<>>