Question Locked

java encrypting 3des decrypting vb.net

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

I'm trying to decrypt a string that was enrcypted in java using triple des i have the key that was used but i'm led to believe there is no iv available which the vb.net functionality requires. If anyone has any experience of this or knows of any good articles it would be appreciated.

Cheers

Iain

3 replies

by tmouat

You need to realize two things.

When encrypting with the Cipher DESede algorithm in java...

...the default initialization vector is '00000000'. Yes, 8 zeros.

...the defualt mode is ECB.

So if you are using .Net for decryption, set your IV = "00000000" or...

Dim iv(7) as Byte

Also set your mode to ECB since .Net defaults to CBC.

' define the triple des provider
Private m_des As New TripleDESCryptoServiceProvider
m_des.Mode = CipherMode.ECB

Hope this helps someone.

This discussion is closed to new replies.