DlmsDataSecurity Class

Provides settings and methods for protecting APDUs in DLMS.

Definition

Namespace: OddPrg.Protocols.DLMS
Assembly: OddPrg.Frames.Dlms (in OddPrg.Frames.Dlms.dll) Version: 2.0.0.24 (2.0.0.24)
C#
public class DlmsDataSecurity
Inheritance
Object    DlmsDataSecurity

Constructors

DlmsDataSecurity Initializes a new instance of class.

Properties

FrameCounter Frame counter for DLMS communication. Represents serial number of the APDU.
Settings DLMS data security settings.

Methods

AuthentizeHls Checks reply of HLS authentication according to a selected authentication mechanism. Throws DlmsException if authentication was not successfull.
CreateAesKeyTransferData Creates parameter for calling method of key_transfer using AES key wrap algorithm. If some newKey is null or empty, it will not be added to the result collection.
CreateEcdh Creates object that implements ECDH algorithm and is used in key agreement procedure. Object is created with correct key size according to the security suite.
CreateEcdhKeyAgreemntData Creates a parameter for calling method key_agreement using ECDH algorithm.
Extract(ByteBuffer) Extracts plain APDU from protected APDU from the beginning of data according security settings.
Extract(ByteBuffer, Int32) Extracts plain APDU from protected APDU according security settings.
GetGeneratedKey Derives new symetric key using ECDH algorithm.
GetHlsMethodParameter Returns parameter of method reply_to_hls_authentication to provide a HLS athentication according to a selected authentication mechanism.
GetServerSystemTitleFromCertificate Returns a simple name (CN) from a certificate. Throws exception if data contains invalid certificate or siple name does not contain hexadecimal value.
Protect Protects DLMS APDU according to security settings.
VerifyKeyAgreementEcdsaSignature Verifies meter ECDSA signature used in key agreement.

Fields

DLMS_TAG_LENGTH Length of tag in AES GCM for DLMS.

See Also