Decryption problem

2005-03-29 Thread Michael D'Errico
I'm having a problem where after encrypting data and then decrypting it, the result is a few bytes of garbage (probably one block), and then the rest of the data is the same as the original. I'm using EVP_Seal* and EVP_Open* to perform the encryption. I tested with AES, DESX, and blowfish, and

Re: Decryption problem

2005-03-29 Thread Michael D'Errico
I forgot to mention that this happens with CBC and CFB modes; OFB gives all garbage, but I'm hopeful that fixing CBC and CFB modes will also fix OFB mode. I am using OpenSSL 0.9.7f on mingw. Mike Michael D'Errico wrote: I'm having a problem where after encrypting data and then decrypting it, the

Re: Decryption problem

2005-03-29 Thread Michael D'Errico
Turns out there is wrong information in Network Security with OpenSSL about using EVP_SealInit. It indicates that you are to pass in an init vector, but EVP_SealInit generates one and passes it back to the caller. Once I figured this out, I got everything to work. Mike

Re(2): RE(2): Re(2): Decryption Problem

2005-03-07 Thread Peter Cope
Steve Many thanks for this; I should have persevered with delving into the relevant RFC’s and checking the ASN.1 was valid and well formed. So I’m assuming Outlook is “tolerant” (to some extent) of ‘badly formed’ ASN.1 whereas openssl adheres to the standards (which is how it should be). One

Re: Re(2): RE(2): Re(2): Decryption Problem

2005-03-07 Thread Dr. Stephen Henson
On Mon, Mar 07, 2005, Peter Cope wrote: Steve Many thanks for this; I should have persevered with delving into the relevant RFC’s and checking the ASN.1 was valid and well formed. So I’m assuming Outlook is “tolerant” (to some extent) of ‘badly formed’ ASN.1 whereas openssl adheres

Re: Re(2): RE(2): Re(2): Decryption Problem

2005-03-07 Thread Pablo J Royo
There are some hooks for BER and streaming S/MIME in OpenSSL 0.9.8 but that's only at an early stage and no one's really been that interested in it at present. My program has to handle big PKCS7 files, so I´d be very interested in that streaming. I had to modify PKCS7_doit( ) routines to do

RE(2): Re(2): Decryption Problem

2005-03-06 Thread Peter Cope
proof it isn't. Peter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dr. Stephen Henson Sent: 06 March 2005 01:13 To: openssl-users@openssl.org Subject: Re: Re(2): Decryption Problem On Fri, Mar 04, 2005, Peter Cope wrote: Steve, sorry forget

Re: RE(2): Re(2): Decryption Problem

2005-03-06 Thread Dr. Stephen Henson
On Sun, Mar 06, 2005, Peter Cope wrote: I'm using openssl 0.9.7e on Unix (The example output below is from Windows version of openssl [a 0.9.7X derived binary version from stunnel.org], but is consistent with AIX version as regards the failure. I will repeat this tomorrow when I have

Re: Re(2): Decryption Problem

2005-03-05 Thread Dr. Stephen Henson
On Fri, Mar 04, 2005, Peter Cope wrote: Steve, sorry forget to include the asn1parse output ... I've X'd out sensitive stuff: 0:d=0 hl=4 l=57226 cons: SEQUENCE 4:d=1 hl=2 l= 9 prim: OBJECT:pkcs7-envelopedData 15:d=1 hl=4 l=57211 cons: cont [ 0 ]

Decryption Problem

2005-03-04 Thread Peter Cope
Firstly I've searched the FAQ's and Google'd and not found an answer. I'll describe the scenario and hope someone can shed some light! Machine-1: Generates keys/certs (Self Cert CA). This is a UNIX (well AIX) box, and runs openssl (latest release). Keys/Certs are distributed to a number of PC's

Re: Decryption Problem

2005-03-04 Thread Dr. Stephen Henson
On Fri, Mar 04, 2005, Peter Cope wrote: Firstly I've searched the FAQ's and Google'd and not found an answer. I'll describe the scenario and hope someone can shed some light! Machine-1: Generates keys/certs (Self Cert CA). This is a UNIX (well AIX) box, and runs openssl (latest

Re(2): Decryption Problem

2005-03-04 Thread Peter Cope
Steve, sorry forget to include the asn1parse output ... I've X'd out sensitive stuff: 0:d=0 hl=4 l=57226 cons: SEQUENCE 4:d=1 hl=2 l= 9 prim: OBJECT :pkcs7-envelopedData 15:d=1 hl=4 l=57211 cons: cont [ 0 ] 19:d=2 hl=4 l=57207 cons: SEQUENCE 23:d=3 hl=2 l= 1 prim: INTEGER :00 26:d=3 hl=4 l=

RSA decryption problem

2003-10-29 Thread murari
Hi, I have implemented a simple TCP client and server processes such that..server generates the RSA keys and send the public modulus and public exponent to the client. The client process uses these values to encrypt a user entered string and sends it back to server. The server then decrypts the

RSA encryption and decryption problem.....

2001-07-27 Thread MARS.LIN
Dear Mr., Thanks for your time reading this. I use the crypto library in openssl-0.9.6b.tar.gz, and configure into VC-WIN32. After setting up and compling, every thing works fine with the XXXtest.exe in out32dll directory. Then I try to use the file demos\eay\loadrsa.c and it works. I try to