Skip to content

Add support for BLAKE2 algorithms#339

Merged
athoelke merged 3 commits into
ARM-software:mainfrom
athoelke:crypto-blake2
Apr 13, 2026
Merged

Add support for BLAKE2 algorithms#339
athoelke merged 3 commits into
ARM-software:mainfrom
athoelke:crypto-blake2

Conversation

@athoelke
Copy link
Copy Markdown
Contributor

One aspect of the PR that I would like feedback on:

  • Does it make sense to have a single BLAKE2 key type for both BLAKE2s and BLAKE2b MAC algorithms?

    • It did not seem necessary to consume two symmetric key type value for the two algorithms.
    • However, we have only used 6/128 of those values; and BLAKE2s has to reject keys longer than 32 bytes, which will not be detected at key creation/import time.

Fixes #333

@athoelke athoelke added this to the Crypto 1.5 milestone Feb 13, 2026
@athoelke athoelke self-assigned this Feb 13, 2026
@athoelke athoelke added enhancement New feature or request Crypto API Issue or PR related to the Cryptography API labels Feb 13, 2026
@athoelke athoelke moved this to In Progress in PSA Certified API development Feb 13, 2026
Copy link
Copy Markdown
Contributor

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, with a couple of questions and suggestions.

Comment thread doc/crypto/api/ops/mac.rst Outdated
Comment thread doc/crypto/api/keys/types.rst
Comment thread doc/crypto/api/ops/hash.rst
Comment thread doc/crypto/appendix/encodings.rst Outdated
Comment thread doc/crypto/api/ops/hash.rst
Comment thread doc/crypto/api/ops/hash.rst Outdated
Copy link
Copy Markdown
Contributor

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

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

LGTM except for HMAC

Comment thread doc/crypto/api/ops/hash.rst
Copy link
Copy Markdown
Contributor

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread doc/crypto/api/ops/hash.rst
@athoelke athoelke merged commit 302a237 into ARM-software:main Apr 13, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in PSA Certified API development Apr 13, 2026
@athoelke athoelke deleted the crypto-blake2 branch April 13, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Crypto API Issue or PR related to the Cryptography API enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

Missing blake2 hash algorithm described in RFC 7693

3 participants