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

WIP: NTRU Prime #35

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

WIP: NTRU Prime #35

wants to merge 10 commits into from

Conversation

oddcoder
Copy link

Aside from finishing the implementation few things that I would like to also do
1- adapt/move the whole constant_time module to subtle.
2- more tests (& fuzzing when the input space too big to exhaust) to algebra since most of it is not tested and I found lots of bugs in the parts I tested.
3- add benchmarks.
4- see if replacing loops with maps improves performance considerably.
5- more debug_asserts I will probably take a full round of revision following the specs and the sage implementation to see what properties should hold where.

Things I am not confident about:
1- the down casts (i32 to i16 ...etc)
2- the casting across signs (i32 to u32....etc)

@oddcoder
Copy link
Author

oddcoder commented Jul 7, 2024

At this point streamlined ntru implementation is almost compete and what is left is fixing some maths bugs in decap and making sure that all NIST tests are passing. then I have to slowly rework the API while making sure that all tests still pass

Ahmed added 10 commits July 8, 2024 00:00
This patch creates empty crate for ntru prime and adds test data taken
from nist

Signed-off-by: Ahmed <>
1- compile for no-std
2- allow some warnings, while being pedantic regarding other warnings
Signed-off-by: Ahmed <>
That include
1- constant time if else
2- constant time division
3- constant time bitonic sort

Signed-off-by: Ahmed <>
Signed-off-by: Ahmed <>
Signed-off-by: Ahmed <>
@oddcoder
Copy link
Author

oddcoder commented Jul 8, 2024

So working implementation should be complete at least for streamlined ntru including tests. API is less than ideal and comes with no documentation and does not use the KEM crate. also LWE variant is not implemented yet. I will try to move 87c7c02 to subtle, I am not sure if they would be interested in having sorting algorithm there.

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

Successfully merging this pull request may close these issues.

1 participant