Skip to content

Cashu Protocol ZK engine. Blind Diffie-Hellmann Key Exchange (BDHKE) implementation in Cairo.

License

Notifications You must be signed in to change notification settings

AbdelStark/cashu-zk-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Cashu Protocol ZK engine. Blind Diffie-Hellmann Key Exchange (BDHKE) implementation in Cairo.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published