When encrypting (specifically when using AES) content, will endianness affect how the key (and/or initialization vector) should look when encrypting/decrypting content? And could this depend on the crypto library in use (I'm using Botan)?

What I mean, if I receive a key (0123456789ABCDEF0123456789ABCDEF) from a big endian system and want to use this to decrypt data on a little endian client, would I need to alter the key in any way? The same question goes for IV though.


1 Answer 1


Endianess of the system does not affect these things.

You usually consider keys, blocks, etc. a stream of bytes where endianess does not matter. The same holds also for the IV.

Endianess comes into play only when using multi-byte values like words or longs.

If it helps you can think of it as all being normalized to big-endian :-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .