-
Notifications
You must be signed in to change notification settings - Fork 75
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
How to get DiLithium's pure C code optimization, so that the stack usage can reach less than 3KB #352
Comments
Unfortunately, they did not publish their code - NXP never does. If you need it to be pure C, best you can do it take our M4 optimized code and replace all assembly yourself. Should not be hard to do. It would be useful if we could have such an implementation in pqm4/mupq. Please open a PR if you wrote one. |
@dop-amin do happen to have one lying around? This is probably something we could upstream to the reference implementation repo. |
Sorry, right now I don't have such code. Do you mean just any C code or C code implementing common optimizations? |
I think having anything with an optimized memory footprint would be good. Speed optimizations can be added later if needed. |
@a-lve I removed the parts that had been written in assembly for M4. You can find my fork of the pq-crystals repo including memory optimization here https://github.com/dop-amin/dilithium/tree/lowram. It's also submitted as a PR to pq-crystals pq-crystals/dilithium#91. |
As mentioned in the https://eprint.iacr.org/2022/323.pdf article, the paper uses pure c optimization, so that the stack usage reaches less than 3kb, and shows that We integrated our implementation into a local fork of the benchmarking framework pqm4(Commit hash e47864b, forked on 8 Oct 2021), but I didn't find the relevant commit and its pure C code optimization, only commit#340, but there is specific optimization code for the m4 architecture in it, but I want to use the optimization code implemented in pure C, is there any way to get it
The text was updated successfully, but these errors were encountered: