Skip to content
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

Extending support to numpy #36

Open
giorgiop opened this issue Jun 15, 2017 · 1 comment
Open

Extending support to numpy #36

giorgiop opened this issue Jun 15, 2017 · 1 comment

Comments

@giorgiop
Copy link

giorgiop commented Jun 15, 2017

It would be useful to support numpy arrays. The following example does not work. We should aim to get a vector of encrypted numbers as result.

import phe as paillier
import numpy as np
pubkey, prikey = paillier.generate_paillier_keypair(n_length=1024)
x = np.ones(10)
e = pubkey.encrypt(x)
@giorgiop
Copy link
Author

Additionally, we must be able to multiply encrypted scalar with numpy arrays in the clear.

e = pubkey.encrypt(1.0)
e * x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant