What is the difference between SHA256WITHRSA and SHA256WITHRSAENCRYPTION digest algorithms?

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?

-
add comment

1 Answer

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.

-
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 ? –  user1478370 Jan 17 at 7:19
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. –  DrLecter Jan 17 at 8:27
add comment