I need to sign emails with S/MIME and want to do this using openssl. The requested signature algorithm is RSASSA-PSS. I couldn't figure out how to specify the signature algorithm to openssl smime. What I've figured out already is:

openssl smime -sign -in unsigned.msg -out signed.msg -signer private.pem -md sha512

However, the algorithm used following this command is RSA. Does anyone have an idea how to switch this to RSASSA-PSS?

migrated from crypto.stackexchange.com Sep 17 at 15:43

This question came from our site for software developers, mathematicians and others interested in cryptography.


You can use openssl cms to do that:

openssl cms -in msg.txt -sign -inkey key.pem -signer cert.pem \
    -keyopt rsa_padding_mode:pss -md sha512 -out msg.eml
  • Awesome, this works. I didn't know about openssl cms – lmr2391 Sep 24 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.