-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add blake range codes #25
Conversation
Blake2s and Blake2b have different initial vectors states for different lengths, this means that for each chosen output length it looks like completely different hash function. This proposal allocated 64 values for Blake2b and 32 values for Blake2s as those are the ranges the outputs can be chosen from. The codes will require 3 bytes to write down as varints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @Kubuxu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to say which length match to each code to avoid any confusion.
Also is the code (for .e.g) blake2b-len30 or blake2b-30?
@diasdavid updated |
blake2b, , 0x40 | ||
blake2s, , 0x41 | ||
blake2b-X,"X is length in bits, can take values from 8 to 512 in 8 bit increments","0xb201-0xb240 (0xb201 - blake2b-8, 0xb240 - blake2b-512)" | ||
blake2s-X,"X is length in bits, can take values from 8 to 256 in 8 bit increments","0xb241-0xb260 (0xb241 - blake2s-8, 0xb260 - blake2b-256)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this breaks the machine readability of this file-- just generate the 63 entries and add them. it's ok. machine readability is much more important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will be 86, but ok.
Blake2s and Blake2b have different initial vectors states for different lengths, this means that for each chosen output length it looks like completely different hash function.
This proposal allocated 64 values for Blake2b and 32 values for Blake2s as those are the ranges the outputs can be chosen from.
Those codes will require 3 bytes to write down as varints.