zero-elgamal

Crates.iozero-elgamal
lib.rszero-elgamal
version0.1.11
sourcesrc
created_at2022-04-06 00:31:49.87796
updated_at2023-04-28 07:21:02.101715
descriptionlifted elgamal encryption implementation
homepagehttps://github.com/KogarashiNetwork/Kogarashi
repositoryhttps://github.com/KogarashiNetwork/elgamal
max_upload_size
id562850
size11,716
Karbushev Kirill (KiriosK)

documentation

README

ElGamal Encryption crates.io badge

This crate provides additive homomorphic ElGamal encryption over jubjub curve and also supports fully no_std and parity-scale-codec.

Scheme

Alice has balance $a$ and public key $b$.
She generates the randomness $r$ and computes encrypted balance $(g^r, g^a * b^r)$.
When Bob transfers $c$ to Alice, he generates the randomness $r'$ and computes encrypted transfer amount $(g^{r'}, g^c * b^{r'})$.
The sum of encrypted balance and transfer amount is folloing.

$$ (g^{r + r'}, g^{a + c} * b^{r + r'}) $$

Commit count: 7

cargo fmt