Skip to content

Instantly share code, notes, and snippets.

View chepkasov's full-sized avatar

Igor Chepkasov chepkasov

View GitHub Profile
@adil-soubki
adil-soubki / Paillier Cryptovoting
Created April 8, 2014 00:47
Example of a Paillier Cryptosystem voting scheme where voters simply vote yes (1) or no (0) and the votes are tallied up using the homomorphic properties of the Paillier PKC.
#Paillier Cryptovoting System
import math
from Crypto import Random
from Crypto.Random import random
# Modular exponentiation