Skip to content

testing/crypto: pass the RSA modulus and exponent in their own slots - #4291

Open
ThePassionate wants to merge 1 commit into
apache:masterfrom
ThePassionate:crypto-swcr-crt-pss-apps
Open

ThePassionate wants to merge 1 commit into
apache:masterfrom
ThePassionate:crypto-swcr-crt-pss-apps

Conversation

@ThePassionate

Copy link
Copy Markdown
Contributor

Summary

The software crypto backend numbers an RSA component by the cryptkop
parameter that carries it: param[1] is the modulus 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
swcr_mod_exp() read the exponent from param[1].

CRK_RSA_PKCS15_VERIFY is reordered the same way, to
signature, 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:crypto on Linux, with apache/nuttx#22862 applied:

  • rsa — 3/3 cases pass, including the tampered-signature rejection
  • keymanagement builds; its RSA path needs a key store, exercised through
    the software key management backend
  • tools/checkpatch.sh -c -u -m -g clean

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants