Home All Groups Group Topic Archive Search About

Decrypt file in VB6 encrypted in vb.net

Author
1 Aug 2005 7:54 PM
mark.brown
HELP

I have been trying for some days now to decrypt a file encrypted in
VB.NET.

- The algorithm being used is DES.
- I understand that the cipher is CBC (by default).
- ASCII key and IV supplied are 8 characters long
- No base64
- No compression (although i dont know for sure.  They dont set
compression but still not convinved the the MS component maybe!?)

Ive tried various VB6 DLLs but few accept the IV attributes.

They are using the following code in VB.NET.

- TheKey = ASCIIEncoding.ASCII.GetBytes("%4BEF8&2")
- Vector = ASCIIEncoding.ASCII.GetBytes("7.B3*O3F")
- Dim des As New DESCryptoServiceProvider()

PLEASE help if you can.   Ive searched a lot of different place but can
see nothing that helps!

About the only thing i can think is they read and encrypt the data in
4096 buffered blocks.   I have a feeling that this maybe the issue????

Regards

Author
1 Aug 2005 8:52 PM
David Eather
mark.br***@safefinancials.co.uk wrote:
> HELP
>
> I have been trying for some days now to decrypt a file encrypted in
> VB.NET.
>
> - The algorithm being used is DES.
> - I understand that the cipher is CBC (by default).
> - ASCII key and IV supplied are 8 characters long
> - No base64
> - No compression (although i dont know for sure.  They dont set
> compression but still not convinved the the MS component maybe!?)
>
> Ive tried various VB6 DLLs but few accept the IV attributes.

It is unlikely that a VB6 DLL exists that implements the .NET
ASCIIEncodeing class.

>
> They are using the following code in VB.NET.
>
> - TheKey = ASCIIEncoding.ASCII.GetBytes("%4BEF8&2")
> - Vector = ASCIIEncoding.ASCII.GetBytes("7.B3*O3F")
> - Dim des As New DESCryptoServiceProvider()
>
> PLEASE help if you can.   Ive searched a lot of different place but can
> see nothing that helps!
>
> About the only thing i can think is they read and encrypt the data in
> 4096 buffered blocks.   I have a feeling that this maybe the issue????

The reading and writing in 4096 byte blocks is probably done for speed
purposes rather than anything nefarious.

Do you have Visual Studio.NET?

David Eather
Author
2 Aug 2005 7:24 AM
MarkB
Someone is bringing a beta copy in today, so at least ill be able to
test from both ends.

Very fustrating!

Regards
Author
2 Aug 2005 1:48 PM
MarkB
Found a component for www.weonlydo.com called WODCRYPT.

This component handles the IV and attributes useded within the .NET
components.

I had misconfigured this to start with, but once resolved it is doing
the job extreamly well!!!!

Thanks for your help