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

Question about safe primes in gg20 #178

Open
tmpfs opened this issue Jul 19, 2022 · 0 comments
Open

Question about safe primes in gg20 #178

tmpfs opened this issue Jul 19, 2022 · 0 comments

Comments

@tmpfs
Copy link
Contributor

tmpfs commented Jul 19, 2022

The create_safe_primes() function calls generate_h1_h2_N_tilde():

// we recommend using safe primes if the code is used in production
pub fn create_safe_prime(index: usize) -> Self {
let u = Scalar::<Secp256k1>::random();
let y = Point::generator() * &u;
let (ek, dk) = Paillier::keypair_safe_primes().keys();
let (N_tilde, h1, h2, xhi, xhi_inv) = generate_h1_h2_N_tilde();
Self {
u_i: u,
y_i: y,
dk,
ek,
party_index: index,
N_tilde,
h1,
h2,
xhi,
xhi_inv,
}
}

However, in generate_h1_h2_N_tilde() the call to Paillier::keypair_safe_primes() is commented out:

// note, should be safe primes:
// let (ek_tilde, dk_tilde) = Paillier::keypair_safe_primes().keys();;
let (ek_tilde, dk_tilde) = Paillier::keypair().keys();

Does this weaken the support for safe primes? Is using safe primes still recommended for production?

Thanks for any pointers 🙏

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

No branches or pull requests

1 participant