I have a string "abcd pqrs". This string is digitally signed with an X.509 certificate (with its private key) and it produces a signature.
From the signed string, is it possible to find out what hashing algorithm was used?
Also, does the signed data always contain the certificate or the public key used to sign the data? If it does, how can I extract the certificate from the signed data?
The only information I have is that it's signed by an X.509 certificate.
This is the problem I am trying to solve:
I have an opaque tool which takes an X.509 certificate, the corresponding private key and "data to be signed", and gives me signed data. I have no information about what kind of hashing/signing algorithm it uses, I have no information about whether it produces a detached or attached output.
Basically, I want to verify the signature and the data — but before I do that, I need to have some info about it. I have access to original unsigned data.
openssl asn1parse -dump) in the question. If ASN.1 dump produces an error include the size and the hexadecimal data. – owlstead Jan 3 at 21:23