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_mdoc 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.4.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.4-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for isomdoc-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d17b19bc0032164681f2f9ae8275421a16ef818b5c5d13dc5617933535a725ec
MD5 ca4df8be13a460bab20ef0adae60e651
BLAKE2b-256 7c2e614d06dece3b15dd257637dac31f9260d5713a648ed78a604e2c187e83bc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for isomdoc-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1e8c93a909b05b0c6c54c309887976f6633c141b64d4ecb4a1a0a7cd9e2a2b62
MD5 090f0007f554703d1dbc2c904bdc90ae
BLAKE2b-256 f58a39532bfb3535e45617cd76b498a99f9b86b118f18a1ace61c43f6b235902

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