wolfProvider icon indicating copy to clipboard operation
wolfProvider copied to clipboard

rsa pki encoding/decoding tests and fix for encoding rsapss to pki

Open sebastian-carpenter opened this issue 1 month ago • 1 comments

This mainly contains testing for encoding / decoding RSA and RSASSA-PSS keys to / from pki.

Found some bugs and fixed them:

  • RSASSA-PSS key params are not encoded to DER when using pki encoding. Copied some code from the spki encoding section for a fix (altered it slightly for different offsets).
  • WolfProvider returns digest names that do not match those of OSSL. Made a mapping function based on a wolfcrypt enum.

Addendum:

  • When doing the encoding test the created der was then decoded with ossl and wp. Changed test_rsa_decode_pkcs8_evp_pkey to allow decoding ctx to be specified. Now decoding can be done with ossl and wp, or just ossl.

sebastian-carpenter avatar Nov 21 '25 04:11 sebastian-carpenter