Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Expose personalization, salt, tree hashing #1

Merged
merged 2 commits into from
Aug 20, 2014
Merged

Expose personalization, salt, tree hashing #1

merged 2 commits into from
Aug 20, 2014

Conversation

tv42
Copy link
Collaborator

@tv42 tv42 commented Aug 16, 2014

Hi. I'd like to use more of the functionality of blake2b, and will happily contribute code exposing more of the blake2 functionality. Is this ok with you?

I'm thinking of adding a type Config with all the possible settings, and then a func New(*Config) hash.Hash. How does that sound to you? blake2.New(nil) can behave like the current NewBlake2B. No need for backwards-incompatible changes.

…ing mode

The outputs in examples have been verified by porting the example to
https://github.com/dchest/blake2b, and verifying that the output matches.
It seems the Blake2 reference itself does not contain sample data.

The C implementation has been extended with the function
blake2b_init_parametrized, as the existing API did not seem to expose
the functionality; blake2b_init_param was enough for tree mode et al,
yet the keying was only in blake2b_init_key, which hardcoded
parameters. See BLAKE2/BLAKE2#8 for more.
Calling code will often want to make buffers of these sizes.
@codahale
Copy link
Owner

Sounds good to me!

codahale added a commit that referenced this pull request Aug 20, 2014
Expose personalization, salt, tree hashing
@codahale codahale merged commit 3fa8235 into codahale:master Aug 20, 2014
@tv42
Copy link
Collaborator Author

tv42 commented Aug 20, 2014

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants