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.2.tar.gz (19.4 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.2-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: isomdoc-0.0.2.tar.gz
  • Upload date:
  • Size: 19.4 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.2.tar.gz
Algorithm Hash digest
SHA256 8b6b5562f6cf609c941b7432411b4ec24a1d75104e6fb3eded0eb22f16a60d4e
MD5 c8a29450ab38a09fcfe0f8b2843f55ac
BLAKE2b-256 a0ca612dd4c318cb792a7ed40bd3e297e7fd1cc4474880b827a0d00c8d709ff6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: isomdoc-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 14a97dbbcfc8c166fdbc20a2b5e396db8e743982411a22e5b0e7f456e155204f
MD5 4039a536eacd9e0b3f5b7d95aa51f248
BLAKE2b-256 9e518b29cb6a5defa38ba100aea5030ea55ce442f3ca034a1bff75999bb24b86

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