Add support for key wrapping using PSA Crypto API #863

Open
tpambor wants to merge 5 commits from tpambor/key-wrap into development
tpambor commented 2026-08-02 06:25:12 -05:00 (Migrated from github.com)

Description

This PR implements key wrapping support according to PSA Crypto API spec v1.4. The implementation is taken from the existing extras/nist_kw.c implementation and the testsuite is based on the testsuite for the NIST-KW implementation.

The implementation is currently limited to AES-KW and AES-KWP.

PR checklist

Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.

  • changelog: provided
  • framework PR: https://github.com/Mbed-TLS/mbedtls-framework/pull/315
  • TF-PSA-Crypto development PR provided: this PR
  • TF-PSA-Crypto 1.1 PR not required because: new feature
  • mbedtls development PR not required because: crypto only
  • mbedtls 4.1 PR not required because: crypto only
  • mbedtls 3.6 PR not required because: crypto only
  • tests: provided
## Description This PR implements key wrapping support according to PSA Crypto API spec v1.4. The implementation is taken from the existing `extras/nist_kw.c` implementation and the testsuite is based on the testsuite for the NIST-KW implementation. The implementation is currently limited to AES-KW and AES-KWP. ## PR checklist Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line. If the provided content is part of the present PR remove the # symbol. - [x] **changelog**: provided - [x] **framework PR**: https://github.com/Mbed-TLS/mbedtls-framework/pull/315 - [x] **TF-PSA-Crypto development PR** provided: this PR - [x] **TF-PSA-Crypto 1.1 PR** not required because: new feature - [x] **mbedtls development PR** not required because: crypto only - [x] **mbedtls 4.1 PR** not required because: crypto only - [x] **mbedtls 3.6 PR** not required because: crypto only - [x] **tests**: provided
gilles-peskine-arm (Migrated from github.com) reviewed 2026-08-02 06:25:12 -05:00
This pull request has changes conflicting with the target branch.
  • framework
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'tpambor/key-wrap:tpambor/key-wrap'
git switch 'tpambor/key-wrap'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'development'
git merge --no-ff 'tpambor/key-wrap'
git switch 'tpambor/key-wrap'
git rebase 'development'
git switch 'development'
git merge --ff-only 'tpambor/key-wrap'
git switch 'tpambor/key-wrap'
git rebase 'development'
git switch 'development'
git merge --no-ff 'tpambor/key-wrap'
git switch 'development'
git merge --squash 'tpambor/key-wrap'
git switch 'development'
git merge --ff-only 'tpambor/key-wrap'
git switch 'development'
git merge 'tpambor/key-wrap'
git push origin 'development'
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto!863
No description provided.