Skip to content

upgrade to ring-lwe v0.1.5 which uses ring_lwe::utils #23

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

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ polynomial-ring = "0.5.0"
num-traits = "=0.2.19"
rand = "0.8.5"
rand_distr = "0.4.3"
ring-lwe = "0.1.4"
ring-lwe = "0.1.5"
2 changes: 1 addition & 1 deletion src/decrypt.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use polynomial_ring::Polynomial;
use ring_lwe::{polysub,nearest_int};
use ring_lwe::utils::{polysub,nearest_int};
use crate::utils::{Parameters,mul_vec_simple};

/// Decrypt a ciphertext
Expand Down
2 changes: 1 addition & 1 deletion src/encrypt.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use polynomial_ring::Polynomial;
use ring_lwe::{polyadd,polysub,nearest_int};
use ring_lwe::utils::{polyadd,polysub,nearest_int};
use crate::utils::{Parameters, add_vec, mul_mat_vec_simple, transpose, mul_vec_simple, gen_small_vector};

/// Encrypt a message using the ring-LWE cryptosystem
Expand Down
2 changes: 1 addition & 1 deletion src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod tests {
use crate::encrypt::{encrypt,encrypt_string};
use crate::decrypt::{decrypt,decrypt_string};
use crate::utils::{Parameters,add_vec};
use ring_lwe::polyadd;
use ring_lwe::utils::polyadd;

// Test for basic keygen/encrypt/decrypt of a message
#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use polynomial_ring::Polynomial;
use rand_distr::{Uniform, Distribution};
use rand::SeedableRng;
use rand::rngs::StdRng;
use ring_lwe::{polyadd, polymul, gen_uniform_poly};
use ring_lwe::utils::{polyadd, polymul, gen_uniform_poly};

#[derive(Debug)]
/// default parameters for module-LWE
Expand Down