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 basically goes as follows
>
> Encrypt(datato, datafrom)
> {
> EVP_EncryptInit();
> EVP_EncryptUpdate();
> EVP_EncryptFinal();
> EVP_CIPHER_CTX_cleanup();
> }
>
> 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 xor the bits with the key.
>
> 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?
I would have to look at the specs for Triple DES, but I believe it is a
block cipher, so it will always be a multiple of 128 bits or whatever
its block size is.
brian
>
> we are using the TripleDES cipher.
--
Brian Lavender
http://www.brie.com/brian/
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [email protected]