Decrypt file in VB6 encrypted within VB Dot NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mark.brown@safefinancials.co.uk

    Decrypt file in VB6 encrypted within VB Dot NET

    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.

  • m.posseth

    #2
    Re: Decrypt file in VB6 encrypted within VB Dot NET


    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]


    <mark.brown@saf efinancials.co. uk> wrote in message
    news:1122658243 .921807.146620@ g44g2000cwa.goo glegroups.com.. .[color=blue]
    >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.
    >[/color]


    Comment

    • Mark

      #3
      Re: Decrypt file in VB6 encrypted within VB Dot NET

      Sorry...thought about that yesterday.

      The .NET encryption is DES.

      This is what they gave me:

      TheKey = ASCIIEncoding.A SCII.GetBytes(" &2DAF8%2")
      Vector = ASCIIEncoding.A SCII.GetBytes(" 7B3.D6A*")
      Dim des As New DESCryptoServic eProvider()

      Regards

      --
      Sent via .NET Newsgroups

      Comment

      • mark.brown@safefinancials.co.uk

        #4
        Re: Decrypt file in VB6 encrypted within VB Dot NET

        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.A SCII.GetBytes(" %4BEF8&2")
        - Vector = ASCIIEncoding.A SCII.GetBytes(" 7.B3*O3F")
        - Dim des As New DESCryptoServic eProvider()


        PLEASE help as i dont have much hair left on one side!!!

        cheers

        Comment

        • m.posseth

          #5
          Re: Decrypt file in VB6 encrypted within VB Dot NET

          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]



          <mark.brown@saf efinancials.co. uk> wrote in message
          news:1122926005 .628213.203270@ g44g2000cwa.goo glegroups.com.. .[color=blue]
          > 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.A SCII.GetBytes(" %4BEF8&2")
          > - Vector = ASCIIEncoding.A SCII.GetBytes(" 7.B3*O3F")
          > - Dim des As New DESCryptoServic eProvider()
          >
          >
          > PLEASE help as i dont have much hair left on one side!!!
          >
          > cheers
          >[/color]


          Comment

          • mark.brown@safefinancials.co.uk

            #6
            Re: Decrypt file in VB6 encrypted within VB Dot NET

            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

            Comment

            • MarkB

              #7
              Re: Decrypt file in VB6 encrypted within VB Dot NET

              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

              Comment

              Working...