Browse Source

Reorganizing the directories

pull/1/head
Vitor Pamplona 5 years ago
parent
commit
02e8005087
30 changed files with 28 additions and 42 deletions
  1. +8
    -22
      README.md
  2. +1
    -1
      banknote.html
  3. +0
    -0
      css/style.css
  4. +0
    -0
      css/style.v0.css
  5. +0
    -0
      css/style.v1.css
  6. +0
    -0
      css/style.v2.css
  7. +0
    -0
      css/style.verify.css
  8. +1
    -1
      debug.html
  9. +2
    -2
      index.html
  10. +1
    -1
      index.v-1.html
  11. +1
    -1
      index.v0.html
  12. +1
    -1
      index.v1.html
  13. +1
    -1
      index.v2.html
  14. +1
    -1
      index.v3.html
  15. +1
    -1
      index.v4.html
  16. +1
    -1
      index.v5.html
  17. +0
    -0
      keys/ecdsa_private_key
  18. +0
    -0
      keys/ecdsa_private_key8.pem
  19. +0
    -0
      keys/ecdsa_pub_key
  20. +0
    -0
      keys/rsa_private_key
  21. +0
    -0
      keys/rsa_pub_key
  22. +1
    -1
      liberty.html
  23. +1
    -1
      opencerta.html
  24. +1
    -1
      us.ma.id.html
  25. +1
    -1
      verify.html
  26. +1
    -1
      verify.java
  27. +1
    -1
      verify.py
  28. +1
    -1
      verify.rb
  29. +1
    -1
      verify.sh
  30. +1
    -1
      vial.html

+ 8
- 22
README.md View File

@ -1,27 +1,13 @@
# Signed Vaccine Certificate Generator
# Paper-first Verifiable Credentials URI Demos
JavaScipt-based web app to generate a Vaccine Certification in a alphanumeric QR Code that is signed by the Health Provider.
Users can distribute their certificates to prove they have been vaccinated and are free of COVID-19.
The complete specification documentation is [here](https://github.com/Path-Check/paper-cred)
This repository includes a set of demos to sign and verify QR-based credentials created with the PathCheck Foundation URI specification: [here](https://github.com/Path-Check/paper-cred). Demos are available for multiple payloads in HTML+JavaScript and minimum implementations in Ruby, Java, Python and Shell Script.
<img src="./docs/QRCodeGenerator.png" data-canonical-src="./docs/QRCodeGenerator.png"/>
## Certificate Specification
The certificate is the signed record that prove a patient name has taken a vaccine. It follows the format of [paper-creds](https://github.com/Path-Check/paper-cred):
```
cred:type:version:signature:publicKeyId:payload
```
Example:
```
CRED:BADGE:1:GBCAEIBOFEBIZUXYC2D6EYOBJURKOQ5KQ3F4YLAUBMO3MY52E6QSVNMIAQBCAOTWMM5VZTWW3USVQLNCNNNAGXJ4PW3JYKL6TWMKZXDJA5E2CPPC:PCF.VITORPAMPLONA.COM:20210303/MODERNA/COVID-19/012L20A/28/TCXRTFWS4NAADDA5N76GOUIYUP54BCY5DLYUVU2YIISKVKNTR7VA/C28161/RA/500
````
## Try it out!
# Try it out!
This webapp has been deployed [here](https://vitorpamplona.com/vaccine-certificate-qrcode-generator/).
* [Signer and Verifiers in HTML/JavaScript](https://github.pathcheck.org/index.html)
* [Signer and Verifier Snippet in Python](https://github.com/Path-Check/paper-cred-demo/blob/main/verify.py)
* [Signer and Verifier Snippet in Ruby](https://github.com/Path-Check/paper-cred-demo/blob/main/verify.rb)
* [Signer and Verifier Snippet in Java](https://github.com/Path-Check/paper-cred-demo/blob/main/verify.java)
* [Signer and Verifier Snippet in zSh Script](https://github.com/Path-Check/paper-cred-demo/blob/main/verify.sh)

+ 1
- 1
banknote.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v2.css">
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Banknote Signed Certificate Proposal</title>
</head>


style.css → css/style.css View File


style.v0.css → css/style.v0.css View File


style.v1.css → css/style.v1.css View File


style.v2.css → css/style.v2.css View File


style.verify.css → css/style.verify.css View File


+ 1
- 1
debug.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v2.css">
<link rel="stylesheet" href="css/style.v2.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Certificate Verifier</title>
</head>


+ 2
- 2
index.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Paper-first Verifiable Credentials Generator</title>
</head>
@ -24,7 +24,7 @@
<h3>Vendor-specific Payloads</h3>
<div style="margin: 0 12px;">
<button onclick="location.href='ibm.html'">V1.0 - Signed NY Excelsior HealthPass W3C Credential</button>
<button onclick="location.href='liberty.html'">V1.0 - Signed NY Excelsior HealthPass W3C Credential</button>
<br/ ><br/>
</div>
<div style="margin: 0 12px;">


+ 1
- 1
index.v-1.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v0.css">
<link rel="stylesheet" href="css/style.v0.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>QR Code Generator</title>
</head>


+ 1
- 1
index.v0.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v0.css">
<link rel="stylesheet" href="css/style.v0.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>QR Code Generator</title>
</head>


+ 1
- 1
index.v1.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v1.css">
<link rel="stylesheet" href="css/style.v1.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Signed Vaccine Certificate Generator</title>
</head>


+ 1
- 1
index.v2.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v2.css">
<link rel="stylesheet" href="css/style.v2.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Vaccine Distribution Certificates Generator</title>
</head>


+ 1
- 1
index.v3.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v2.css">
<link rel="stylesheet" href="css/style.v2.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Vaccine Distribution Certificates Generator</title>
</head>


+ 1
- 1
index.v4.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v2.css">
<link rel="stylesheet" href="css/style.v2.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Vaccine Distribution Certificates Generator</title>
</head>


+ 1
- 1
index.v5.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v2.css">
<link rel="stylesheet" href="css/style.v2.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Vaccine Distribution Credentials Generator</title>
</head>


ecdsa_private_key → keys/ecdsa_private_key View File


ecdsa_private_key8.pem → keys/ecdsa_private_key8.pem View File


ecdsa_pub_key → keys/ecdsa_pub_key View File


private_key → keys/rsa_private_key View File


pub_key → keys/rsa_pub_key View File


ibm.html → liberty.html View File


+ 1
- 1
opencerta.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v2.css">
<link rel="stylesheet" href="css/style.v2.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Vaccine Distribution Certificates Generator</title>
</head>


+ 1
- 1
us.ma.id.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v2.css">
<link rel="stylesheet" href="css/style.v2.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Massachusetts Signed Driver's License Proposal</title>
</head>


+ 1
- 1
verify.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.verify.css">
<link rel="stylesheet" href="css/style.verify.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Certificate Verifier</title>
</head>


+ 1
- 1
verify.java View File

@ -49,7 +49,7 @@ public class verify {
public static PrivateKey getPrivateKey() throws Exception {
KeyFactory kf = KeyFactory.getInstance("EC");
String privKeyPEM = new String(Files.readAllBytes(Paths.get("ecdsa_private_key8.pem")));
String privKeyPEM = new String(Files.readAllBytes(Paths.get("keys/ecdsa_private_key8.pem")));
privKeyPEM = privKeyPEM.replaceAll("\\n", "")
.replace("-----BEGIN PRIVATE KEY-----", "")
.replace("-----END PRIVATE KEY-----", "");


+ 1
- 1
verify.py View File

@ -69,7 +69,7 @@ print("Resigning same payload")
print("")
# Loading private key
with open("ecdsa_private_key") as f:
with open("keys/ecdsa_private_key") as f:
sk = SigningKey.from_pem(f.read())
[schema, qrtype, version, _, pubKeyLink, payload] = parseQR(qr)


+ 1
- 1
verify.rb View File

@ -75,7 +75,7 @@ puts 'Resigning same payload'
puts ''
(schema, qrtype, version, _, pub_key_link, payload) = uri.split(/:/)
sk = OpenSSL::PKey::EC.new(File.read('ecdsa_private_key'))
sk = OpenSSL::PKey::EC.new(File.read('keys/ecdsa_private_key'))
new_qr = sign_and_format_qr(sk, schema, qrtype, version, pub_key_link, payload)
puts "New QR Signed\t #{new_qr}"


+ 1
- 1
verify.sh View File

@ -48,7 +48,7 @@ parseAndVerifyQR () {
}
signAndFormatQR () {
local signatureBase32=$(echo -n $5 | openssl dgst -sign ecdsa_private_key | base32 --wrap=0 | sed s/=//g)
local signatureBase32=$(echo -n $5 | openssl dgst -sign keys/ecdsa_private_key | base32 --wrap=0 | sed s/=//g)
newQR=$(echo "$1:$2:$3:$signatureBase32:$4:$5")
}


+ 1
- 1
vial.html View File

@ -1,6 +1,6 @@
<!doctype html>
<head>
<link rel="stylesheet" href="style.v2.css">
<link rel="stylesheet" href="css/style.v2.css">
<link rel="shortcut icon" href="https://www.pathcheck.org/hubfs/Favicon.png">
<title>Vial Signed Certificate Proposal</title>
</head>


Loading…
Cancel
Save