Skip to content

Allow symmetric key to be any non-empty bytes#137

Open
BrianSipos wants to merge 2 commits intoTimothyClaeys:masterfrom
BrianSipos:133-sym-key-limits
Open

Allow symmetric key to be any non-empty bytes#137
BrianSipos wants to merge 2 commits intoTimothyClaeys:masterfrom
BrianSipos:133-sym-key-limits

Conversation

@BrianSipos
Copy link
Contributor

@BrianSipos BrianSipos commented Dec 17, 2025

This closes #112 and closes #133 and adds algorithm-specific checks for key length.

The HMAC algorithms do not require an exact or minimum length because of the requirements of RFC 9053 state:

For those algorithms that transport the key (such as AES Key Wrap), the size of the HMAC key SHOULD be the same size as the output of the underlying hash function.
For those algorithms that derive the key (such as ECDH), the derived key MUST be the same size as the output of the underlying hash function.

@sonarqubecloud
Copy link

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.

Cannot create symmetric key larger than 32 bytes HMAC 384 and HMAC 512 keys are not supported

1 participant