All Projects → floysh → DCC-green-pass-decoder

floysh / DCC-green-pass-decoder

Licence: MIT license
A simple web app to decode EU Digital Covid Certificate/Green Pass QR codes.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to DCC-green-pass-decoder

greenpass-covid19-qrcode-decoder
An easy tool for decoding Green Pass Covid-19 QrCode
Stars: ✭ 64 (+52.38%)
Mutual labels:  decoder, qrcode, greenpass
it-dgc-opendata
Open Data on the European Digital Covid Certificates (EU DCC) issued and acquired by the national platform
Stars: ✭ 25 (-40.48%)
Mutual labels:  digital-covid-certificate, greenpass
verificac19-sdk
✅ Official VerificaC19 Node.js SDK
Stars: ✭ 51 (+21.43%)
Mutual labels:  digital-covid-certificate, greenpass
QRCode-Decoder
An iOS QRCode Scanner and Decoder
Stars: ✭ 17 (-59.52%)
Mutual labels:  decoder, qrcode
Qrcode
qrcode scanner ( decoder ) by golang 二维码扫描识别
Stars: ✭ 233 (+454.76%)
Mutual labels:  decoder, qrcode
qrcode-decoder
🤘Tool for decoding qrcode by image,video or camera.
Stars: ✭ 78 (+85.71%)
Mutual labels:  decoder, qrcode
Oysterkit
OysterKit is a framework that provides a native Swift scanning, lexical analysis, and parsing capabilities. In addition it provides a language that can be used to rapidly define the rules used by OysterKit called STLR
Stars: ✭ 167 (+297.62%)
Mutual labels:  decoder
Codable Diy Kit
A template for creating your own Swift Codable encoders and decoders
Stars: ✭ 207 (+392.86%)
Mutual labels:  decoder
Ctc pytorch
CTC end -to-end ASR for timit and 863 corpus.
Stars: ✭ 161 (+283.33%)
Mutual labels:  decoder
Salsanext
Uncertainty-aware Semantic Segmentation of LiDAR Point Clouds for Autonomous Driving
Stars: ✭ 153 (+264.29%)
Mutual labels:  decoder
taro-code
Taro Barcode & QRCode
Stars: ✭ 88 (+109.52%)
Mutual labels:  qrcode
Ethereum Input Data Decoder
Ethereum smart contract transaction input data decoder
Stars: ✭ 242 (+476.19%)
Mutual labels:  decoder
Basecrack
Decode All Bases - Base Scheme Decoder
Stars: ✭ 196 (+366.67%)
Mutual labels:  decoder
Dav1d
A read-only mirror of dav1d source code repository. The origin is at https://code.videolan.org/videolan/dav1d/
Stars: ✭ 168 (+300%)
Mutual labels:  decoder
Codablecsv
Read and write CSV files row-by-row or through Swift's Codable interface.
Stars: ✭ 214 (+409.52%)
Mutual labels:  decoder
Gojay
fastest JSON encoder/decoder with powerful stream API for Golang
Stars: ✭ 2,009 (+4683.33%)
Mutual labels:  decoder
Jayson
🧱 A JSON decoding/encoding library that handles optimistically or strictly.
Stars: ✭ 243 (+478.57%)
Mutual labels:  decoder
Ffmediatoolkit
FFMediaToolkit is a cross-platform video decoder/encoder library for .NET that uses FFmpeg native libraries. It supports video frames extraction, reading stream metadata and creating videos from bitmaps in any format supported by FFmpeg.
Stars: ✭ 156 (+271.43%)
Mutual labels:  decoder
Goq
A declarative struct-tag-based HTML unmarshaling or scraping package for Go built on top of the goquery library
Stars: ✭ 192 (+357.14%)
Mutual labels:  decoder
Ks265codec
ks cloud hevc(h265) encoder decoder test and description
Stars: ✭ 192 (+357.14%)
Mutual labels:  decoder


Markdownify

EU Digital COVID Certificate decoder

A Progressive Web App that can read EU Digital COVID Certificate QR-codes.

This is just a toy app I made while being curious to look at what's inside my own Green Certificate. Unlike other decoders available online, it doesn't require to set up dependencies or upload the certificate to a remote server. It can be used by average users without having to interact with the terminal (scary! hacker stuff! 🐱‍💻).

All the processing is done locally and your certificate never leaves your device.


🚀 Try it live on https://floysh.github.io/DCC-green-pass-decoder/


Features

  • No need to set up an environment: just load the page and you're ready to scan! 😎
  • Progressive Web App, can work offline and be installed on many devices like a native app.
  • Can both display the raw certificate or parse it to make the fields human readable.
  • Can both load the QR-code from an existing file or scan it using the device camera
  • Signature validation. A list of the certificates used for this purpose can be found in docs/certificates.md

How to edit

Clone the repository:

git clone https://github.com/floysh/DCC-green-pass-decoder

Install dependencies:

cd ./DCC-green-pass-decoder
npm install

Run the watcher:

npm run watch

this will generate new builds of the JS bundle whenever it detects something has changed in the src/ folder.

Then start your favorite local webserver in public/

When you're satisfied with the edits, stop the watcher and make an optimized JS bundle:

npm run build

This will minify the javascript and reduce the bundle.js file size.


How does it work

Decoding the QR-code

It's fairly easy to decode an EU DCC. The official EU repository states that the certificate is a COSE message / CBOR Web Token (CWT).

The COSE message structure is the following:

  • protected (signed) header: this field contains some information about the certificate signature. The only interesting information here is the Key Identifier (KID), which can be used by a validator app to efficiently retrieve the correct key that needs to be used in the signature validation step.
  • unprotected header: non-critical information about the CWT may be stored here. This field is not signed, so its integrity cannot be guaranteed. It was empty on all the certificates I tried to decode.
  • payload: this field is a CBOR map containing the actual DCC JSON document.
  • signature: the signature is what ensures the authenticity of the certificate.

A more detailed description of this structure can be found on the Electronic Health Certificate Specification repository from the European Health Network.

This is the encoding pipeline:

docs/overview.png

so decoding can be done by following the same steps in reverse:

  • Read the QR-code
    • acquire an image of the code
    • decode it to string. It should be something like HC1:XXXXXXX...
  • Decode the certificate string
    • Remove the HC1: header
    • Decode with a Base45 decoder.
    • Decompress with zlib deflate to obtain the COSE message
  • Extract the certificate
    • Deserialize the COSE message.
    • Extract the COSE payload. It's a CBOR document
    • Decode the CBOR
      • The certificate JSON document can be found in the payload, at claim -260.

Signature validation

This was a bit more time consuming, mainly because there's no documented way to get some required files and I'm by no means an expert in dealing with crypto algorithms or digital signatures.

Further details on how this feature has been implemented can be found in docs/signature-validation.md.

Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].