Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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