From: owner-openssl-us...@openssl.org On Behalf Of Philip R. Landreth
Sent: Friday, 13 January, 2012 09:55
The files were given to me in .txt format and the original file is a
.txt. as for the keyfile being in .txt I don't know. I used -p to
print the key and iv and used those instead of
: Thursday, January 12, 2012 6:58 PM
To: openssl-users@openssl.org
Subject: RE: java to openssl
From: owner-openssl-us...@openssl.org On Behalf Of Philip R.
Landreth
Sent: Thursday, 12 January, 2012 09:33
I was sent 2 files and a partial java code that another company
uses
I am new to this so go easy on me. I had this dropped in my lap and have
limited info but here is what I have.
I was sent 2 files and a partial java code that another company uses to decrypt.
import java.io.InputStream;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import
From: owner-openssl-us...@openssl.org On Behalf Of Philip R.
Landreth
Sent: Thursday, 12 January, 2012 09:33
I was sent 2 files and a partial java code that another company uses
to decrypt.
snip and realigned
byte[] encryptedData = (byte[])msg.getBody().get();
(0x03 0x03 0x03).
If I use OpenSSL to encrypt the same file, it results in a file of 65373
bytes. I expected 65376 since 65373 is not a multiple of 128. Shouldn't
OpenSSL be padding the file?
Is Java or OpenSSL not doing its job correctly? I'm I supposed to strip
these bytes myself? I'm using
expected 65376 since 65373 is not a multiple of 128. Shouldn't
OpenSSL be padding the file?
Is Java or OpenSSL not doing its job correctly? I'm I supposed to strip
these bytes myself? I'm using openssl on the command line, is there an
option to pass to openssl enc ?
Thanks!
Philippe
Steve,
Thanks for the help. I finally got this working and figured I'd reply here
in case this might help others.
I found a Java implementation of EVP_BytesToKey() in the JRuby code and
borrowed it. I ran the password through it and the key and IV I got back
didn't mach what openssl enc -d
Hi, Marc,
If you download the not-yet-commons-ssl.jar I'm working on, you can
decrypt your file with the Java code I've included below. I tested using
Sun Java 1.4.2. Notice the password in the example:
char[] pwd = secret.toCharArray();
http://juliusdavies.ca/commons-ssl/download.html
Whoops! This method only takes an InputStream on my LOCAL machine. :-$
PKCS8Key.decrypt( DES, CBC, dk, false, null, fin );
You'll need to replace that line with:
byte[] bytes = Util.streamToBytes( fin );
PKCS8Key.decrypt( DES, CBC, dk, false, null, bytes );
yours,
Julius
On 12/5/06,
Steve,
Thanks for the help. I finally got this working and figured I'd reply here
for posterity's sake.
I found a Java implementation of EVP_BytesToKey() in the JRuby code and
borrowed it. I ran the password through it and the key and IV I got back
didn't mach what openssl enc -d -des -p
I have an existing application (which I don't control) that sends me files
that were encrypted using an openssl comand like:
openssl enc -e -des -pass pass:passphrase
I would like to decrypt these files inside a Java application and generate
response files that the client can decrypt using a
On Mon, Dec 04, 2006, Marc Saegesser wrote:
I have an existing application (which I don't control) that sends me files
that were encrypted using an openssl comand like:
openssl enc -e -des -pass pass:passphrase
I would like to decrypt these files inside a Java application and generate
(mod_ssl)). Apache works like a dream
when tested (compared to java.) with OpenSSL made
keys and cert.
I do like this in Java to dump the key from out Java
keystore:
RSAPrivateCrtKey k = (RSAPrivateCrtKey)
keystore.getKey(alias, password.toCharArray());
FileOutputStream fo = new
Tomas Anderson wrote:
I have a java keystore and want to export the private
key and certificate (Verisign 128-bits) in it for use
with Apache (we are changing server from a java-based
server to Apache (mod_ssl)). Apache works like a dream
when tested (compared to java.) with OpenSSL
Hi,
I have a problem interfacing a java server and an openssl client. On the
server I am using Cryptix 3.2 and the client is using a openssl 0.9.6.
Java's keytool is used on the server to store all the certificates and
server's public key. I create a self signed X509
15 matches
Mail list logo