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

Separate hash functions for chaining and final hashing into public key #4

Open
starius opened this issue Aug 7, 2019 · 1 comment

Comments

@starius
Copy link

starius commented Aug 7, 2019

According to https://eprint.iacr.org/2011/191.pdf the requirement for chaining function are weaker than for the final hashing step. The former needs to be PRF, while the later needs to be a collision resistant hash function. I think this means for chaining we can use something 128 bit (first 128 bits of sha256 or AES maybe or something better suited for this task). and for final shashing normal 256 bit hash function (sha256) as now.

The problem is that currently the package supports only one hash function for both applications. I'll send PR with separation them into 2 arguments.

starius added a commit to starius/wots that referenced this issue Aug 7, 2019
@dchest
Copy link
Owner

dchest commented Aug 7, 2019

You're right, somehow it didn't occur to me to add the ability to use separate functions. Indeed, the chaining function doesn't have a requirement for being collision-resistant. In fact, to be able to use shorter hash output, I tried to reduce the effect of collisions on the message hash function by using randomization — it's harder to exploit collisions if you can't guess the randomization parameter — but this isn't as good as using collision-resistant hash function.

Thanks for the PR!

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