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!

e-sushi
  • 254
  • 3
  • 8
Stanislav
  • 31
  • 4
  • 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 – dave_thompson_085 Feb 02 '17 at 10:17

0 Answers0