Re: Encrypting 32/64 bit integers

2009-09-30 Thread Brian Lavender
On Fri, Sep 18, 2009 at 01:59:12PM -0700, musikit wrote: hello, please forgive me as i am not an OpenSSL or encryption expert. i am already using OpenSSL to do encryption of strings and it works awesome. i do have a question about encrypting smaller amounts of data though. my code

Re: Encrypting 32/64 bit integers

2009-09-30 Thread Kenneth Goldman
owner-openssl-us...@openssl.org wrote on 09/30/2009 03:27:56 AM: On Fri, Sep 18, 2009 at 01:59:12PM -0700, musikit wrote: again works awesome for strings. however we are realizing there are sometimes we just want a 32 bit int or a 64 bit int encrypted and nothing else. You could just

Re: Encrypting 32/64 bit integers

2009-09-30 Thread Victor Duchovni
On Wed, Sep 30, 2009 at 12:27:56AM -0700, Brian Lavender wrote: please forgive me as i am not an OpenSSL or encryption expert. i am already using OpenSSL to do encryption of strings and it works awesome. i do have a question about encrypting smaller amounts of data though. Does the

Re: Encrypting 32/64 bit integers

2009-09-30 Thread Michael S. Zick
On Wed September 30 2009, Kenneth Goldman wrote: owner-openssl-us...@openssl.org wrote on 09/30/2009 03:27:56 AM: On Fri, Sep 18, 2009 at 01:59:12PM -0700, musikit wrote: again works awesome for strings. however we are realizing there are sometimes we just want a 32 bit int or a 64

Re: Encrypting 32/64 bit integers

2009-09-30 Thread Victor Duchovni
On Wed, Sep 30, 2009 at 01:00:44PM -0500, Michael S. Zick wrote: You might want to use some representation other than binary for your integers. There are a lot of ways to do that, perhaps pick something that will give you a reasonable (for cryptographic purposes) length. This has no impact

Re: Encrypting 32/64 bit integers

2009-09-30 Thread Michael S. Zick
On Wed September 30 2009, Victor Duchovni wrote: On Wed, Sep 30, 2009 at 01:00:44PM -0500, Michael S. Zick wrote: You might want to use some representation other than binary for your integers. There are a lot of ways to do that, perhaps pick something that will give you a reasonable (for

RE: Encrypting 32/64 bit integers

2009-09-30 Thread Dave Thompson
From: owner-openssl-us...@openssl.org On Behalf Of Brian Lavender Sent: Wednesday, 30 September, 2009 03:28 To: openssl-users@openssl.org Subject: Re: Encrypting 32/64 bit integers On Fri, Sep 18, 2009 at 01:59:12PM -0700, musikit wrote: Encrypt(datato, datafrom) { EVP_EncryptInit

Re: Encrypting 32/64 bit integers

2009-09-22 Thread Peter Wilkes
thank you everyone. i got a better grasp on things now. __ OpenSSL Project http://www.openssl.org User Support Mailing Listopenssl-users@openssl.org Automated List Manager

RE: Encrypting 32/64 bit integers

2009-09-22 Thread Dave Thompson
From: owner-openssl-us...@openssl.org On Behalf Of David Schwartz Sent: Monday, 21 September, 2009 19:48 Peter Wilkes wrote: so we ran this with a 64 bit int and noticed that 128 bits comes out. can we safely ignore the other 64 bits? why are we getting 128 bits out? we are using

Re: Encrypting 32/64 bit integers

2009-09-21 Thread Jeffrey Walton
Hi Peter, so we ran this with a 64 bit int and noticed that 128 bits comes out. can we safely ignore the other 64 bits? why are we getting 128 bits out? It depends on your choice of modes. Specifically on the padding requirements accompanying the mode. Modes such as ECB and CBC will pad to the

Re: Encrypting 32/64 bit integers

2009-09-21 Thread Graham Leggett
Peter Wilkes wrote: so we ran this with a 64 bit int and noticed that 128 bits comes out. can we safely ignore the other 64 bits? why are we getting 128 bits out? Ciphers generally encrypt data in fixed-width blocks, which means you'll end up with a final encrypted cyphertext of a multiple of

RE: Encrypting 32/64 bit integers

2009-09-21 Thread David Schwartz
Peter Wilkes wrote: so we ran this with a 64 bit int and noticed that 128 bits comes out. can we safely ignore the other 64 bits? why are we getting 128 bits out? we are using the TripleDES cipher. It's not clear if you mean 128-bits comes out of the encryption process or 128-bits comes out