AES Rijndael and Little / Big Endian?

I use the referenced implementation of the AES Rijndael public domain, commonly distributed under the name "rijndael-fst-3.0.zip". I plan to use this to encrypt my network data, and I wonder if the results of the encryption will differ from the large / small final architectures? In other words, can I encrypt a block of 16 bytes on a small destination machine, and then decrypt the same block on the large end? And, of course, vice versa.

If not, how do I go about replacing bytes?

Thanks in advance for your help.

Sincerely.

+4
source share
2 answers

Rijndael does not pay attention to the byte order; it just sees the byte string that you feed it. You should do a byte exchange outside of it, as always (using ntohs or any other interface your platform has for this purpose).

+3
source

Byte order issues only apply to the context of matching multi-byte constructs with a sequence of bytes, for example. mapping a 4-byte sequence to a signed integer value is sensitive to byte order.

The AES algorithm is byte-centric and insensitive to endian related issues.

+4
source

All Articles