Repository navigation
testing/crypto: add session clone test - #4069
Merged
Merged
Conversation
Test the CIOCCLONE ioctl added by the session clone change: feed half of the input to a digest, clone the descriptor, finish the source and the clone separately and check each against a one-shot result. Covers SHA-256, HMAC-SHA256, AES-CMAC, closing the source descriptor after the clone, and an AES-CBC session cloned and used after its source descriptor is closed, which checks that the clone owns an independent copy of the key schedule. Cipher stream cloning (update halfway, clone, continue both streams) is left out: cryptodev does not propagate COP_FLAG_UPDATE to the cipher descriptor yet, so a cipher stream cannot be continued across CIOCCRYPT calls. Signed-off-by: makejian <makejian@xiaomi.com>
xiaoxiang781216
approved these changes
Nov 17, 2026
cederom
approved these changes
Nov 17, 2026
Contributor
Author
|
@acassis @GUIDINGLI gentle ping — this one is ready from our side (CI green, all checks pass). Could you take a look when you have a chance? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a
clonetest for the cryptodev session clone (CIOCCLONE, nuttx#21932):CIOCCLONE, and the source and the clone then finish independently - both results must equal the one-shot digest of the full message.Follows the plain
main()style of the existing tests (hmac.c, aescbc.c).Impact
TESTING_CRYPTO_CLONEoption (default n).Testing
Depends on apache/nuttx#21932 for the
CIOCCLONEioctl.Board sim:crypto with the kernel PR applied:
tools/checkpatch.sh -c -u -m -g <base>..HEAD(via the paired nuttx tree) passes.