From 50228035080b2a6a22e692fe43b3e9d89247e3e7 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Thu, 21 Sep 2023 12:14:11 +0000 Subject: [PATCH] Fix tests --- src/group_element_vs_paillier_encryption_in_range.rs | 2 +- src/paillier_affine_operation_in_range.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/group_element_vs_paillier_encryption_in_range.rs b/src/group_element_vs_paillier_encryption_in_range.rs index 8569ed2..1af58ef 100644 --- a/src/group_element_vs_paillier_encryption_in_range.rs +++ b/src/group_element_vs_paillier_encryption_in_range.rs @@ -405,7 +405,7 @@ mod test { Scalar: FromHash, { let private_key0 = random_key(&mut rng).unwrap(); - let key0 = private_key0.encryption_key(); + let key0 = private_key0.encryption_key().clone(); let (ciphertext, nonce) = key0.encrypt_with_random(&mut rng, &plaintext).unwrap(); let b = Point::::generator() * Scalar::random(&mut rng); diff --git a/src/paillier_affine_operation_in_range.rs b/src/paillier_affine_operation_in_range.rs index 39af556..685e1eb 100644 --- a/src/paillier_affine_operation_in_range.rs +++ b/src/paillier_affine_operation_in_range.rs @@ -545,8 +545,8 @@ mod test { { let dk0 = random_key(rng).unwrap(); let dk1 = random_key(rng).unwrap(); - let ek0 = dk0.encryption_key(); - let ek1 = dk1.encryption_key(); + let ek0 = dk0.encryption_key().clone(); + let ek1 = dk1.encryption_key().clone(); let (c, _) = { let plaintext = Integer::from_rng_pm(ek0.half_n(), rng);