Update b_dhke.py

I was a little bit confused by this comment, I think the mint and client got mixed up
This commit is contained in:
rlack
2022-12-29 07:33:27 +01:00
committed by GitHub
parent e9b5f93698
commit 065bcf83a5

View File

@@ -3,28 +3,28 @@
"""
Implementation of https://gist.github.com/RubenSomsen/be7a4760dd4596d06963d67baf140406
Alice (Client):
Bob (Mint):
A = a*G
return A
Bob (Mint):
Alice (Client):
Y = hash_to_curve(secret_message)
r = random blinding factor
B'= Y + r*G
return B'
Alice:
Bob:
C' = a*B'
(= a*Y + a*r*G)
return C'
Bob:
Alice:
C = C' - r*A
(= C' - a*r*G)
(= a*Y)
return C, secret_message
Alice:
Bob:
Y = hash_to_curve(secret_message)
C == a*Y
If true, C must have originated from Alice