Compatibility of an encrypted file between little endian and big endian machines?

10 views
Skip to first unread message

Grant Rostig

unread,
Jan 31, 2020, 2:19:20 AM1/31/20
to Crypto++ Users
Is there automatic compatibility of an encrypted file between little endian and big endian machines in 8.2? 

Does crypto++ support both architectures whether compatible or not, without patches?

May be a silly/naive question, but another c++ library documents requiring special functions to create compatible encrypted files.

I couldn't find a direct answer in the documentation, or the mailing list.   I did note the integer patch in the documentation, but that may relate to another issue specific to use of the integer class?  Also not sure if the integer patch has been included (documentation says it has not been) in the current release since there seemed to be some talk on this list of merging it.

Thanks to all the contributors to crypto++.

++Regards
Grant

Jeffrey Walton

unread,
Jan 31, 2020, 2:53:21 AM1/31/20
to Crypto++ Users List
On Fri, Jan 31, 2020 at 2:19 AM Grant Rostig <grantr...@gmail.com> wrote:
>
> Is there automatic compatibility of an encrypted file between little endian and big endian machines in 8.2?
>
> Does crypto++ support both architectures whether compatible or not, without patches?

Yes, the library supports both little-endian and big-endian machines,
without patches.

The only platform it makes a significant difference is PowerPC
machines. The PPC code supports Altivec, Power7, Power8 and Power9.
Power8 is the important one. Power8 added a crypto accelerator that
provides AES, SHA and VMUL instructions.

The one caveat is, we don't support inline assembly and intrinsics for
big-endian ARM machines. On big-endian ARM machines you get straight
C++. If I could get my hands on an ARM BE machine, then we would
support it, too.

Files and streams do not matter to the library. It is bytes in/bytes
out. Bytes don't really have endianness.

Jeff
Reply all
Reply to author
Forward
0 new messages