BLAKE2 / BLAKE2

BLAKE2 official implementations
https://blake2.net
Creative Commons Zero v1.0 Universal
655 stars 125 forks source link

Please provide function to init with both key and params #8

Open tv42 opened 10 years ago

tv42 commented 10 years ago

I don't see how to use salt, personalization etc in combination with keyed hashing, without copy-pasting the memset/memcpy logic inside blake2b_init_key. Am I missing something that should have been obvious?

blake2b_init doesn't take a key. blake2b_init_key forces params. blake2b_init_param looks like a lower-level helper, and i don't see a clean, non copy-paste, way of getting the key update done after it.

I'm mostly interested in the SSE variant.

tv42 commented 10 years ago

The commit at https://github.com/tv42/blake2/commit/e5fb01792fc85b7820117b8f24a43c14d718ffa0 shows an example of what I'd like to see. It's needed for https://github.com/codahale/blake2/pull/1 . Feedback is most welcome!