-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can you please provide some code for performing homomorphic encryption on text files or string #1
Comments
Hello! from damgard_jurik import keygen
public_key, private_key_ring = keygen(
n_bits=64,
s=1,
threshold=3,
n_shares=3
)
text = "String to Encrypt"
msg_list = list(map(int, text))
cipher_list = public_key.encrypt_list(msg_list) Cheers! |
In order to make this as easy as possible, perhaps we should extend the library to allow the encryption of strings. @swansonk14 can you think of any reason not to overload the generic encryption function with different behaviors for different arg types? If not, I'm happy to branch off and PR. |
I think it should definitely be possible to extend the encryption/decryption functions to handle different data types. I'll try to implement this functionality sometime this week. |
@nickboucher I got an error when I tried running your code .........but replacing "int" with "ord" solved that error. I think that's the ASCII value of each word I guess but what does mpz mean. |
@sandeephr We'll release a wrapper around this within the package soon. |
ok sir thank you |
I have two questions
|
@sandeephr You can certainly look inside the key objects and see the underlying data. Check the |
@swansonk14 I created a branch with a wrapper for string encryption. Originally I thought that it would be nice to just overload the In the meantime, I'll make a PR and request your review! :) |
I need to perform homomorphic encryption on my files such as text pdf and few more can I do it in homomorphic encryption similar to AES and DES
The text was updated successfully, but these errors were encountered: