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

Simplify the VRF mkSeed #1659

Merged
merged 1 commit into from
Jul 14, 2020
Merged

Simplify the VRF mkSeed #1659

merged 1 commit into from
Jul 14, 2020

Conversation

dcoutts
Copy link
Contributor

@dcoutts dcoutts commented Jul 14, 2020

This makes two actual:

  1. change the hash function from SHA256
  2. serialise the slot number using raw serialisation, not CBOR

On 1, SHA256 was just the default suggestion, not a requirement. It's
simpler to simply use the same 256bit hash as we use everywhere else.

On 2, we should avoid CBOR serialisation for internal hashing, signing
etc. For one thing it's not quick.

@dcoutts dcoutts requested a review from uroboros as a code owner July 14, 2020 01:21
Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. and 3) seem great! I didn't realize that the XOR in 2) wasn't a requirement.

@dcoutts
Copy link
Contributor Author

dcoutts commented Jul 14, 2020

Well perhaps I'm missunderatanding 2. I've backed it out for now.

This makes two actual:
1. change the hash function from SHA256
3. serialise the slot number using raw serialisation, not CBOR

On 1, SHA256 was just the default suggestion, not a requirement. It's
simpler to simply use the same 256bit hash as we use everywhere else.

On 2, we should avoid CBOR serialisation for internal hashing, signing
etc. For one thing it's not quick.
@nc6 nc6 force-pushed the dcoutts/mkSeed branch from 82822ca to 124c021 Compare July 14, 2020 09:06
@nc6 nc6 merged commit d8f588b into master Jul 14, 2020
@iohk-bors iohk-bors bot deleted the dcoutts/mkSeed branch July 14, 2020 09:56
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.

3 participants