Skip to main content

DLMS CLI Tool for encrypt and decrypt APDU

Project description

Dlms encrypt-decrypt CLI

With this tool you can perform these operation:\

  • Generate encrypted APDU
  • Decrypt APDU
  • Authenticate APDU

Installation

Use pip:

pip install setup.py

Use pypi:

pip install dlms-cli

Usage

Encrypt

Example
System Title = 5249435249435249
Frame Counter = 80000001
Encryption Key = 454E4352595054494F4E4B45594B4559
Authentication Key = 41555448454E5449434154494F4E4B45
APDU = c001810001000060010aff0200

dlms_cli 5249435249435249 80000001 454E4352595054494F4E4B45594B4559 41555448454E5449434154494F4E4B45 c001810001000060010aff0200

Result

Encrypted/Decrypted APDU: 0de63f2331a09aa85e8830f5f3
Authentication TAG: 610d47e1e24b14e8a022aefc6a43f3a3

Decrypt

Example
System Title = 5249435249435249
Frame Counter = 80000001
Encryption Key = 454E4352595054494F4E4B45594B4559
Authentication Key = 41555448454E5449434154494F4E4B45
APDU = 0de63f2331a09aa85e8830f5f3

dlms_cli 5249435249435249 80000001 454E4352595054494F4E4B45594B4559 41555448454E5449434154494F4E4B45 0de63f2331a09aa85e8830f5f3

Result

Encrypted/Decrypted APDU: c001810001000060010aff0200
Authentication TAG: 977d4d21b7255a1b681fe6b1c902a7dc

Generate authenticated data

Example
System Title = 5249435249435249
Frame Counter = 00000001
Encryption Key = 454E4352595054494F4E4B45594B4559
Authentication Key = 41555448454E5449434154494F4E4B45
APDU = 0de63f2331a09aa85e8830f5f3

dlms_cli -a 5249435249435249 00000001 454E4352595054494F4E4B45594B4559 41555448454E5449434154494F4E4B45 0de63f2331a09aa85e8830f5f3

Result

TAG: 62d423292e0fe5320370881d

Dependency

cryptography

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dlms_cli-0.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

dlms_cli-0.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file dlms_cli-0.2.tar.gz.

File metadata

  • Download URL: dlms_cli-0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.4

File hashes

Hashes for dlms_cli-0.2.tar.gz
Algorithm Hash digest
SHA256 d1c8a82b54c9c34da1e84ed874f4a2c1b8f88a04aad2d73e293829000eebb9c4
MD5 d93381f62dbb5eedb9464333f136d9a0
BLAKE2b-256 9ccdafba583b58013b7f02cf68455c4dd7cdeb1c4a80e63d2b3f47375f10162b

See more details on using hashes here.

File details

Details for the file dlms_cli-0.2-py3-none-any.whl.

File metadata

  • Download URL: dlms_cli-0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.4

File hashes

Hashes for dlms_cli-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8c5a02fb321f558622bcace890d579d988306d2ae44c46626ffd14fff80353b0
MD5 4f552ac66182165bfc3bd5fbbfb39e48
BLAKE2b-256 d97aff13cdc2f522a1a75063d7e93c0704b421ffdbad9bc639ab63c2fe16748c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page