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

schnorr: Remove internal hash func callback. #2130

Merged
merged 1 commit into from
Mar 20, 2020

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Mar 19, 2020

This requires #2129.

This removes the hash func callback parameter for hashing the commitment data from the internal sign and verify functions in favor of just calling the real hash function directly.

This is being done for several reasons:

  • It is not safe to use just any hash function, rather the hash function must have certain properties, so it's safer to make it explicit
  • There is only a single hash function, blake256, being used and thus having an extra unneeded parameter is not desirable
  • Any modifications to the commitment data invalidate existing signatures, so the internals of the function have to realistically be updated when making any changes anyway

@davecgh davecgh added this to the 1.6.0 milestone Mar 19, 2020
@davecgh davecgh force-pushed the schnorr_remove_hashfunc_callback branch from 5fe2c55 to 77e8b85 Compare March 20, 2020 00:11
This removes the hash func callback parameter for hashing the commitment
data from the internal sign and verify functions in favor of just
calling the real hash function directly.

This is being done for several reasons:

- It is not safe to use just any hash function, rather the hash function
  must have certain properties, so it's safer to make it explicit
- There is only a single hash function, blake256, being used and thus
  having an extra unneeded parameter is not desirable
- Any modifications to the commitment data invalidate existing
  signatures, so the internals of the function have to realistically be
  updated when making any changes anyway
@davecgh davecgh force-pushed the schnorr_remove_hashfunc_callback branch from 77e8b85 to 5bfb693 Compare March 20, 2020 18:55
@davecgh davecgh merged commit 5bfb693 into decred:master Mar 20, 2020
@davecgh davecgh deleted the schnorr_remove_hashfunc_callback branch March 20, 2020 18:59
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.

2 participants