Compatibility between Java crypto and open ssl

2007-10-12 Thread Metalpalo

Hello

I have some question about compatibility between java crypto and openssl
library.

This is my case:
1.I created DESede key and stored it to file:
{code}
SecretKey key = KeyGenerator.getInstance(TripleDES).generateKey();
File f = new File(c:\\key.dat);
DataOutputStream dos =new DataOutputStream(new FileOutputStream(f));
dos.write(key.getEncoded());
dos.close();
{code}

2.I encrypt some file c:\\normal.dat through:
{code}
ecipher.init(Cipher.ENCRYPT_MODE, key);
  byte[] enc = ecipher.doFinal(normalData);//normalData- loaded file
  File f2 = new File(c:\\enc.dat);
  DataOutputStream dos2 =new DataOutputStream(new FileOutputStream(f2));
  dos2.write(enc);
  dos2.close();
{code}

3.I encrypted normal data file in openssl through:
openssl.exe enc -des3 -in c:\normal.dat -out c:\enc2.dat -pass
file:c:\key.dat -nosalt

I tried other algoritm too as(des-ede,des-ede3..) but I got not equal files
as enc.dat and enc2.dat. 
I used same key in both cases.

Does exist some compatibility between encryption algorithms in java and
openssl or not? I'm interested especially in tripledes.

These functionality(encryption,decryption) will be used by any applications
developmented in C++, JAVA and VB. I need some compatibilited  des3
algorithm.

Can somebody help me ?

Thanks






-- 
View this message in context: 
http://www.nabble.com/Compatibility-between-Java-crypto-and-open-ssl-tf4611666.html#a13169808
Sent from the OpenSSL - User mailing list archive at Nabble.com.

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


RE: Signature verification fails with block type is not 01

2007-10-12 Thread Marek Marcola
Hello,
  We have the same openssl version in both the machines. Still the
 problem occurs.
My proposition was to check private key modulus and public/certificate
modulus to be sure that they are the same.

Best regards,
-- 
Marek Marcola [EMAIL PROTECTED]

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


RE: Signature verification fails with block type is not 01

2007-10-12 Thread Marek Marcola
Hello,
 Does anyone have a separate test program where we can test only the
 signature verification?
 # openssl genrsa -out rsa.pem 2048
 # openssl rsa -in rsa.pem -text -noout
 # openssl rsa -in rsa.pem -pubout -out rsa-pub.pem
 # openssl rsa -in rsa-pub.pem -pubin -text -noout
 # echo test test test  file.txt
 # openssl dgst -sign rsa.pem   file.txt  file.sig
 # openssl dgst -verify rsa-pub.pem -signature file.sig  file.txt
 Verified OK

Best regards,
-- 
Marek Marcola [EMAIL PROTECTED]

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


SHA1 checksum mismatch on openssl-0.9.8f tarball

2007-10-12 Thread Lasse Kliemann
The file at
http://www.openssl.org/./source/openssl-0.9.8f.tar.gz.sha1
contains the checksum

   0a0a3fd9be3d46053df2e91b6eb8a3b4348c793c

whereas the file at http://www.openssl.org/source/openssl-0.9.8f.tar.gz (even 
after repeated download) has SHA1 checksum

   e8716370093b112763ace0c66c06a0d6049e413b

The published OpenPGP signature 
http://www.openssl.org/source/openssl-0.9.8f.tar.gz.asc was made with key 
0x2719AF35 and matches for the tarball. But previous releases were signed 
with key 0xF295C759.

This looks kind of suspicious to me. However, why would an attacker replace 
the OpenPGP signature and not the SHA1 checksum?

Hopefully, there is a simple explanation for this.


pgplCBydKOXLd.pgp
Description: PGP signature


Re: Signature verification fails with block type is not 01

2007-10-12 Thread jimmy bahuleyan
Belliappa, Ashith Muddiana (HP Software) wrote:
  
 Hi,
  We have complied the code in an Solaris 5.7 machine. We have the same
 set of binaries working fine in all the Solaris 5.8 machines. I am
 getting the error ONLY in ONE Solaris 5.8 machine.
 

