LayerXcom / zero-chain

A privacy-preserving blockchain on Substrate
https://layerxcom.github.io/zerochain-book/
GNU General Public License v3.0
260 stars 43 forks source link

Implement the homomorphic encryption in circuit #46

Closed osuketh closed 5 years ago

osuketh commented 5 years ago

For simplicity, we should add the homomorphic encryption like ElGamal or lifted-ElGamal, paillier instead of pedersen commitment.

osuketh commented 5 years ago

Add the lifted-ElGamal. It will encrypt the 32 bits integer and might need the suited statistical algorithm for the decryption of the transfer value. Anyway, the lifted-ElGamal is not expensive rather than paillier.

osuketh commented 5 years ago

The algorithm of Lifted-Elgamal

osuketh commented 5 years ago

TODO: https://github.com/LayerXcom/zero-chain/blob/47aaa49df4e58f8be20e89c68c260da8b5daaad8/proofs/src/circuit_transfer.rs#L212-L219