Re: Win32 Crypto API interoperability with J2EE javax.crypto packages?




"Scott M Barr" <sbarr@xxxxxxxxxxxxxxxxx> wrote in message
news:9BE7D182-7AAF-4350-BAF0-8F7A347A85DB@xxxxxxxxxxxxxxxx
Greetings!

I am a seasoned VB, C#.net and J2EE developer, but a relative novice in
security and encryption details.

I am working on an old VB application, which encrypts several strings
(e.g.
password values) before storing them into a database. The app uses the
"Microsoft Base Cryptographic Provider v1.0" and an RC4 algorithm. The
details of all of our API calls are below, if anyone is interested.

We are now writing a new J2EE application which must access these same
strings, and I am unable to find a suitable "decrypt" algorithm
implemented
in Java. I have tried the use of the javax.crypto package supplied by IBM
with their WebSphere product, and tried several different RC4 schemes, but
have have had no success. (I am using the same hash key).

Can anyone point me to a reference that might help?

We are open to changing the encryption details of the VB app, to allow for
easier interoperability... so if there is a different algorithm to specify
or
a different API, which can make the VB to Java interop work, we can do
that!
We are even open to implementing our own decrypt routine in java if that
is
possible!

So, really, any help at all would be most welcome!


Scott,

Results obtained from Java won't agree with those produced by CryptoAPI
unless you emulate the action of CryptDeriveKey(). CDK() is using a
Key-Derivation-Function unique to Microsoft -- it is unlike the commonly
seen PKCS5.

This issue has been discussed here in the past. The last time it came up I
found that the following Java example highlights the relevant issues,
including the needed Java helper function CryptDeriveKey().

The code is only partially mine. In the case of RC4 you can ignore need for
parity bits. The example uses the 3DES algo.

http://www.tlviewer.org/crypto/Crypto.java

regards,
tlviewer


.



Relevant Pages

  • Re: My OPE & the Euclicidean TSP
    ... path algorithm pop up, prove that P=NP, and solve TSP through the use ... Any idea the effort involved to get an app ... been on major Java coding project from inception to product release as ... I like mentioning Class Viewer because it's great for perspective ...
    (comp.lang.java.programmer)
  • Re: My OPE & the Euclicidean TSP
    ... so I have decided to talk more about the algorithm here ... Unfortunately, Java 6.0 only comes with the Rhino scripting engine, forcing you to put your custom engines in JavaScript for the custom algorithm editor. ... Another bug I know of is don't run stuff without any nodes in the display. ...
    (comp.lang.java.programmer)
  • Re: Is it possible!
    ... That depends on whether it is a security risk that the algorithm of ... > from an executable with even 50% accuracy while java de-compilers ... That is a possibility, but if the algorithm is worth enough, ... an automatic Java decompilation, ...
    (comp.lang.java.programmer)
  • Re: My OPE & the Euclicidean TSP
    ... so I have decided to talk more about the algorithm here ... to code it up in Java, or some other programming language if he does not ... I have an open source project at Google Code called optimalpathengine ... distances, which should be a minimum for the optimal path. ...
    (comp.lang.java.programmer)
  • Re: java based supercomputer
    ... checking the correlation beteween an array of data and another array ... java psuedo remote threads will take a considerrably less time. ... Does your algorithm lend itself well to paralellization? ... the only bottleneck i can see is checking the correlation value ...
    (comp.lang.java.programmer)