big endian vs little endian

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

big endian vs little endian

sahorwitz
When I attempt to encrypt the same text file with the command " openssl bf <tfile.txtx >tfile.bin" I get different results on big endian machines vs little endian machines.

Is this the expected result? If so how do you share encrypted data between big endian and little endian machines

Thanks

--
Samuel A Horwitz

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: big endian vs little endian

Salz, Rich

It’s not endianness, it’s random data in the encrypted stream.  Try encrypting the same file (and password) twice on the same host.  Try decrypting it.  Everything will work right.

 


--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: big endian vs little endian

sahorwitz
I am obviosly a newbie and missing something. How then do I encrypt the file on one machine (little endian), transmit it to another machine (big endian) and decrypt it there?
Reply | Threaded
Open this post in threaded view
|

Re: big endian vs little endian

Ken Goldman-2
On 12/18/2016 11:21 AM, sahorwitz wrote:
> I am obviously a newbie and missing something. How then do I encrypt the file
> on one machine (little endian), transmit it to another machine (big endian)
> and decrypt it there?

Why do you think endian'ness is an issue?



--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: big endian vs little endian

OpenSSL - User mailing list
In reply to this post by sahorwitz
On 18.12.2016 17:21, sahorwitz wrote:
> I am obviosly a newbie and missing something. How then do I encrypt the file
> on one machine (little endian), transmit it to another machine (big endian)
> and decrypt it there?
>
>
>
similar to this:

encrypt
openssl enc -e -in file -out encryptfile -aes-256-gcm

decrypt
openssl enc -d -in encryptfile -out file -aes-256-gcm

can someone explain why I get the following output

enter aes-256-gcm decryption password:
bad decrypt

but the file is correctly decrypted

I'm using latest openssl rpm package from CentOS 6




--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: big endian vs little endian

Viktor Dukhovni

> On Dec 18, 2016, at 2:55 PM, Walter H. via openssl-users <[hidden email]> wrote:
>
> encrypt
> openssl enc -e -in file -out encryptfile -aes-256-gcm

GCM is not supported with "openssl enc(1)".  Use a CBC cipher
instead.

--
        Viktor.

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: big endian vs little endian

J. J. Farrell-2
In reply to this post by sahorwitz
On 18/12/2016 16:21, sahorwitz wrote:
I am obviosly a newbie and missing something. How then do I encrypt the file
on one machine (little endian), transmit it to another machine (big endian)
and decrypt it there?

What problem are you actually seeing? In what way does the decryption fail on the destination machine? Please include the commands you are using in the problem scenario, and any messages put out by the commands. The endianness of the machines isn't relevant.

-- 
J. J. Farrell
Not speaking for Oracle

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: big endian vs little endian

Jeffrey Walton-3
In reply to this post by Viktor Dukhovni
On Sun, Dec 18, 2016 at 5:09 PM, Viktor Dukhovni
<[hidden email]> wrote:
>
>> On Dec 18, 2016, at 2:55 PM, Walter H. via openssl-users <[hidden email]> wrote:
>>
>> encrypt
>> openssl enc -e -in file -out encryptfile -aes-256-gcm
>
> GCM is not supported with "openssl enc(1)".  Use a CBC cipher
> instead.

+1. This was late to be documented, but its available at
(https://www.openssl.org/docs/man1.0.2/apps/enc.html):

    "The enc program does not support authenticated
    encryption modes like CCM and GCM. The utility
    does not store or retrieve the authentication tag."

Maybe the encrypt program should throw an error rather than producing
incorrect results without a warning.
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: big endian vs little endian

Salz, Rich
In reply to this post by sahorwitz
> I am obviosly a newbie and missing something. How then do I encrypt the file
> on one machine (little endian), transmit it to another machine (big endian)
> and decrypt it there?

Did you try it?
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: big endian vs little endian

Sam Horwitz
Yes. Thanks you it works. My stupid.

-----Original Message-----
From: openssl-users [mailto:[hidden email]] On Behalf Of Salz, Rich
Sent: Tuesday, December 20, 2016 12:16 PM
To: [hidden email]
Subject: Re: [openssl-users] big endian vs little endian

> I am obviosly a newbie and missing something. How then do I encrypt
> the file on one machine (little endian), transmit it to another
> machine (big endian) and decrypt it there?

Did you try it?
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users