Repository navigation
testing/crypto: pass the RSA modulus and exponent in their own slots - #4291
Open
ThePassionate wants to merge 1 commit into
Open
ThePassionate wants to merge 1 commit into
ThePassionate wants to merge 1 commit into
Conversation
xiaoxiang781216
approved these changes
Dec 4, 2026
The software backend numbers the RSA components by the parameter that carries them: param[1] is n and param[2] is the exponent, the order the rpmsg and vhost transports fill in. These two tests passed the exponent first and the modulus second, which only worked while cryptosoft read the exponent from param[1]. Signed-off-by: makejian <makejian@xiaomi.com>
ThePassionate
force-pushed
the
crypto-swcr-crt-pss-apps
branch
from
December 4, 2026 08:24
b8f3c44 to
e9f904c
Compare
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
The software crypto backend numbers an RSA component by the cryptkop
parameter that carries it:
param[1]is the modulus andparam[2]is theexponent, the order the rpmsg and vhost transports fill in. These two tests
passed the exponent first and the modulus second, which only worked while
swcr_mod_exp()read the exponent fromparam[1].CRK_RSA_PKCS15_VERIFYis reordered the same way, tosignature, n, e, padding, hash.
Dependency
Depends on apache/nuttx#22862, which fixes the kernel side. The two need to
land together: with only this change merged these tests fail, and with only
the kernel change merged they fail the same way.
Testing
sim:cryptoon Linux, with apache/nuttx#22862 applied:rsa— 3/3 cases pass, including the tampered-signature rejectionkeymanagementbuilds; its RSA path needs a key store, exercised throughthe software key management backend
tools/checkpatch.sh -c -u -m -gclean