Skip to content

Instantly share code, notes, and snippets.

@phil8192
Created April 3, 2020 21:12
Show Gist options
  • Save phil8192/c36736253c2baf7be5eba8234d5e5ecc to your computer and use it in GitHub Desktop.
Save phil8192/c36736253c2baf7be5eba8234d5e5ecc to your computer and use it in GitHub Desktop.
epochs = 10
times = []
for k in [None, 256, 512, 1024, 2048]:
pub_key, pri_key = paillier.generate_paillier_keypair(n_length=k) \
if k is not None else (None, None)
b = B(B_x, pub_key)
a = A(A_x, yy, b, pub_key)
c = C(a, test_x=x, test_y=yy, pri_key=pri_key)
t = time()
c.optimise(epochs, batch_size, eta, gamma)
times.append(time() - t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment