Skip to main content

A python module to create and verify ISO mdocs

Project description

py_isomdoc

A Python3 library for creating and verifying ISO 18013-5 mdocs.

Installation

This module is available on PyPi

pip install isomdoc

Requirements

  • Python 3.8 and later

Usage

This library provides the following methods on the isomdoc module

  • create_mdoc
  • verify_device_response

These methods can be used to create mdoc credentials that can issued to wallets and verify responses from wallets. See examples below for usage

Issuing an mdoc

See examples/create_mdoc.py for an example of creating an mdoc.

You can run the example with the following:

# See "Development" for venv setup instructions
venv $> python -m examples.create_mdl testdata/issuer_cert.pem testdata/issuer_private_key.pem testdata/device_public_key.pem testdata/device_private_key.pem

Verifying a mdoc

See examples/verify_mdoc.py for an example of verifying an mdoc DeviceResponse

You can run the example with the following:

# See "Development" for venv setup instructions
venv $> python -m examples.verify_mdl testdata/issuer_cert.pem testdata/issuer_private_key.pem testdata/device_public_key.pem testdata/device_private_key.pem

Test data

The testdata/ folder contains test keys that are used by the examples.

A sample issuer cert can be generated with:

venv $> python -m examples.generate_issuer_cert

A device key for testing can be generated with:

venv $> python -m examples.generate_device_key

Development

Installation

Use a python3 virtual enviroment

$> python3 -m venv venv
$> source venv/bin/activate
venv $> pip install -r requirements.txt

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

isomdoc-0.0.3.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isomdoc-0.0.3-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file isomdoc-0.0.3.tar.gz.

File metadata

  • Download URL: isomdoc-0.0.3.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for isomdoc-0.0.3.tar.gz
Algorithm Hash digest
SHA256 12766c8a98041ec8214a34805aec80d73d69f468e840369a7b2b8200fce78d5b
MD5 5210642bdbea9b041dc2ea17d720ffa2
BLAKE2b-256 7260d986608f08f08a92cd44bab705b334495b908cef7d03a03aae4539af8085

See more details on using hashes here.

File details

Details for the file isomdoc-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: isomdoc-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for isomdoc-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a49d9916a59eff3bf5c09949dc4742169bc8e463a4031acce50e7e265182f7d9
MD5 5d084b7ff794a8f693ac1b48a79ad28c
BLAKE2b-256 8e6b781b72c3ea9a27b2a8bf80511fb9148a039036b71e9ed0d7a9d6cdffff11

See more details on using hashes here.

Supported by

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