i believe your saying that the same application code, same set of
openssl libraries AND the same signature works on all but one Solaris 5.8.

Have you checked that the proper library is picked up on this machine
(or if shared libs are used, the proper library is loaded). Could
possibly be a machine config issue if all the above hold true..

(I haven't got 5.7 thing. Is it that you have also checked the code on a
5.7  found it to be working properly?)

 Does anyone have a separate test program where we can test only the
 signature verification?
 
 Regards
 Ashith
 

-jb
-- 
No snowflake in an avalanche ever feels responsible.
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: Signature verification fails with block type is not 01

2007-10-12 Thread Dr. Stephen Henson
On Fri, Oct 12, 2007, Belliappa, Ashith Muddiana (HP Software) wrote:

  
 Hi,
  We have the same openssl version in both the machines. Still the
 problem occurs.

Do you have the same binaries or did you compile it on both machines?

If you compiled it try make test on the failing machine if that fails check
compiler versions.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


RE: Signature verification fails with block type is not 01

2007-10-12 Thread Belliappa, Ashith Muddiana (HP Software)
 
Hi,
 We have complied the code in an Solaris 5.7 machine. We have the same
set of binaries working fine in all the Solaris 5.8 machines. I am
getting the error ONLY in ONE Solaris 5.8 machine.

Does anyone have a separate test program where we can test only the
signature verification?

Regards
Ashith

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dr. Stephen Henson
Sent: Friday, October 12, 2007 4:35 PM
To: openssl-users@openssl.org
Subject: Re: Signature verification fails with block type is not 01

On Fri, Oct 12, 2007, Belliappa, Ashith Muddiana (HP Software) wrote:

  
 Hi,
  We have the same openssl version in both the machines. Still the 
 problem occurs.

Do you have the same binaries or did you compile it on both machines?

If you compiled it try make test on the failing machine if that fails
check compiler versions.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL
project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: openssl problem?

2007-10-12 Thread Marek Marcola
Hello,
 I compiled successfuly openssl 0.9.8f maked the tests and installed it.
 I compiled openssh 4.7.p1 with the above
 But when I try to compile qpopper 4.0.9 with ssl support at the end make 
 outputs the following:
 
 gcc   pop_dele.o pop_dropcopy.o pop_get_command.o pop_get_subcommand.o 
 pop_init.o pop_last.o pop_list.o pop_log.o pop_lower.o pop_msg.o pop_parse.o 
 pop_pass.o pop_quit.o pop_rset.o pop_send.o pop_stat.o pop_updt.o pop_user.o 
 pop_xtnd.o pop_xmit.o popper.o pop_bull.o xtnd_xlst.o pop_uidl.o mktemp.o 
 pop_rpop.o pop_apop.o md5.o pop_auth.o pop_pope.o pop_extend.o scram.o 
 hmac.o base64.o pop_util.o get_sub_opt.o msg_ptr.o drac.o pop_config.o 
 pop_tls.o pop_tls_openssl.o pop_tls_sslplus.o sslplus_utils.o main.o 
 pop_cache.o genpath.o  -o popper ../mmangle/libmangle.a \
 -I../common ../common/libcommon.a \
 -lcrypt -L/usr/local/ssl/lib -lssl -lcrypto
 /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x35): In function 
 `dlfcn_load':
 : undefined reference to `dlopen'
 /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x95): In function 
 `dlfcn_load':
 : undefined reference to `dlclose'
 /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0xbc): In function 
 `dlfcn_load':
 : undefined reference to `dlerror'
 /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x147): In function 
 `dlfcn_bind_var':
 : undefined reference to `dlsym'
 /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x172): In function 
 `dlfcn_bind_var':
 : undefined reference to `dlerror'
 /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x237): In function 
 `dlfcn_bind_func':
 : undefined reference to `dlsym'
 /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x262): In function 
 `dlfcn_bind_func':
 : undefined reference to `dlerror'
 /usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x50b): In function 
 `dlfcn_unload':
 : undefined reference to `dlclose'
 collect2: ld returned 1 exit status
 make[1]: *** [popper] Error 1
 make[1]: Leaving directory `/home/src/qpopper4.0.9/popper'
 make: *** [popper_server] Error 2
 
 Is it an openssl error? Or is it a qpopper error? Or is it a operating 
 system error. I compiled these on a slackware linux 10.2
Try to add -ldl to your popper compilation.

Best regards,
-- 
Marek Marcola [EMAIL PROTECTED]

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


openssl problem?

2007-10-12 Thread Giannis Mantzouranis

Hello all
I compiled successfuly openssl 0.9.8f maked the tests and installed it.
I compiled openssh 4.7.p1 with the above
But when I try to compile qpopper 4.0.9 with ssl support at the end make 
outputs the following:


gcc   pop_dele.o pop_dropcopy.o pop_get_command.o pop_get_subcommand.o 
pop_init.o pop_last.o pop_list.o pop_log.o pop_lower.o pop_msg.o pop_parse.o 
pop_pass.o pop_quit.o pop_rset.o pop_send.o pop_stat.o pop_updt.o pop_user.o 
pop_xtnd.o pop_xmit.o popper.o pop_bull.o xtnd_xlst.o pop_uidl.o mktemp.o 
pop_rpop.o pop_apop.o md5.o pop_auth.o pop_pope.o pop_extend.o scram.o 
hmac.o base64.o pop_util.o get_sub_opt.o msg_ptr.o drac.o pop_config.o 
pop_tls.o pop_tls_openssl.o pop_tls_sslplus.o sslplus_utils.o main.o 
pop_cache.o genpath.o  -o popper ../mmangle/libmangle.a \

   -I../common ../common/libcommon.a \
   -lcrypt -L/usr/local/ssl/lib -lssl -lcrypto
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x35): In function 
`dlfcn_load':

