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

Replace our HMAC implementation by whatever JCA provides #467

Merged
merged 2 commits into from
Jan 3, 2016

Conversation

nextgens
Copy link
Contributor

@nextgens nextgens commented Jan 1, 2016

Odds are it won't make the code any faster... but it's more readable and might be better equipped than us to deal with side channels.

It's a lot less ambitious than #258

It turns out that we're never truncating the output anyways...
so we can simplify the API
@nextgens
Copy link
Contributor Author

nextgens commented Jan 2, 2016

It's worth noting that there is a few differences in between the old and the new HMAC:

  • the new implementation won't stretch the key; it will throw if the key isn't of the expected length. I might be convinced to replace the check with another ensuring that the keylength is "big enough" and "not default/zeros"
  • the new implementation dropped support for output truncation; we were not using it anywhere and it simplifies the API

@nextgens nextgens added this to the build1472 milestone Jan 3, 2016
@Thynix Thynix merged commit b9537f4 into hyphanet:next Jan 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants