3
Is there a way to read the CMS enveloped data structure from a Base64 encoded signed enveloped message?
What I am particularly interested is to read is which kind of algorithm is used for ephemeral key encryption. I have received this message from another party and am supposed to extract the data, but when I read the key encryption algorithm, using BouncyCastle implementation, I get a different value from what is expected (and claimed to be).
It would be of great help if I could use a third party tool to verify that the key encryption is not as what is supposed to be (or to prove myself wrong).
I tried using the openssl
, with command such as openssl cms -cmsout -print -in ~/Downloads/encryptedSignedData.txt
, but it reports an error, no matter which -inform
argument I use.
Any hint is highly appreciated!
Commandline
openssl cms
supports only SMIME (which is base64 with linebreaks plus S/MIME headers) PEM (which is base64 with linebreaks plus----BEGIN/END whatever-----
lines) or DER (binary). If your data is base64 with linebreaks but NO header/trailer (not SMIME or PEM) try converting it to binary:openssl base64 -d <infile | openssl cms -cmsout -print
. Otherwise show (in your Q) exactly whatever headers/trailers you do have. – dave_thompson_085 – 2017-02-02T10:17:19.317