Hi All

I am trying to decrypt a PKCS#12 object (private key & certs). I was
able to extract the private key. The way I did is to generate the
decryption key from the password.

GenPBKDF12Key((uchar *)  password,&drvdKey, &derivedKeyLen, ItrCnt,
SaltVal,&ucSaltLen, &purpose);


But when I am trying to get the encrypted cert (btw I got the PKCS#12
object by exporting it out of MSIE) which is encrypted with RC240 bit
key, I get some gibberish. 

This is the code I have:

apbt transD(new RC2Decryption(DecrKey, keyLen, effectiveLen));
                        transD->ProcessBlock(input, plaintext);

where keyLen = 5 & effectiveLen = 40.

Also the DecrKey is the key I got when trying to decrypt the private
key.

What am I doing wrong? Should the decryption key for certificate has to
again derived from the password & IV value given in the ASN1 syntax of
the RC2 algorithm?

Please help!!!

Seshu

Reply via email to