I installed djigzo on my android phone and I want to use it for smime mail. I don't know the difference between choosing SHA256WITHRSA and SHA256WITHRSAENCRYPTION digest algorithms in the settings.

My online search only returned OIDs and code samples. Can you enlighten me?


1 Answer 1


It seems that djigzo uses bouncycastle and if you look in the source at the DefaultSignatureAlgorithmIdentifierFinder, e.g., here, then you find:

algorithms.put("SHA256WITHRSAENCRYPTION", PKCSObjectIdentifiers.sha256WithRSAEncryption);
algorithms.put("SHA256WITHRSA", PKCSObjectIdentifiers.sha256WithRSAEncryption);

Thus, it seems that both refer to sha256WithRSAEncryption, which means RSA with SHA-256 and PKCS #1 v1.5 padding.

  • $\begingroup$ So the two options are the same. Then why there is a choice to be made? Are there many RSA with SHA256 algorithms to choose from with different OIDs ? $\endgroup$ Jan 17, 2014 at 7:19
  • 2
    $\begingroup$ It seems that these are two aliases for the same OID 1.2.840.113549.1.1.11 (or do you have a different one?). Another choice when signing with RSA is the RSA probabilistic signature scheme (PSS) with OID 1.2.840.113549.1.1.10. $\endgroup$
    – DrLecter
    Jan 17, 2014 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.