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

reset() not working correctly #46

Closed
brycx opened this issue Dec 20, 2018 · 1 comment
Closed

reset() not working correctly #46

brycx opened this issue Dec 20, 2018 · 1 comment
Labels
bug Something isn't working security Security-related issues or improvements

Comments

@brycx
Copy link
Member

brycx commented Dec 20, 2018

Currently reset() checks whether or not the state is already finalized. If it is not finalized, it will not reset the state. So if someone were to call reset() not having finalized the state before, incorrect results would be produced. Such streaming states include hmac, poly1305, blake2b and cshake.

@brycx brycx added the bug Something isn't working label Dec 20, 2018
@brycx brycx closed this as completed in #47 Dec 20, 2018
brycx added a commit that referenced this issue Dec 20, 2018
Fix #46: Reset the state even if it hasn't been finalized yet
brycx added a commit that referenced this issue Dec 22, 2018
@brycx
Copy link
Member Author

brycx commented Dec 22, 2018

In case of hmac, reset() did not take into account either that the Sha512 object would not reset itself when reset() would be called after an update() with no finalization. This is fixed in 982b84c.

brycx added a commit that referenced this issue Dec 22, 2018
brycx added a commit that referenced this issue Dec 23, 2018
…heir init(), this adds tests to verify that the recent bug #46 is fixed on all init() input combinations
@brycx brycx added the security Security-related issues or improvements label Dec 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working security Security-related issues or improvements
Projects
None yet
Development

No branches or pull requests

1 participant