Re: Win32 Crypto API interoperability with J2EE javax.crypto packages?
- From: "tlviewer" <tlviewer@xxxxxxxxx>
- Date: Fri, 9 Jun 2006 14:01:10 -0700
"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
.
- Prev by Date: Re: Using SCHTASKS for remote launching of apps...
- Next by Date: gina and remote desktop - simple question
- Previous by thread: Display certificate list using Visual C++ 6
- Next by thread: gina and remote desktop - simple question
- Index(es):
Relevant Pages
|
|