: undefined reference to `dlopen'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x95): In function 
`dlfcn_load':

: undefined reference to `dlclose'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0xbc): In function 
`dlfcn_load':

: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x147): In function 
`dlfcn_bind_var':

: undefined reference to `dlsym'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x172): In function 
`dlfcn_bind_var':

: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x237): In function 
`dlfcn_bind_func':

: undefined reference to `dlsym'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x262): In function 
`dlfcn_bind_func':

: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x50b): In function 
`dlfcn_unload':

: undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[1]: *** [popper] Error 1
make[1]: Leaving directory `/home/src/qpopper4.0.9/popper'
make: *** [popper_server] Error 2

Is it an openssl error? Or is it a qpopper error? Or is it a operating 
system error. I compiled these on a slackware linux 10.2

Thanks in advance

Giannis Mantzouranis 


__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: openssl problem?

2007-10-12 Thread Giannis Mantzouranis

Thanks a lot guys IT WORKS!

Giannis Mantzouranis
- Original Message - 
From: Marek Marcola [EMAIL PROTECTED]

To: openssl-users@openssl.org
Sent: Friday, October 12, 2007 10:42 PM
Subject: Re: openssl problem?



Hello,

I compiled successfuly openssl 0.9.8f maked the tests and installed it.
I compiled openssh 4.7.p1 with the above
But when I try to compile qpopper 4.0.9 with ssl support at the end make
outputs the following:

gcc   pop_dele.o pop_dropcopy.o pop_get_command.o pop_get_subcommand.o
pop_init.o pop_last.o pop_list.o pop_log.o pop_lower.o pop_msg.o 
pop_parse.o
pop_pass.o pop_quit.o pop_rset.o pop_send.o pop_stat.o pop_updt.o 
pop_user.o

pop_xtnd.o pop_xmit.o popper.o pop_bull.o xtnd_xlst.o pop_uidl.o mktemp.o
pop_rpop.o pop_apop.o md5.o pop_auth.o pop_pope.o pop_extend.o scram.o
hmac.o base64.o pop_util.o get_sub_opt.o msg_ptr.o drac.o pop_config.o
pop_tls.o pop_tls_openssl.o pop_tls_sslplus.o sslplus_utils.o main.o
pop_cache.o genpath.o  -o popper ../mmangle/libmangle.a \
-I../common ../common/libcommon.a \
-lcrypt -L/usr/local/ssl/lib -lssl -lcrypto
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x35): In function
`dlfcn_load':
: undefined reference to `dlopen'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x95): In function
`dlfcn_load':
: undefined reference to `dlclose'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0xbc): In function
`dlfcn_load':
: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x147): In function
`dlfcn_bind_var':
: undefined reference to `dlsym'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x172): In function
`dlfcn_bind_var':
: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x237): In function
`dlfcn_bind_func':
: undefined reference to `dlsym'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x262): In function
`dlfcn_bind_func':
: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x50b): In function
`dlfcn_unload':
: undefined reference to `dlclose'
collect2: ld returned 1 exit status
make[1]: *** [popper] Error 1
make[1]: Leaving directory `/home/src/qpopper4.0.9/popper'
make: *** [popper_server] Error 2

