-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add AES-GCM(includes GHASH) #157
Conversation
@0xJepsen @brunny-eth I think this PR is ready for review! There are a couple of more things, like updating the CTR section in README and adding a faster polynomial hash algorithm, but that can be done in another PR, this PR is already too big. It was a fun week learning Rust and playing with bits! 😄 |
|
||
/// Represents the coefficients of field polynomial used in GCM | ||
/// f = 1 + α + α^2 + α^7 + α^128 | ||
pub const GCMF_IRREDUCIBLE_POLYNOMIAL_COEFFICIENTS: [AESField; 129] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there is a better way to store this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking into it for a good hour, though I couldn't find anything better. :(
Maybe I should add a test to sanity check the coefficients.
If you can push up a change so that the lint passes I am happy to merge this! Like you mentioned i think a little bit of love on the readme would be good. I spent some time drawing some diagrams in ascii for GCTR here, as well as for GHASH here if you like you can grab them and put them where you think they fit if they are helpful. Also adding a link to the root readme and linking to the one you wrote would be a nice touch! Thanks for everything! After some final touches on docs we @brunny-eth can work with you on getting you the bounty! |
hey @mrdaybird -- great work here, we're really happy that you chose to contribute to our project! we're going to be awarding you with a $750 bounty for the work you've done here. Please share your preferred contact info (e-mail, telegram, etc.) here so I can reach out and coordinate payment thanks again for your contributions! Hope you decide to stick around 😃 |
@brunny-eth woah! awesome! you can email me at [email protected]
Definitely! this is an amazing initiative! EDIT: I have pinged you on telegram, just in case! |
closes #140 (Bounty: AES-GCM)
Worklist:
Notes:
ctr.rs
) implementation, which were required for GCM. The GCM spec requires a nonce of 96-bit and counter size of 32-bit (=> total of 128-bit), but the previous CTR implementation used a 50-50 split of block size for nonce and counter.