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

Comments

Projects
None yet
1 participant
@brycx
Copy link
Owner

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 label Dec 20, 2018

brycx added a commit that referenced this issue Dec 20, 2018

@brycx brycx closed this in #47 Dec 20, 2018

brycx added a commit that referenced this issue Dec 20, 2018

Merge pull request #47 from brycx/fix-reset
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

This comment has been minimized.

Copy link
Owner Author

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

Tests: As blake2b and cshake have multiple paramter combinations on t…
…heir init(), this adds tests to verify that the recent bug #46 is fixed on all init() input combinations

@brycx brycx added the Security label Dec 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.