Comments (5)
Good point!
from lightphe.
Also I found that when performing export_keys()
in lightphe.__init__ in case of exporting (publishing) the public key, it deletes private key in the process. This leaves the LightPHE object (who should have private key, because it generated it) unable to decrypt.
246: if public is True and keys.get("private_key") is not None:
247: del keys["private_key"]
My current workaround:
gm = LightPHE('Paillier')
gm.export_keys('private.key', public=False)
gm.export_keys('public.key', public=True)
gm = LightPHE('Paillier', key_file='private.key')
Proposed fix:
Don't delete the private_key
from keys
when performing export_keys()
, just export the public_key
pubkey = {'public_key': keys['public_key']}
with open(target_file, "w", encoding="UTF-8") as file:
file.write(pubkey)
@serengil should i create new issue for that?
from lightphe.
@gR0OT yes please
i will fix them all tonight - i hope
from lightphe.
Closed with PR - #19
from lightphe.
Also, release is published in pip
https://pypi.org/project/lightphe/0.0.6/
from lightphe.
Related Issues (17)
- supporting tensors HOT 1
- check the availability of private key in encrypt decrypt HOT 1
- Store coming module in logger class HOT 1
- add homomorphic operation support for encrypted tensors HOT 1
- Support multi-dimensional vectors (tensors)
- Public key export deletes private key HOT 1
- solving dlp and ecdlp not with brute borce
- Multiplication with a Plain Constant doesn't work HOT 6
- Paillier not working with scalar non-integer float HOT 16
- Goldwasser-Micali decryption fails for larger keys
- Effective key generation for Naccache-Stern
- support negative numbers HOT 1
- Creating classes for each cryptosystem
- printing ciphertexts not dumping its value HOT 1
- I should create ciphertext object with number HOT 1
- encrypt float numbers if possible HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightphe.