Expand description
Association LN (class 15).
Re-exports§
pub use crate::security::AuthMechanism as AuthenticationMechanism;
Structs§
- Association
Ln Association LNinterface class (class_id = 15) per IEC 62056-6-2 §4.4.3. Models the associations between a client and the server (logical device) and carries the authentication mechanism and HLS handshake used to open them.- Association
LnConfig - Configuration structure used to build an
Association LNobject. - HlsContext
- Cryptographic material for the HLS handshake, shared by the mechanisms that
need more than the plain secret: GMAC (5), SHA-256 (6), Kuznyechik CMAC (8)
and Streebog (9). Fields not relevant to the negotiated mechanism may stay
empty (see
Default).
Enums§
- Association
LnVersion - Versions of the Association LN class.
Constants§
- MAX_
HLS_ 🔒FAILURES - Consecutive HLS-authentication failures allowed before the association locks out further attempts (a fresh AARQ Pass 1/2 is required to reset the counter), mitigating brute-force guessing of the challenge response.
Functions§
- assemble_
sc_ 🔒ic_ mac - Assembles the
SC ‖ IC ‖ MACresponse used by the GMAC (5) and GOST CMAC (8) mechanisms. - build_
iv 🔒 - Builds the 12-octet initialization vector
IV = system_title (8) ‖ IC (4). - gmac_
tag 🔒 - Computes the 12-octet GMAC tag (AES-GCM with empty plaintext) over the
additional authenticated data
aad, with keyek(16 or 32 octets) and initialization vectoriv. The full 16-octet tag is truncated to 96 bits (most significant octets) per NIST SP 800-38D / IEC 62056-5-3. - write_
length 🔒 - Writes a BER/A-XDR length octet (short or long form).