How to identify padding scheme used in RSA signature of a certificate , using openssl?
certificate, cryptography, linux, openssl, rsa
Solution
You can use the following command (assuming the certificate is encoded in DER - binary format):
openssl x509 -text -inform DER -in file.crt
Right after the serial number you find the signature algorithm encoded as a string like `sha1WithRSAEncryption`.
You can look up such string in the PKCS#1 RFC or in the other RFCs that extend the definition (like RFC4055).
For RSA, an identifier like `XXXwithRSAEncryption` indicates a PKCS#1 v1.5 signature. The identifier `id-RSASSA-PSS` specififies a PSS signature, and the other details are stored in the other parameters that show up alogn with it.
Problem
A certificate's signature can use different RSA padding schemes like PCKS1.5 , PSS etc. Using openssl tool, how to identify padding scheme used in the RSA signature?