Quoting Orlando Andico <[EMAIL PROTECTED]>:
I have a need for a Perl application to interopt with a (3rd party) Java
application which uses the javax.crypto package.
This 3rd-party application does not set the hash and IV ( = initialization
vectors ) directly, instead it uses SecretKeyFactory.generateSecret() to
derive the encryption key from the passphrase.
I don't know exactly how this derivation is done, I'm guessing PKCS#5
v2.0PBKDF2?
This is dependent on what key specification was used, e.g.
PKCS8KeySpec, X509KeySpec,RSAKeySpec, etc. Have you tried getting the
key specification via getKeySpec()?
Crypt::CBC meanwhile either works in "OpenSSL mode" or, if you use the key
directly, you have to specify the salt and IV yourself. If anyone has
figured out how to get Crypt::CBC and javax.crypto ( = SunJCE ) working
nicely together, i'd love to hear about it.
The SunJCE provider supports DESKeySpec and DESedeKeySpec afaik. I'm
not sure what you're about to do with this though...
--
Paolo Alexis Falcone
[EMAIL PROTECTED]
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph