Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program information #15

Open
THEMONSTERNICK opened this issue Dec 22, 2021 · 1 comment
Open

Program information #15

THEMONSTERNICK opened this issue Dec 22, 2021 · 1 comment

Comments

@THEMONSTERNICK
Copy link

Hi I saw your program on the generation of the green pass and I was very interested in cryptography and how they are encrypted and encoded, I would like to ask you for more information on how it works, if a person has a private key it is possible to generate a green pass valid with this script? And how and in what form should the private key be inserted into the code? thanks in advance for the reply.

@royarisse
Copy link

To generate a Greenpass, the raw data (JSON) is sent to a trusted signing server. This server returns a signature to be added. The result — a CBOR Web Token: CBOR with COSE signature — is returned back to the generating app, Zlib-compressed, Base45 encoded and stored into the QR. The signing process uses asymmetric encryption: the private key can both encrypt en decrypt, but the public key can only decrypt. Therefore, the QR scanner app can only verify if the signature was valid.

So, to answer your question: Yes, if you have a valid private key, you can generate valid Greenpasses. If a private key gets leaked however, they'll get blacklisted. The scanner apps update valid public keys periodically to ensure they don't accept passes generated with blacklisted keys.

Check these pages if you'd like to learn more:

To be honest, Im currently still researching, since I don't know the exact encryption algorithm used, nor do I know how the signing server knows it can trust the request from the generating app(s).

Hope this helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants