Skip to content

Advanced BLAKE2 options #980

@tiran

Description

@tiran

OpenSSL 1.1.0 will have support for basic BLAKE2s and BLAKE2p hashing. The BLAKE2 hashing algorithm has a couple of advanced options like keyed hashing, salt, personalization, flexible digest size and tree hashing. All parameters are encoded in a BLAKE2 parameter struct and mixed into the initial state. For keyed BLAKE2 the key size is encoded in the BLAKE2 parameter set while the key is added as first block (padded with NULL to full block size). The featues are explained here: https://pythonhosted.org/pyblake2/examples.html

I'd like to see the advanced features in OpenSSL 1.2.0. It's too much work for 1.1.0 and needs serious engineering, too. The EVP_MD API is not designed to efficiently deal with configuration. EVP_MD_CTX_ctrl() could work but IMHO it's too tricky to get it right. For example the key would have to bet set as last ctrl and EVP_MD_CTX_init() would have to deal with the key in the first block somehow.

For now Python will probably add the reference implementation of BLAKE2 and switch to OpenSSL's BLAKE2 in a couple of years.

Metadata

Metadata

Assignees

No one assigned

    Labels

    branch: masterApplies to master branchtriaged: featureThe issue/pr requests/adds a feature

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions