Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Dark

Collapse
SHARUR
Community Wiki DLMS/COSEM Tools
Search Sign in

DLMS High-Level Security (HLS 5 / GMAC) AARQ Association Rejection (Result: 0x01)

Scheduled Pinned Locked Moved General Discussion
securityhls5gmacaarqencryption
4 Posts 3 Posters 19 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
  • A Offline
    A Offline
    alex_turner
    wrote on last edited by
    #1

    Scenario

    When establishing an Application Association using High-Level Security Suite 0 (AES-GCM-128 / HLS 5 with GMAC authentication), the meter rejects the association during the AARQ/AARE handshake, returning Association-Result: 0x01 (rejected-permanent).

    AARQ APDU Hex Dump

    60 36 A1 09 06 07 60 85 74 05 08 01 03 A6 0A 04 08 47 55 52 55 58 31 32 33 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 7E 1F
    

    Handshake Parameters

    • Application Context Name: 2.16.756.5.8.1.3 (Logical Name referencing with Ciphering)
    • Calling Authentication Value: GURUX123 (8-byte Client System Title)
    • Security Mechanism Name: 2.16.756.5.8.2.5 (Mechanism ID 5 - GMAC)

    Root Cause Diagnostics

    1. System Title Length: The calling system title must be exactly 8 bytes.
    2. Invocation Counter / Frame Counter Mismatch: When the client creates the GMAC authentication tag, the client's Invocation Counter must be strictly greater than the last stored counter in the meter's Security Setup object (0.0.43.0.0.255).
    3. If the meter was rebooted or if multiple clients share the same System Title, the invocation counter on the client will fall behind, triggering instant rejection for replay attack prevention.
    1 Reply Last reply
    0
    • E Offline
      E Offline
      elena_rostova
      wrote on last edited by
      #2

      To resolve the invocation counter desynchronization:

      1. Pre-read the Frame Counter: Before initiating HLS 5 authentication, establish a Public Client association (Client Address 0x10, No Security) and read the meter's current Invocation Counter from 0.0.43.0.0.255, Attribute 2.
      2. Increment & Store: Set the client's local counter to meter_counter + 1 before sending the High-Level Security AARQ.
      3. Unique System Titles: Never share the same 8-byte System Title across multiple gateway worker threads or client instances.
      1 Reply Last reply
      0
      • M Offline
        M Offline
        marcus_vance
        wrote on last edited by
        #3

        We implemented an automated counter synchronization step in our HES driver before sending the AARQ. This completely eliminated Association-Result: 0x01 across our production meters.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alex_turner
          wrote on last edited by
          #4

          Confirmed! Reading the Invocation Counter beforehand and incrementing locally solved the issue. Also note that for HLS 7 (ECDSA), the ephemeral public key exchange must strictly follow the P-256 / SHA-256 curve parameters in Green Book 10th Edition.

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups