homenc / HElib

HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations.
https://homenc.github.io/HElib
Other
3.14k stars 765 forks source link

What happens if the security-level < 0? #308

Closed Ldisi closed 5 years ago

Ldisi commented 5 years ago

Hi!I am new to the new version. In helb_example.cpp m=32109, it runs slowly. So I change m to 4, it seem that pragrams runs much faster than before but security-level < 0. What happens if the security-level < 0?Does this mean the scheme is unsafe?

boev commented 5 years ago

Yes. I think (not completely certain) m = 4 leaves us with very small polynomial ring and one could try different bruteforce approaches. Guessing the added error (including position where its added), would allow you to round and decrypt even without the secret key. And there are different ways to check if your decrypted result is correct. This work has helped me visualize RLWE encryption/decryption: https://blog.n1analytics.com/homomorphic-encryption-illustrated-primer/

Ldisi commented 5 years ago

THX!

------------------ Original ------------------ From: Yordan Boev notifications@github.com Date: Thu,Jul 4,2019 5:42 PM To: homenc/HElib HElib@noreply.github.com Cc: Ldisi 1725983010@qq.com, Author author@noreply.github.com Subject: Re: [homenc/HElib] What happens if the security-level < 0? (#308)

Yes. I think m = 4 leaves us with very small polynomial ring and one could try different bruteforce approaches. Guessing the added error (including position where its added), would allow you to round and decrypt even without the secret key. And there are different ways to check if your decrypted result is correct. This work has helped me visualize RLWE encryption/decryption: https://blog.n1analytics.com/homomorphic-encryption-illustrated-primer/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

shaih commented 5 years ago

any security-level value less than 64 (including negative values) basically mean no security at all, there are easy attacks that will recover the secret decryption key from the public key. To get real security you need the security level to be above 100