Skip to content

Commit

Permalink
Bugfix : re-included noise in LWE::Encrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
new account committed Jan 20, 2015
1 parent 0959af8 commit 5aff1ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LWE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace LWE {

void Encrypt(CipherText* ct, const SecretKey sk, int m) {
ct->b = (m % 4) * q / 4;
ct->b += 0*Sample(Chi3);
ct->b += Sample(Chi3);
for (int i = 0; i < n; ++i) {
ct->a[i] = rand() % q;
ct->b = (ct->b + ct->a[i] * sk[i]) % q;
Expand Down

0 comments on commit 5aff1ca

Please sign in to comment.