Quantcast
Channel: Hacker's ramblings
Viewing all articles
Browse latest Browse all 519

EU Digital COVID Certificate trust-lists

$
0
0

It seems vacdec is one of my most popular public projects. I'm getting pull requests, comments and questions from number of people.

Thank you for all your input! Keep it coming. All pull requests, bug fixes and such are appreciated.

Briefly, this is about decoding EU digital COVID certificate QR-codes. For more details, see my blog post from August -21 or the Python source-code at https://github.com/HQJaTu/vacdec.

Quote from my original post: "the most difficult part was to get my hands into the national public certificates to do some ECDSA signature verifying".

My original code has tool called fetch-signing-certificates.py to do the heavy lifting. It fetches a list of X.509 certificates which are used in signing the QR-code's payload. That list is stored into your hard drive. When you do any COVID certificate decoding, that list is iterated with purpose of finding the key used when the QR-code was generated. If the trust-list contains the cert, signature will be verified and a result from that will be given.

To state the obvious: That precious trust list will contain all signature certificates from all countries using the same EU COVID certificate QR-code system. The list of countries is long and includes all 27 EU-countries. Among participating non-EU countries are: Andorra, United Arab Emirates, Swizerland, Georgia, Iceland, Liechtenstein, Morocco, Norway, Singapore, San Marino, Ukraine, Vatican. Looking at the country-list, it is easy to see how EU COVID passport is a triumph of open-source!

On the flipside, getting signing certificates from all those countries requires some effort. A participating country first needs to generate and secure (emphasis: SECURE the private key) required number of ECDSA public/private key -pairs to all organizations/parties doing the COVID certificate issuing. Of those key-pairs COVID certificate signing X.509 certificates can be created and public certificate will be added to the common trust-list.

As an example, in my home country of Finland up until recently there used to be one (1 as in single) X.509 cert for entire nation of 5,6 million people, now there is two. Ultimately, pretty much everybody gets their COVID certs signed from a single cert. This is because in Finland issuing the certs is centralized. On the other hand bigger countries need to have multiple X.509 certs as their government organization may be different and less centralized. A good example is Germany, the most populous countru in Europe and a federal state consisting of 17 constituent states. Having single cert would not make sense in their government.

Moving on. Countries deliver their public certificates into some EU "central repository". It is not known how and where this is, but I'm assuming one has to exist. From this repository the participating countries are allowed the retrieve the trust-list for their verification needs. Subsequently the list is distributed by the country to those organizations and people needing to do COVID certificate verification. Remember "get my hands into the national public certificates"? Not all countries do the distributing very easily nor publicly. Some do, and that's where I get my data from.

Now that there is access of trust-lists, factor in time. That little devil is always messing everything up! :-)
In August, when I first download the Austrian list, the entire list had 150+ valid signing certs. Early December -21 there was 192. Early January -22 there was already 236. Today, the Austrian list contains 281 signing certificates. However, Swedish list has only 267. Argh! I'd really really need access to that EU endpoint for trust lists.

As the Austrian list is larger, here are the per-country statistics of 9th January 2022, expect this to change almost daily:

Number of EU COVID certificate signing X.509 certificates issued by country
Country ISO 3166-2 codeCount signing certsEU member country nameParticipating country nameTest data exists
DE57Germany x
FR50France x
ES23Spain x
NL21Netherlands x
CH13 Switzerlandx
MT12Malta x
LU8Luxembourg x
GB6 UK 
LI6 Liechtensteinx
NO6 Norwayx
IT4Italy x
NZ4 New Zealand 
LT3Lithuania x
LV3Latvia x
MC3 Monaco 
PL3Poland x
AL2 Albania 
AT2Austria x
BE2Belgium x
BG2Bulgaria x
CZ2Czech Republic x
DK2Denmark x
EE2Estonia x
FI2Finland x
FO2 Faroe Islands 
GE2 Georgiax
HR2Croatia x
IE2Ireland x
IS2 Icelandx
MK2 North Macedonia 
SE2Sweden x
SG2 Singaporex
AD1 Andorrax
AE1 United Arab Emiratesx
AM1 Armenia 
CV1 Cabo Verde 
CY1Cyprus x
GR1Greece x
HU1Hungary  
IL1 Israel 
LB1 Lebanon 
MA1 Moroccox
MD1 Moldova 
ME1 Montenegro 
PA1 Panama 
PT1Portugal x
RO1Romania x
RS1 Serbia 
SI1Slovenia x
SK1Slovakia x
SM1 San Marinox
TG1 Togo 
TH1 Thailand 
TN1 Tunisia 
TR1 Turkey 
TW1 Taiwan 
UA1 Ukrainex
UY1 Uruguay 
VA1 Vaticanx
 281273238

Any test data provided by participating country is at: https://github.com/eu-digital-green-certificates/dgc-testdata

Things to note from above table:

  • Countries have their government arranged with lot of different variations.
  • More certificates --> more things to secure --> more things to be worried about.
    • In Germany somebody got access to a cert and issued QR-codes not belonging to actual persons.
  • Lot of countries outside EU chose to use this open-source the system.
    • Assume more countries to join. No need for everybody to invent this system.
  • Lack of test data
    • In EU, it is easy to make test data mandatory. Outside EU not so much.
    • Way too many countries have not provided any sample certificates.
  • Faroe Islands have 50k people, two certs.
    • Okokok. It makes sense to have already issued two. If one cert leaks or gets "burned" for any reason, it is fast to re-issue the COVID certificates by using the other good cert.
  • Country stats:
    • Liechtenstein has 40k people, 6 certs! Whooo!
    • Malta and Cabo Verde have 500k people. Maltese need 12 certs for all the signing! In Cabo Verde they have to do with only one.
    • Vatican is the smallest country in the entire World. Single cert needed for those 800+ persons living there.
    • Italy has 60M people, they manage their passes with only 4 certs. Nice!
  • In total 59 countries participating this common system. Adoption is wide, system is well designed.

Also note how "EU" COVID passport has more participating countries outside EU. :-)
True testament of open-source, indeed!


Viewing all articles
Browse latest Browse all 519

Trending Articles