Skip to content

ibudisteanu/Anonymous-Zether.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anonymous Zether in Javascript

Anonymous Zether solidity contracts developed by J.P. Morgan and implemented in pure Javascript.

Improvements :

1. Whisper protocol

Whisper the balance b on chain by encrypting b using the shared secret.
Idea suggestion by Zhou Zhiyao @zzy96

1.1 Whisper to receiver:

Given:

alt text - balance of transaction
alt text - index of the receiver
alt text - public key of the receiver
alt text - secret of the receiver
alt text - public view key

Computing the proof hiding the balance for receiver
alt text

Retrieving the secret balance from the sender
alt text

1.2 Whisper to sender:

alt text - index of the sender
alt text - secret of the sender\

Computing the proof hiding the balance for receiver
alt text

Retrieving the secret balance from the sender
alt text

2. Proving amount and receiver without revealing sender

Proving to someone that the transaction sent amount b to the receiver i without revealing who the sender was.
Idea suggestion by @benediamond

A proof (c,s) is computed as follows:
alt text - balance of transaction
alt text - index of the receiver
alt text - public view key
alt text - cipher text

Prover - generating proof (c, s)
alt text - Claim
Given r such alt text
Choosing a random element k in F_q alt text and alt text
alt text - computing c
alt text - computing s

Verifier - verify proof (c, s)
alt text - computing K_r
alt text - computing Y_r
alt text - equation verification

3. Under development:

1. Paying gas in Zether.

It enables Zether to be used as a native currency to pay the gas in Zether to the miners accepting it as gas.

alt text - miner fee
alt text - amount
alt text - cipher text

alt text - Homomorphically subtract b and gas from the sender
alt text - Homomorphically add b to the receiver
alt text - Homomorphically add 0 to the decoys
alt text - Add gas to the miner. Homomorphically add can be performed as well

References

  1. J.P. Morgan codebase of Zether https://github.com/jpmorganchase/anonymous-zether
  2. J.P. Morgan - Anonymous Zether Proposal and Tehnical Report https://github.com/jpmorganchase/anonymous-zether/blob/master/docs/AnonZether.pdf
  3. J.P. Morgan Additional features on Zether https://github.com/jpmorganchase/anonymous-zether/blob/master/docs/AnonZether.pdf
  4. Zether: Towards Privacy in a Smart Contract World https://crypto.stanford.edu/~buenz/papers/zether.pdf

Special thanks

We want to express our gratitude for the implementation and the help offered us over slack and github.

Main contributors

Benjamin Diamond @benediamond

J.P. Morgan @jpmorganchase

Zhou Zhiyao @zzy96 for the Whisper Protocol

Releases

No releases published

Packages

No packages published