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

Add blake range codes #25

Merged
merged 4 commits into from
Dec 10, 2016
Merged

Add blake range codes #25

merged 4 commits into from
Dec 10, 2016

Conversation

Kubuxu
Copy link
Member

@Kubuxu Kubuxu commented Dec 9, 2016

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.

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.
Copy link
Member

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @Kubuxu

Copy link
Member

@daviddias daviddias left a 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?

@Kubuxu
Copy link
Member Author

Kubuxu commented Dec 10, 2016

@diasdavid updated

@whyrusleeping whyrusleeping merged commit 7cd0e25 into master Dec 10, 2016
@whyrusleeping whyrusleeping deleted the feat/blake-codes branch December 10, 2016 21:02
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)"
Copy link
Member

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.

Copy link
Member Author

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.

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.

4 participants