-
Notifications
You must be signed in to change notification settings - Fork 56
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
A toy implementation of ML-KEM algorithm? #95
Comments
yeah this sounds great and if the maths code I designed was abstract enough it should be fairly easy to implement on top of what we have :) |
the downside is that we would have to parametrise more of the ml-kem code; so that outputs of stuff like hash functions is also defined by parameters... |
we could make a |
that would lead to a lot of code duplication, that's why I was trying to avoid it... but maybe a base ml_kem class that has the stuff common between the regular ml-kem and the ml-kem-toy, and have stuff like hash functions in the concrete instantiations... |
ideally it would be nice for |
yes, but that requires the parameters to also include polynomial ring and module definitions; if you're ok moving them to those parameters:
then it should be doable |
yeah i think we can do it, it's a little redundant in the sense that all "serious" implementations will have the same |
So, to continue my insistence that this library is a very good learning resource I was thinking of including a complete toy example variant of ML-KEM: one that uses and encrypts only 1 byte values at a time (i.e. one that uses just 8-th degree polynomials).
Would you be ok accepting such code?
Alfred Menezes has published a series of lectures where he uses an implementation like that (the nice thing about 8-th degree polynomials is that NTT works for them too).
The text was updated successfully, but these errors were encountered: