Skip to content

Latest commit

 

History

History
80 lines (55 loc) · 3.69 KB

README.md

File metadata and controls

80 lines (55 loc) · 3.69 KB

Blind Diffie-Hellmann Key Exchange (BDHKE) implementation in Cairo.

GitHub Workflow Status

Bitcoin Nostr Bitcoin Lightning Cairo

About

Blind Diffie-Hellmann Key Exchange (BDHKE) implementation in Cairo.

Usage

Running

scarb cairo-run --available-gas=200000000

This will run the provided Bitcoin Script in Cairo.

Building

scarb build

This will compile all the components.

Testing

scarb test

Scheme description

Taken from RubenSomsen blind ecash Gist.

The goal of this protocol is for Bob to get Alice to perform a Diffie-Hellman key exchange blindly, such that when the unblinded value is returned, Alice recognizes it as her own, but can’t distinguish it from others (i.e. similar to a blind signature).

Alice:
A = a*G
return A

Bob:
Y = hash_to_curve(secret_message)
r = random blinding factor
B'= Y + r*G
return B'

Alice:
C' = a*B'
  (= a*Y + a*r*G)
return C'

Bob:
C = C' - r*A
 (= C' - a*r*G)
 (= a*Y)
return C, secret_message

Alice:
Y = hash_to_curve(secret_message)
C == a*Y

If true, C must have originated from Alice

Resources