MSFT CryptoAPI <-> Java JCE?
843810Mar 22 2002 — edited Dec 13 2003Hi,
I'm trying to sign data using Microsoft CryptoAPI and verify the signed data using Java JCE (that comes in JDK 1.4.0).
I'm using Microsoft's CryptSignMessage API with szOID_RSA_MD5 to sign the string, then using CryptMsgGetParam API with CMSG_ENCRYPTED_DIGEST to get the signed string (128 bytes) to be verified by JCE.
In JCE, I imported user's PKCS#12 cert to keystore, retrieve cert from keystore and use Signature Class instantiated with "MD5withRSA" to verify the string from CryptoAPI.
The verification failed! I tried signing the exact same string in java using MD5withRSA and the signed string is 128 bytes, but the content is totally different from the string generated by Microsoft CryptoAPI.
Any ideas?
--DS