Is it an openssl error? Or is it a qpopper error? Or is it a operating
system error. I compiled these on a slackware linux 10.2

Try to add -ldl to your popper compilation.

Best regards,
--
Marek Marcola [EMAIL PROTECTED]

__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]



__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


OpenSSL 0.9.8f Win32 Compile Error

2007-10-12 Thread Chris Clark
I am trying to compile version 0.9.8f for Windows, using VC++ 6.0,
ActivePerl, and MASM 6.15.8803.

I am following the instructions in INSTALL.W32, which works fine for
the previous 0.9.8f build, but when I get to the point of running
nmake -f ms\ntdll.mak I get the following errors in 0.9.8f:

Building OpenSSL
ml /Cp /coff /c /Cx /Focrypto\sha\asm\sha512-sse2.obj
.\crypto\sha\asm\sha512-sse2.asm
 Assembling: .\crypto\sha\asm\sha512-sse2.asm
.\crypto\sha\asm\sha512-sse2.asm(29) : error A2006: undefined symbol : XMMWORD
.\crypto\sha\asm\sha512-sse2.asm(30) : error A2006: undefined symbol : XMMWORD
.\crypto\sha\asm\sha512-sse2.asm(31) : error A2006: undefined symbol : XMMWORD
.\crypto\sha\asm\sha512-sse2.asm(32) : error A2006: undefined symbol : XMMWORD

Actually I get 21 more of these same errors, each with a different line number.

Did someone forget to add the equate for XMMWORD?
Can anyone tell me how XMMWORD should be defined?

-Chris
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: OpenSSL 0.9.8f Win32 Compile Error

2007-10-12 Thread Chris Clark
 I am following the instructions in INSTALL.W32, which works fine for
 the previous 0.9.8f build, but when I get to the point of running
 nmake -f ms\ntdll.mak I get the following errors in 0.9.8f:

oops..  I ment to say that the previous version 0.9.8E works fine, and
now that I look closer I see that 0.9.8E did not include the asm file
sha512-sse2.asm so this appears to be a new issue in 0.9.8F.

I looked at the .ASM code and XMMWORD is not a variable, but rather a
type definition which my version of ML does not understand. I see some
info here:
http://msdn2.microsoft.com/en-us/library/cw0399sf(VS.80).aspx
which indicates that I need a newer ML from VS2005. Is that correct?

-Chris
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: SHA1 checksum mismatch on openssl-0.9.8f tarball

2007-10-12 Thread Keith Thompson
On Fri 07-10-12 16:18, Lasse Kliemann wrote:
 The file at
 http://www.openssl.org/./source/openssl-0.9.8f.tar.gz.sha1
 contains the checksum
 
0a0a3fd9be3d46053df2e91b6eb8a3b4348c793c
 
 whereas the file at http://www.openssl.org/source/openssl-0.9.8f.tar.gz (even 
 after repeated download) has SHA1 checksum
 
e8716370093b112763ace0c66c06a0d6049e413b
 
 The published OpenPGP signature 
 http://www.openssl.org/source/openssl-0.9.8f.tar.gz.asc was made with key 
 0x2719AF35 and matches for the tarball. But previous releases were signed 
 with key 0xF295C759.
 
 This looks kind of suspicious to me. However, why would an attacker replace 
 the OpenPGP signature and not the SHA1 checksum?
 
 Hopefully, there is a simple explanation for this.

