Skip to content

xtest: pkcs11: test RSA AES wrap with padded keys - #862

Merged
jenswikl merged 1 commit into
OP-TEE:masterfrom
ysbnim:fix-rsa-aes
Nov 27, 2026
Merged

jenswikl merged 1 commit into
OP-TEE:masterfrom
ysbnim:fix-rsa-aes

Conversation

@ysbnim

@ysbnim ysbnim commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Depends on OP-TEE/optee_os#8300.

Extend pkcs11_1026 to wrap 20- and 33-byte generic secret keys with RSA-2048. Verify that a length query and a one-byte-short buffer both report the required length of 288 or 304 bytes, respectively. Retry with the reported length, unwrap the key, and compare CKA_VALUE with the original.

Verified on QEMU with xtest -t pkcs11 1026. The test fails before the companion fix, and all 13 subcases pass with it.

@zelvam95

Copy link
Copy Markdown

Looks good to me.
Reviewed-by: Selvam Sathappan Periakaruppan <selvam.periakaruppan@oss.qualcomm.com>

@ysbnim

ysbnim commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Attached reviewed-by tag.

@jenswikl

Copy link
Copy Markdown
Contributor

I'm starting the CI job when #863 is merged.

@jenswikl

Copy link
Copy Markdown
Contributor

Merging when CI passes.

@jenswikl

Copy link
Copy Markdown
Contributor

Please rebase on master to fix the CI problem.

Exercise RSA AES key wrapping with 20- and 33-byte generic secrets.
Check that a length query and a one-byte-short buffer report the same
padded length, then retry with that length and verify the unwrapped key
value.

Signed-off-by: Sungbae Yoo <sungbaey@nvidia.com>
Reviewed-by: Selvam Sathappan Periakaruppan <selvam.periakaruppan@oss.qualcomm.com>
@ysbnim

ysbnim commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

@jenswikl Just rebased on master.

@jenswikl

Copy link
Copy Markdown
Contributor

Merging when CI passes.

@jenswikl
jenswikl merged commit 79b3cc5 into OP-TEE:master Nov 27, 2026
2 checks passed
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.

3 participants