Search code examples
javadigital-signaturebouncycastle

CMS, CAdES_T, XAdES / XAdES_T, PAdES


I am new in digital signature. I would know if CMS, CAdES_T, XAdES / XAdES_T, PAdES documents have all .p7m extension. If yes, how can I determine the type of signature from .p7m? BouncyCastle library could be useful?


Solution

  • p7m files are usually used to hold encrypted email messages in S/MIME format. See https://fileinfo.com/extension/p7m

    CMS, CAdES, XAdES and PAdES are different digital signature formats not related with S/MIME. BouncyCastle supports directly S/MIME and CMS, and indirectly CAdES and PAdES, because they contain a CMS signature, but it does not support XAdES (XML signature format)

    Therefore, you can use BouncyCastle to read a .p7m file containing a S/MIME message, but you will need additional libraries to support XAdES, CAdES and PAdES if this is the real purpose