That's not the only problem.  As of a few minutes ago, there were
two versions of the openssl-0.9.8f.tar.gz.asc file, one on the ftp
server and another on the web server.  Both are signed by the same key
(which is *not* the key used for previous releases), but the one on
the ftp server is incorrect.  But that appears to have been corrected
now (while I was writing this message).

Also, the openssl-0.9.8f.tar.gz.asc file is actually a *binary*
signature, not an ASCII signature as the name implies.  (Previous *.asc
files have been ASCII signatures.)

-- 
Keith Thompson [EMAIL PROTECTED]  San Diego Supercomputer Center
http://users.sdsc.edu/~kst/  858-822-0853
We must do something.  This is something.  Therefore, we must do this.
-- Antony Jay and Jonathan Lynn, Yes Minister
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: OpenSSL 0.9.8f Win32 Compile Error

2007-10-12 Thread Chris Clark
 Did someone forget to add the equate for XMMWORD?
 Can anyone tell me how XMMWORD should be defined?

It appears that I need more then just the newer version of MASM,
and while reading the MASM32 forums they reference this page:
http://www.intel.com/cd/ids/developer/asmo-na/eng/167741.htm?page=6

It mentions that the following include file is needed to assemble SSE3
instructions: 'include ia_pni.inc'

Can anyone tell me where to find this, or of there is a simpler
solution for compiling 0.9.8F for Windows?

- Chris
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: Compatibility between Java crypto and open ssl

2007-10-12 Thread Julius Davies
Hi, Metalpalo,

Have you seen this?

http://juliusdavies.ca/commons-ssl/pbe.html

It doesn't quite do 100% what you're looking for, but I could probably
do a release this weekend to help you.

yours,

Julius

On 10/11/07, Metalpalo [EMAIL PROTECTED] wrote:

 Hello

 I have some question about compatibility between java crypto and openssl
 library.

 This is my case:
 1.I created DESede key and stored it to file:
 {code}
 SecretKey key = KeyGenerator.getInstance(TripleDES).generateKey();
 File f = new File(c:\\key.dat);
 DataOutputStream dos =new DataOutputStream(new FileOutputStream(f));
 dos.write(key.getEncoded());
 dos.close();
 {code}

 2.I encrypt some file c:\\normal.dat through:
 {code}
 ecipher.init(Cipher.ENCRYPT_MODE, key);
   byte[] enc = ecipher.doFinal(normalData);//normalData- loaded file
   File f2 = new File(c:\\enc.dat);
   DataOutputStream dos2 =new DataOutputStream(new FileOutputStream(f2));
   dos2.write(enc);
   dos2.close();
 {code}

 3.I encrypted normal data file in openssl through:
 openssl.exe enc -des3 -in c:\normal.dat -out c:\enc2.dat -pass
 file:c:\key.dat -nosalt

 I tried other algoritm too as(des-ede,des-ede3..) but I got not equal files
 as enc.dat and enc2.dat.
 I used same key in both cases.

 Does exist some compatibility between encryption algorithms in java and
 openssl or not? I'm interested especially in tripledes.

 These functionality(encryption,decryption) will be used by any applications
 developmented in C++, JAVA and VB. I need some compatibilited  des3
 algorithm.

 Can somebody help me ?

 Thanks






 --
 View this message in context: 
 http://www.nabble.com/Compatibility-between-Java-crypto-and-open-ssl-tf4611666.html#a13169808
 Sent from the OpenSSL - User mailing list archive at Nabble.com.

 __
 OpenSSL Project http://www.openssl.org
 User Support Mailing Listopenssl-users@openssl.org
 Automated List Manager   [EMAIL PROTECTED]



-- 
yours,

Julius Davies
250-592-2284
http://juliusdavies.ca/
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: Unusual RSA Private Key Format? (JSAFE)

2007-10-12 Thread Julius Davies
Hi,

Have you seen this?
http://juliusdavies.ca/commons-ssl/utilities.html

You can probably use the KeyStoreBuilder utility on the command-line
to convert your OpenSSL RSA key into a java-friendly jks file (aka:
java keystore file).  Try this command:

-
java -cp not-yet-commons-ssl-0.3.8.jar org.apache.commons.ssl.KeyStoreBuilder
-

