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

Process partially incorrect for block HMAC-SHA256 check #1

Open
xolider opened this issue May 29, 2024 · 1 comment
Open

Process partially incorrect for block HMAC-SHA256 check #1

xolider opened this issue May 29, 2024 · 1 comment

Comments

@xolider
Copy link

xolider commented May 29, 2024

Hello !
First of all, thank your documentation ! It helped me a lot while building this library -> Kteepass

I found a mistake in one of your images explaining the HMAC-SHA256 check process for KDBX block stream:
image

At the top right of this diagram, you have to concat the block payload (n bytes), n (4 bytes), and i (8 bytes). computing the HMAC only on the block is not enough and lead to an inexact HMAC-SHA256.
Example of working process: here

@scubajorgen
Copy link
Owner

scubajorgen commented May 30, 2024 via email

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

No branches or pull requests

2 participants