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.
docs/certificates.md
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.
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:
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:
so decoding can be done by following the same steps in reverse:
HC1:XXXXXXX...
HC1:
header-260
.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
.