Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hi Guys....I am facing decrypting a binary file which is encrypted

843811Dec 12 2008 — edited Dec 27 2008
I am facing decrypting a binary file which is encrypted in C++ code. They use FULL RSA Service provider
wiht MD5 , TripleDES algorithms....i did the same in java to decrypt the file..but i am getting padding exception

javax.crypto.BadPaddingException: Given final block not properly padded

I am new to this group and topic...Anyhelp is greately appreciated..

C++ windows inbuilt methods for your idea to know what they use..

--------------------------------------------------------------------------------

CryptAcquireContext (&hProv, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET)
CryptGenKey (hProv, CALG_3DES, CRYPT_EXPORTABLE, &hKey))
CryptGetUserKey (hProv, AT_KEYEXCHANGE, &hXchgKey))
CryptGenKey(hProv,AT_KEYEXCHANGE,NULL,&hXchgKey))
CryptExportKey (hKey, hXchgKey, SIMPLEBLOB, 0, pbKeyBlob, &dwKeyBlobLen))
CryptEncrypt(hKey, 0, endOfData, 0, pData, dataLength, *bufSize))

please tell me how to implemnet the same in java...



Thanks in advance,
MSM

Edited by: MuppidiJava on Dec 13, 2008 2:56 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 24 2009
Added on Dec 12 2008
45 comments
1,389 views