Homomorphic Encryption Demo

Dual-custody Paillier encryption · all crypto runs client-side in your browser

STEP 0Name the Key Holders

Give the two key-custody parties a name. These names are used throughout the demo — they never leave your browser.

STEP 1Key Generation

Generate a 2048-bit Paillier public/private keypair. The private key is split — Alice holds p, Bob holds q. Neither can decrypt alone.

STEP 2Cast a Vote

Paste the public key, choose a candidate. Your vote is encrypted with Paillier before leaving this page — the tally conductor sees only ciphertext.

STEP 3Tally the Votes

The poll conductor adds encrypted votes together using homomorphic addition. The running total stays encrypted — the conductor never sees individual votes or the final count.

STEP 4Reveal Results

Both Alice and Bob must provide their key parts to reconstruct the private key and decrypt the tally. Either party withholding their key prevents decryption entirely.