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

Typo in definition of TLWE key #17

Open
asraa opened this issue Mar 8, 2021 · 1 comment
Open

Typo in definition of TLWE key #17

asraa opened this issue Mar 8, 2021 · 1 comment

Comments

@asraa
Copy link

asraa commented Mar 8, 2021

Hi, I was reading through the implementation of the code, and I believe that there is an off by one error in the SizeData method for a TLWE key. As far as I understand, this should be size of Binary times degree of the polynomials (n) times the number of elements of the secret key vector (k). (k+1) would be referring to the TLWE sample size (T_N[X]^k, T_N[X]).

size_t SizeData() const override { return sizeof(T) * this->n_ * (this->k_ + 1); }

Part of this is just to confirm my understanding of the code, as I'm sure this is not so serious and is probably only used in size calculations!

@nindanaoto
Copy link

Hello, @asraa. I'm the writer of the forked version
I agree with you. This should be sizeof(T) * this->n_ * this->k_.

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

2 participants