A TypeScript library that enables fully homomorphic encryption voting with integrated zero-knowledge proofs using the Paillier cryptosystem.
npm install mind-paillier-voting-sdkmind-paillier-voting-sdk is a TypeScript library designed for secure and privacy-preserving voting systems. The package leverages Fully Homomorphic Encryption (FHE) and Zero-Knowledge (ZK) proofs to generate keys, encrypt votes, and verify proofs, ensuring the confidentiality and integrity of the voting process.
- Key Generation: Easily generate public and private FHE keys.
- Serialization Utilities: Serialize and deserialize keys for storage or transmission.
- Encryption & Decryption: Encrypt numbers (votes) and decrypt aggregated results.
- Zero-Knowledge Proofs: Create and verify ZK proofs to ensure vote validity.
Install the package via npm:
``bash`
npm install mind-paillier-voting-sdk
parameter defines the number range.
- encryptNumber(number): Encrypts a vote and returns a set of proofs.
- Verifier(publicKey): Creates a new verifier instance.
- verifyNumber(proofs, proofValidTimeInMinutes): Verifies the ZK proofs to ensure the vote's validity.Usage
examples/demo.ts` file in this repository.This project is licensed under the MIT License. See the LICENSE file for details.