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

[SEVERE] Blake2bDigest: fix wrong buffer passed to_compress when _digestLength < 64 #108

Closed
wants to merge 1 commit into from

Conversation

gmpassos
Copy link
Contributor

The correct variable to be passed to _compress is _buffer, that was populated 3 lines above, not the method parameter inp.

To test this changed line you should create a Blake2bDigest with digestSize = 32.

See equivalent Java implementation line as reference:
https://github.com/bcgit/bc-java/blob/master/core/src/main/java/org/bouncycastle/crypto/digests/Blake2bDigest.java#L353

The correct variable to be passed to `_compress` is `_buffer`, that was populated 3 lines above, not the method parameter `inp`.

To test this changed line you should create a `Blake2bDigest` with `digestSize` = 32.

See equivalent Java implementation line as reference:
https://github.com/bcgit/bc-java/blob/master/core/src/main/java/org/bouncycastle/crypto/digests/Blake2bDigest.java#L353
@gmpassos gmpassos changed the title SEVERE: Fix wrong buffer passed to_compress when _digestLength < 64 [SEVERE] Blake2bDigest: fix wrong buffer passed to_compress when _digestLength < 64 Jun 17, 2021
@mwcw
Copy link
Collaborator

mwcw commented Jun 17, 2021

Hi, Thanks for reporting this!

It has been merged and will be synced shortly along with a new release.

MW

@mwcw mwcw closed this Jun 17, 2021
gmpassos added a commit to gmpassos/argon2 that referenced this pull request Jun 18, 2021
- Now using fixed `pointycastle` `Blake2b`:
  - pointycastle: ^3.1.2
  - bcgit/pc-dart#108
  - Removed `argon2_blake2b.dart`, not necessary anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants