summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2021-03-17 12:01:59 +0200
committerYuval Adam <_@yuv.al>2021-03-17 12:01:59 +0200
commit9905cca620c5a94392758a72f34189e6c95c83b0 (patch)
treef71f6fd652fd10f5e867d7c202e7f05b3953d00b /README.md
parent523091f78274cef3679de9f08449c236de88d38a (diff)
Update README
Diffstat (limited to 'README.md')
-rw-r--r--README.md20
1 files changed, 16 insertions, 4 deletions
diff --git a/README.md b/README.md
index d265970..cf8e65d 100644
--- a/README.md
+++ b/README.md
@@ -18,15 +18,25 @@ pipenv sync
### Usage
-#### Option 1 - from QR code image
+Generate a Green Pass or Vaccination Certificate at https://corona.health.gov.il/green-pass/
-Save your Green Pass as a `.png` file and execute:
+#### Option 1 - from PDF
+
+Directly verify your `GreenPass.pdf` or `VaccinationCertificate.pdf`:
+
+```bash
+pipenv run verify -p GreenPass.pdf
+```
+
+#### Option 2 - from QR code image
+
+Save the QR code as a `.png` file (e.g. from screenshot) and execute:
```bash
pipenv run verify -i green_pass_image.png
```
-#### Option 2 - from QR code decoded textual content
+#### Option 3 - from QR code decoded textual content
Decode the QR code payload yourself, put it in a txt file and then execute:
@@ -37,10 +47,10 @@ pipenv run verify -t green_pass_payload.txt
### Output example
```
-Valid signature!
Israeli ID Number 012345678
ID valid by 2021-01-01
Cert Unique ID 01/IL/ABCD1234ABCD1234ABCD1234ABCD1234#ABCD1234
+Valid signature!
```
## Verification Process Details
@@ -59,6 +69,8 @@ Where `Base64EncodedSignature` are 256 bytes of an RSA signature signed with a 2
⚠️ **The current MOH implementation has a pitfall.** ⚠️ The JSON payload is not signed as is, but rather the **SHA256 hash** of the data is signed. This effectively means the payload is hashed twice, once manually, and once as part of the signature verification scheme.
+Some certificates now have `ct=2` which is not double hashed. This implementation supports both versions.
+
### Certificates
The Ministry of Healthy RSA certificate seems to be available at https://ramzorfiles.z6.web.core.windows.net/RamzorQRPubKey.der