https://github.com/hardbyte/paillier.js
A library for Partially Homomorphic Encryption in Javascript
https://github.com/hardbyte/paillier.js
Last synced: 8 months ago
JSON representation
A library for Partially Homomorphic Encryption in Javascript
- Host: GitHub
- URL: https://github.com/hardbyte/paillier.js
- Owner: hardbyte
- Created: 2014-11-24T00:22:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-08-10T10:28:14.000Z (over 8 years ago)
- Last Synced: 2025-02-09T07:09:45.225Z (about 1 year ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 21
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# paillier.js
A pure javascript implementation of [python-paillier](https://github.com/NICTA/python-paillier).
Currently relies on jsbn and crypto.
[](https://travis-ci.org/hardbyte/paillier.js)
## What is done?
- [x] Generate paillier keypairs
- [ ] Raw encryption of integers
- [x] Raw encryption of small integers (less than 2^16)
- [x] Deal with encrypting large numbers (see [shortcut](https://github.com/NICTA/python-paillier/blob/master/phe/paillier.py#L129))
- [x] Raw decryption of ciphertext strings into integers
- [ ] Encoded Number
- [ ] Full test coverage
- [ ] Port of python-paillier's [raw encryption tests](https://github.com/NICTA/python-paillier/blob/master/phe/tests/paillier_test.py#L75)
- [ ] Port of python-paillier's [encoded number tests](https://github.com/NICTA/python-paillier/blob/master/phe/tests/paillier_test.py#L134)
- [ ] Port of python-paillier's [encrypted number tests](https://github.com/NICTA/python-paillier/blob/master/phe/tests/paillier_test.py#L332)
- [ ] Port of python-paillier's [keyring tests](https://github.com/NICTA/python-paillier/blob/master/phe/tests/paillier_test.py#L963)
- [ ] in-browser tests ([crypto-browserify](https://github.com/dominictarr/crypto-browserify) may come in handy)
# Paillier
The homomorphic properties of the paillier crypto system are:
Encrypted numbers can be multiplied by a non encrypted scalar.
Encrypted numbers can be added together.
Encrypted numbers can be added to non encrypted scalars.