Decrypt file in VB6 encrypted within VB Dot NET

  • Thread starter Thread starter mark.brown
  • Start date Start date
M

mark.brown

I have been given a data feed to decrypt on a daily basis.

All i have been given is the KEY (8 chars) and a Vector (IV) of 8
chars.

I am using the cryptAPI in VB6 but can see no reference to the IV.

If the IV is used by .NET to create a HASK key, then does anyone know
what algorithm MS use?

Is the IV the same as SALT?

Lost and any help would be greatly appreciated.
 
Well first you should now is the algorythm that would be a nice startpoint
:-)


in .Net a lot of algorythms are managed and complete in the framework ,,,
you throw in a init vector , and key and specify a algorythm ( Rijndael ,
DES , etc etc etc ) and there is your encrypted data

regards

Michel Posseth [MCP]
 
Sorry...thought about that yesterday.

The .NET encryption is DES.

This is what they gave me:

TheKey = ASCIIEncoding.ASCII.GetBytes("&2DAF8%2")
Vector = ASCIIEncoding.ASCII.GetBytes("7B3.D6A*")
Dim des As New DESCryptoServiceProvider()

Regards
 
Yes, realised if forgot that key peice of information yesterday.

This is where im up to.....

- 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 as i dont have much hair left on one side!!!

cheers
 
well could it be an option to use a COM interopted VB.Net dll in your VB6
program ??

This would mean that the target computer for your project must have the .Net
framework installed

Regards

Michel Posseth [MCP]
 
The only issue is this app goes out to lots of other customers and i
dont want to impose the .net framework unless i have to.

i was hoping for a more native solution although i admit it would get
around the issue!!!

Many thanks for your answer
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top