Decode your Green Pass using Linux tools

www.corentindupont.info
4 min read
fairly easy
Article URL: http://www.corentindupont.info/blog/posts/Programming/2021-08-13-GreenPass.html Comments URL: https://news.ycombinator.com/item?id=28330045 Points: 1 # Comments: 0
Decode your Green Pass using Linux tools

I recently got my Green Pass. So I got curious: What's inside? How does it works? A quick search on Internet gives various sites that can decode the data. Say, this is my Green Pass:

My QR code

For example, this website gives the result:

Vaccination Group Dose Number:1 Marketing Authorization Holder:ORG-100030215 vaccine or prophylaxis:1119349007 ISO8601 complete date: Date of Vaccination:2021-02-18 Country of Vaccination:AT Unique Certificate Identifier: UVCI:URN:UVCI:01:AT:10807843F94AEE0EE5093FBC254BD813#B vaccine medicinal product:EU/1/20/1528 Certificate Issuer:Ministry of Health, Austria Total Series of Doses:2 disease or agent targeted:840539006 Surname(s), forename(s) Standardised surname:MUSTERFRAU Surname:Musterfrau-Gößinger Standardised forename:GABRIELE Forename:Gabriele Schema version:1.2.1 Date of birth:1998-02-26

From a privacy standpoint, that seems OK. There is only your name, surname, date of birth. The other informations are related to the vaccine you took.

As a Linux guy I was curious to see if I can decode it myself using only command line tools. There are already some programs to decode your Green Pass, in python, javascript or php. But why do things the easy way if there is a hard way to do them?? Linux cli has plenty of tools to do this kind of things. Let's see…

If you are in a hurry, you can skip directly to the Summary section.

Preliminary

Before we begin, we need to install some tools. The EU Green Pass is based on QR code, CBOR and base45, so we need to install the corresponding tools.

# QR code reader $ sudo apt-get install zbar-tools # base45 decoder. You need Python3.7 installed. $ sudo pip install base45 # CBOR analyser. You need Ruby installed. $ sudo gem install cbor-diag

With this heterogeneous toolbox installed, let's go!

Decode the GreenPass

To decode the Green Pass, the first thing is to read the QR code. You need to download your green pass as an image named QR.png .…
Read full article