ARM64 assembly implementation for poly methods in the dilithium package.#561
ARM64 assembly implementation for poly methods in the dilithium package.#561elementrics wants to merge 5 commits intocloudflare:mainfrom
Conversation
… implementations in assembly
|
To add some numbers: based on the benchmarks provided I saw a rough ~30% to 50% performance increase on my M1 Max. |
|
Thanks for this! Reviewing cryptography takes a lot of time if done properly: almost as much as writing the code in the first place. I'd like to suggest you split up this PR into separate pieces. Some bits (eg. polyAdd) are quite easy to review, and we can land them quickly if one of us has some spare time in between. For the (Inv)NTT I'll need to find at least a free full day. |
|
thanks for the quick response! I will try my best to split it up! Should everything go swimmingly, I am happy to provide more implementations in the future! |
|
I will create small PR's that capture the changes made by this PR. But you can keep this PR around, so for benchmarks etc. you can get a complete picture what the end result would be and if it is even worth it. |
|
I will close the PR due to the fact that it is too big and also does not confirm with your guidelines. Some pieces will be presented in their own PR's later on. |
Hi there! This is my first time being here!
A few weeks back I implemented the FIPS204 algorithm for my private project in go.
Due to the fact that I took inspiration from your implementation, I thought it's only fair to give back! Based on the fact that my implementation differs from your's in the end, I tried to provide some assembly implementation that should fit nicely in your package structure.
I ran all tests with "go test ./..." and also the affected package's tests. I also added some benchmarks for some common operations.
Feel free to give me some feedback. Also if you feel I made a mistake here to provide a PR, please let me know, so it wont happen again!
But should you feel the PR moves in the right direction, I can provide more assembly implementations in the future.
To be honest, this PR serves as an experiment to see if you guys are interested in what I am able to provide.
IMPORTANT: if I made some mistakes of any kind, just let me know!
Have a nice day!