I hereby claim:
- I am randhindi on github.
- I am randhindi (https://keybase.io/randhindi) on keybase.
- I have a public key whose fingerprint is 98BA 8D5F 66E4 2674 40F1 3672 8477 4711 8743 5CAE
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import hnumpy as hnp | |
import numpy as np | |
weights = np.array([0.1, 0.2, 0.3, 0.4, 0.5]) | |
bias = np.array([0.1]) | |
def sigmoid(x): | |
return 1 / (1 + np.exp(-x)) | |
def func(x): |
h = hnp.compile_fhe( | |
func, | |
{'x': hnp.encrypted_ndarray(bounds=(-1, 1), shape=(5,))} | |
) |
x = np.random.uniform(-1, 1, 5) | |
print(f"Simulation result: {h.simulate(x)}") | |
print(f"Plain NumPy result: {func(x)}") |
extern crate concrete_boolean; | |
use concrete_boolean::gen_keys; | |
// We generate a set of client/server keys, using the default parameters: | |
let (client_key, server_key) = gen_keys(); | |
// We use the client secret key to encrypt two messages: | |
let ct_1 = client_key.encrypt(true); | |
let ct_2 = client_key.encrypt(false); |