Skip to content

Commit

Permalink
small improvement to ecqv example for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
jaromil committed Nov 11, 2018
1 parent 2fb1e18 commit d2601b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/implicit-certificate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ certification = { public = certpub,
statement = declaration.statement,
certifier = str("Mad Hatter") }
CERT = sha256(OCTET.serialize(certification))
CERThash = INT.new(CERT, order)
CERThash = INT.new(CERT,order)
-- private key reconstruction data
certpriv = (CERThash * certkey.private + CA.private) % order
certpriv = (CERThash * certkey.private + CA.private)
-- CA sends to Requester certpriv and CERThash
-- eventually CA broadcasts certpub and CERThash

-- ... on the other side of the mirror ...

-- Alice has received from the CA the certpriv and CERT
-- which can be used to create a new CERTprivate key
CERTprivate = (certpriv + CERThash * certreq.private) % order
CERTprivate = (CERThash * certreq.private + certpriv) % order

-- Anyone may receive the certpub and CERThash and, knowing the CA
-- public key, can recover the same CERTpublic key from them
Expand Down

0 comments on commit d2601b3

Please sign in to comment.