RE: OpenSSL DES generates '\n' in encrypted code

2012-08-22 Thread Charles Mills
ot;less than AES256." Charles -Original Message- From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of Ben Laurie Sent: Tuesday, August 21, 2012 1:47 PM To: openssl-users@openssl.org Subject: Re: OpenSSL DES generates '\n' in encrypted

Re: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Ben Laurie
On Tue, Aug 21, 2012 at 2:14 PM, Charles Mills wrote: > Actually, there IS *almost* a general solution to this problem. > > The input consists of characters from some set of 'n' characters. (Perhaps > 'n' is 94 -- 0x21 through 0x7e inclusive -- but it does not matter.) You need > to pack those c

RE: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Charles Mills
9:35 AM To: openssl-users@openssl.org Subject: Re: OpenSSL DES generates '\n' in encrypted code On 21 August 2012 14:14, Charles Mills wrote: Actually, there IS *almost* a general solution to this problem. The input consists of characters from some set of 'n' characters.

Re: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Matt Caswell (fr...@baggins.org)
does not have to be the same size as your input character space. If the target character space is bigger by a sufficient amount then this is not a problem. > > Charles > > -Original Message- > From: owner-openssl-us...@openssl.org [mailto: > owner-openssl-us...@openssl.org] O

Re: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Jakob Bohm
, August 21, 2012 5:49 AM *To:* openssl-users@openssl.org *Subject:* Re: OpenSSL DES generates '\n' in encrypted code As Andrey has said the output from encryption is binary and so can be any character (prinatable and non-printable). Therefore you are going to have to do some kind of encod

RE: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Charles Mills
Of Ken Goldman Sent: Tuesday, August 21, 2012 8:46 AM To: openssl-users@openssl.org Subject: Re: OpenSSL DES generates '\n' in encrypted code On 8/21/2012 7:17 AM, Matt Caswell wrote: > > On 21 August 2012 12:00, Tarun Thakur wrote: > >> Output of my software application

Re: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Ken Goldman
On 8/21/2012 7:17 AM, Matt Caswell wrote: On 21 August 2012 12:00, Tarun Thakur wrote: Output of my software application (after encryption and encoding with any mechanism) should be of 24 bytes containing alphanumeric characters only. So, if I get encrypted 24 bytes from plain 24bytes, then

Re: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Tarun Thakur
Thank you all for your suggested solutions. Matt Caswell (fr...@baggins.org) wrote: > > On 21 August 2012 12:00, Tarun Thakur wrote: > >> >> Hi All, >> >> Thank you very much for your responses. >> >> Output of my software application (after encryption and encoding with any >> mechanism) sh

RE: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Charles Mills
The encrypted output could also contain a null (‘\0’) which is probably even more of a problem for your application. Charles From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of Tarun Thakur Sent: Tuesday, August 21, 2012 3:26 AM To: openssl-users@openssl

RE: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Charles Mills
generates '\n' in encrypted code As Andrey has said the output from encryption is binary and so can be any character (prinatable and non-printable). Therefore you are going to have to do some kind of encoding of the output to force it to be printablethis is going to increase the length

Re: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Matt Caswell (fr...@baggins.org)
On 21 August 2012 12:00, Tarun Thakur wrote: > > Hi All, > > Thank you very much for your responses. > > Output of my software application (after encryption and encoding with any > mechanism) should be of 24 bytes containing alphanumeric characters only. > > So, if I get encrypted 24 bytes from p

Re: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Tarun Thakur
Hi All, Thank you very much for your responses. Output of my software application (after encryption and encoding with any mechanism) should be of 24 bytes containing alphanumeric characters only. So, if I get encrypted 24 bytes from plain 24bytes, then which encoding mechanism can convert encr

Re: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Matt Caswell (fr...@baggins.org)
As Andrey has said the output from encryption is binary and so can be any character (prinatable and non-printable). Therefore you are going to have to do some kind of encoding of the output to force it to be printablethis is going to increase the length no matter what. What is the allowed set

Re: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Andrey Koltsov
Hi. base64 format can encode strings of any length. The encoded result would be longer of course. Best regards, Andrey Koltsov software developer CyberplatSoft Ltd 21.08.2012 11:45, Tarun Thakur пишет: Hi, Thanks for your reply.. But issue in base64 encoding is it will generate encoded t

Re: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Tarun Thakur
Hi, Thanks for your reply.. But issue in base64 encoding is it will generate encoded test greater than 24 bytes. Application output should generate encrypted code exactly 24 bytes as input. Thanks, Tarun Andrey Koltsov-2 wrote: > > Hi Tarun. > > Output of every encryption function is alway

Re: OpenSSL DES generates '\n' in encrypted code

2012-08-21 Thread Andrey Koltsov
Hi Tarun. Output of every encryption function is always binary so it can contains ANY character. You should encode this binary string to base64 or hex format by yourself to pass it to your application. Do not forget to do reverse encoding before decrypting. Best regards, Andrey Koltsov sof