Skip to main content

Module association_ln

Module association_ln 

Source
Expand description

Association LN (class 15).

Re-exports§

pub use crate::security::AuthMechanism as AuthenticationMechanism;

Structs§

AssociationLn
Association LN interface 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.
AssociationLnConfig
Configuration structure used to build an Association LN object.
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§

AssociationLnVersion
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 ‖ MAC response 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 key ek (16 or 32 octets) and initialization vector iv. 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).