From 065bcf83a544f9627270c93ee115da66f0b523e2 Mon Sep 17 00:00:00 2001 From: rlack Date: Thu, 29 Dec 2022 07:33:27 +0100 Subject: [PATCH 1/2] Update b_dhke.py I was a little bit confused by this comment, I think the mint and client got mixed up --- cashu/core/b_dhke.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cashu/core/b_dhke.py b/cashu/core/b_dhke.py index 8d0d6db..ce511fb 100644 --- a/cashu/core/b_dhke.py +++ b/cashu/core/b_dhke.py @@ -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 From 6d0ac86608bb60d2c3074b45164ec36dd3790a38 Mon Sep 17 00:00:00 2001 From: rlack Date: Fri, 30 Dec 2022 13:07:17 +0700 Subject: [PATCH 2/2] Update b_dhke.py --- cashu/core/b_dhke.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cashu/core/b_dhke.py b/cashu/core/b_dhke.py index ce511fb..80735ef 100644 --- a/cashu/core/b_dhke.py +++ b/cashu/core/b_dhke.py @@ -27,7 +27,7 @@ return C, secret_message Bob: Y = hash_to_curve(secret_message) C == a*Y -If true, C must have originated from Alice +If true, C must have originated from Bob """ import hashlib