Skip to main content

vacdec

Python script to decode the EU Covid-19 vaccine certificate, as specified by the EU.

This script takes an image with a QR code of a vaccine certificate as the parameter and will show the certificate's content. It will not validate the signature.

A fork of this script with signature verification exists.

The code is very short and should provide an easy way to understand how these certificates are encoded:

  • The QR code encodes a string starting with "HC1:".
  • The string following "HC1:" is base45 encoded.
  • Decoding the base45 leads to zlib-compressed data.
  • Decompression leads to a CBOR Web Token structure.

setup

You will need the python pillow, pyzbar, cbor2 and base45 packages. Additionally, you need zbar. For Mac OS X, it can be installed via brew install zbar, on Debian systems via apt install libzbar0. Source

You can install them via your distribution or via pip:

pip install base45 cbor2 pillow pyzbar

usage

Run:

./vacdec [image]

[image] can be an image in any format pillow supports, including of course PNG and JPG.

A test certificate can be found here.

author

Written by Hanno Böck.

Metadata

Release files for vacdec 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vacdec 0.0.2
File Size Uploaded Provenance Actions
vacdec-0.0.2.tar.gz 3.3 kB Without provenance Details for vacdec-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vacdec 0.0.2
File Interpreter ABI Platform Actions
vacdec-0.0.2-py3-none-any.whl Python 3 none any Details for vacdec-0.0.2-py3-none-any.whl

Total release size: 7.0 kB

Release files / vacdec-0.0.2.tar.gz

Download URL vacdec-0.0.2.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
10c069ee3a7e6e08f233753bcdd05883e93fdbf15ece44caabcce963a80dabb8
BLAKE2b-256 checksum
How to use checksums
24e2065c758c1e889f92ee7bfaf825828a3f06aa3d1ffc591708935542a78850
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / vacdec-0.0.2-py3-none-any.whl

Download URL vacdec-0.0.2-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb60ca0ed0c77c8871d6b0ac2b3721675fc5ffdd9d494272845257afcf6c3451
BLAKE2b-256 checksum
How to use checksums
ba6ed685e4340d79e13061c0384e39cea551c822aef6ceb232ea9092a704ad43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Security for vacdec 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page