JSAFE might work better with a jks file.  Good luck.

yours,

Julius


On 10/9/07, Pierce Ward [EMAIL PROTECTED] wrote:
 Hi guys,

 I'm currently writing a little test application using RSA's JSAFE
 libraries (java version of BSAFE), and I'm generating my keys using
 openssl, however I cannot get a signature to verify successfully. An
 example program (with hard coded bytes for the private key) using an
 rsa algorithm works correctly.

 I was comparing the differences of the supplied private key and the
 private key i generated in openssl and there appear to be a few small
 differences.

 In the rsa example program the modulus, private exponent, prime1,
 prime2, exponent 1 are all one byte shorter in the example than what
 openssl generates. The difference appears to be a beginning 0x00 byte.
 So I removed the beginning byte and tried to verify the signature
 again but it failed. The openssl command I used to create the my
 private key was:

 `openssl genrsa -out private_key.pem -f4 768`

 Then I got the values,
 `openssl rsa -in private_key.pem -text -noout`

 and converted them to a byte array.

 I have pasted the supplied hard coded private key (which is 512bit,
 the one I have tested is 768bit but it shouldn't make a difference)
 to a paste bin here:
 http://pastebin.com/f2900d840

 The program generates the public key from the modulus/public exponent
 but for some reason only the hard coded private key verifys for me. I
 assume both formats are the same standard RSA key? If anyone has any
 ideas as to why its failing to verify I'd greatly appreciate it,

 Cheers,
 __
 OpenSSL Project http://www.openssl.org
 User Support Mailing Listopenssl-users@openssl.org
 Automated List Manager   [EMAIL PROTECTED]



-- 
yours,

Julius Davies
250-592-2284
http://juliusdavies.ca/
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: SHA1 checksum mismatch on openssl-0.9.8f tarball

2007-10-12 Thread Keith Thompson
On Fri 07-10-12 15:02, Keith Thompson wrote:
[...]
 That's not the only problem.  As of a few minutes ago, there were
 two versions of the openssl-0.9.8f.tar.gz.asc file, one on the ftp
 server and another on the web server.  Both are signed by the same key
 (which is *not* the key used for previous releases), but the one on
 the ftp server is incorrect.  But that appears to have been corrected
 now (while I was writing this message).
 
 Also, the openssl-0.9.8f.tar.gz.asc file is actually a *binary*
 signature, not an ASCII signature as the name implies.  (Previous *.asc
 files have been ASCII signatures.)

The key used to generate openssl-0.9.8f.tar.gz.asc (key ID
2719AF35) appears to belong to Ben Laurie, who is a member of
the OpenSSL core team, but it's not the same key advertised on
http://openssl.org/about/ (key ID 2118CF83).

-- 
Keith Thompson [EMAIL PROTECTED]  San Diego Supercomputer Center
http://users.sdsc.edu/~kst/  858-822-0853
We must do something.  This is something.  Therefore, we must do this.
-- Antony Jay and Jonathan Lynn, Yes Minister
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]


Re: OpenSSL 0.9.8f Win32 Compile Error

2007-10-12 Thread Chris Clark
I downloaded NASM (nasm-0.99.04-win32.zip) from Soundforge,
and gave it a try, and when I run ms\do_nasm it is all sucessful
but now I get a different error when running nmake -f ms\ntdll.mak:

Microsoft (R) Program Maintenance Utility   Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

Building OpenSSL
perl util/copy.pl .\crypto\buildinf.h tmp32dll\buildinf.h
Copying: ./crypto/buildinf.h to tmp32dll/buildinf.h
perl util/copy.pl .\crypto\opensslconf.h inc32\openssl\opensslconf.h
Copying: ./crypto/opensslconf.h to inc32/openssl/opensslconf.h
nasmw -f win32 -o crypto\cpu_win32.obj .\crypto\cpu_win32.asm
'nasmw' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'nasmw' : return code '0x1'
Stop.

I do not have NASMW, as the only files included in nasm-0.99.04-win32.zip are:

COPYING
nasm.exe
ndisasm.exe

Can anyone tell me what I am doing wrong?

-Chris
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   [EMAIL PROTECTED]