Skip to main content

DLMS CLI Tool for encrypt and decrypt APDU

Project description

Dlms encrypt-decrypt command line tool

With this tool you can perform these operation:

  • Generate encrypted APDU
  • Decrypt APDU
  • Authenticate APDU
  • Generate encryption key

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 -e 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 -d 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

Generate encryption key

Example

dlms_cli -k

Result

Encryption Key: 08f418ad55d89f38388a7e379b16353f

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-1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

dlms_cli-1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dlms_cli-1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for dlms_cli-1.1.tar.gz
Algorithm Hash digest
SHA256 39ed994eb55ac6d5104fa0043dbaa98890ce40d64a7fdec14e85440fe1ba5c45
MD5 063869f7e837efff681e7af2a9cc8853
BLAKE2b-256 d878267961d13f868b5eaf681eb971724b09e057c316bbaf3041bc09de28c1f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dlms_cli-1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for dlms_cli-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8fabade07af2a6c29757f5804ad3770e94701e0719fb4b7e2e26e2eb5dc27b5a
MD5 b090edf5f8e045f480d5295279766bc8
BLAKE2b-256 fc2730509c6c01fd94ab02f78c6e387651a3613bdbadbfbdfaa918f9ee288821

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