Re: OpenSSL 1.0.0 beta 1 released - build fail on Solaris 2.5.1

2009-04-05 Thread Ted Mittelstaedt
This is from /openssl-SNAP-20090405 on Solaris x86 ver 2.5.1 using gcc 2.95.3: gcc -I.. -I../.. -I../asn1 -I../evp -I../../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -O3 -fomit-frame-pointer -march=pentium -Wall -DL_ENDIAN -DOPENSSL_NO_INLINE_ASM

Re: help with bad decrypt error

2009-04-05 Thread Ger Hobbelt
On Sun, Apr 5, 2009 at 6:19 PM, Dr. Stephen Henson wrote: > Well it looks like one problem is the key. The default key size is 128 bits > for EVP_bf_cbc() and "Test Key" is 64 bits or 72 bits if you include the final shoot. that's it. forget my 'cannot reproduce, search elsewhere' garbage from

Re: help with bad decrypt error

2009-04-05 Thread Dr. Stephen Henson
On Fri, Mar 27, 2009, Charles wrote: > I have a function that writes encryption of msg to filename using key > and iv. I have another function that reads filename and decrypts msg > using key and iv. > > If I run my encrypt function to create the encrypted file, and then > try and decrypt later

Re: help with bad decrypt error?

2009-04-05 Thread Ger Hobbelt
On Thu, Apr 2, 2009 at 10:17 PM, Charles wrote: > I posted this before but still haven't solved it: [...] > int bf_encrypt( string filename, string msg, string key, string iv ) { >       unsigned char outbuf[1024]; [...] >               out.write((char *) &outbuf, outlen ); [...] Shouldn't need t

Re: ASN.1 library

2009-04-05 Thread Dr. Stephen Henson
On Sun, Apr 05, 2009, Randy Turner wrote: > > The way that I interpret the above paragraph, I can use the OpenSSL ASN.1 > code to > decode BER and output DER. Can I "encode" BER and "decode" DER? > http://www.openssl.org/support/faq.html#PROG4 Steve. -- Dr Stephen N. Henson. Email, S/MIME and

Re: ASN.1 library

2009-04-05 Thread Randy Turner
On Apr 2, 2009, at 2:22 PM, Dr. Stephen Henson wrote: On Thu, Apr 02, 2009, Randy Turner wrote: Hello list, Are the ASN.1 functions in OpenSSL "generic" enough to be used for other purposes besides reading/writing certificates? Yes. I was curious if the ASN.1 code could encode/decod

Re: 3des and plain-encrypted size

2009-04-05 Thread Ger Hobbelt
This has to do with padding, which is at least 1 byte, and always ensures input + padding is an integer multiple of the block size. Hence 8 input + 1 byte minimum padding ==> 8 bytes input + 8 bytes padding. See what happens when you feed it, for instance, 5 bytes of input: resulting file should b