Skip to main content

Module general_ciphering

Module general_ciphering 

Source
Expand description

General ciphering APDUs (IEC 62056-5-3, 5.7.2): the address-carrying wrappers that transport a protected xDLMS APDU independently of the service.

  • general-glo-ciphering ([219], 0xDB) and general-ded-ciphering ([220], 0xDC) prepend the originator system-title to a ciphered-service octet-string (SC ‖ IC ‖ ciphertext ‖ tag, produced by super::ciphering).
  • general-ciphering ([221], 0xDD) additionally carries the transaction-id, both system-titles, date-time and other-information.

This module only frames the APDU; the authenticated encryption itself is done by super::ciphering. The general-ciphering key-info field (agreed-key / PKI key transport) is not modelled — general-ciphering here assumes a pre-shared symmetric key (key-info absent).

Structs§

GeneralCiphering
A general-ciphering APDU ([221]).
GeneralGloDedCiphering
A general-glo-ciphering or general-ded-ciphering APDU.
GeneralSigning
A general-signing APDU ([223]): the address-carrying fields of a general-ciphering APDU followed by the (optionally protected) content and its digital signature (IEC 62056-5-3, 5.7.2.5 / DLMS Green Book 9.2.7.2.5).

Enums§

KeyInfo
The key-info field of a general-ciphering APDU (IEC 62056-5-3, 5.7.2.4).

Constants§

GENERAL_CIPHERING_TAG
general-ciphering APDU tag ([221]).
GENERAL_DED_CIPHERING_TAG
general-ded-ciphering APDU tag ([220]).
GENERAL_GLO_CIPHERING_TAG
general-glo-ciphering APDU tag ([219]).
GENERAL_SIGNING_TAG
general-signing APDU tag ([223]).

Functions§

push_octet_string 🔒
Writes an A-XDR octet-string: <length> <bytes>.
take_octet_string 🔒
Reads an A-XDR octet-string, returning its bytes and the octets consumed.