Re: Conventional DES byte order?
- From: Eric Young <eay_nospam@xxxxxxxxx>
- Date: Mon, 24 Nov 2008 23:52:55 +1000
Thomas Pornin wrote:
According to <jonathan@xxxxxxxxx>:
when reading a block from memory is it conventional to treat
plain text as "little endian" or "big endian"? (please excuse the
slightly inappropriate terminology)
It is "big endian". Actually that's what is done by all software and
hardware I have encountered, including most major SSL implementations,
CMS-aware systems (e.g. S/MIME) and some HSM. In the DES terminology,
bits are ordered "left to right" and most people take it as meaning that
when mapping an ordered sequence of bytes (by increasing addresses) into
blocks, left comes first.
hmm... OpenSSL uses little-endian. I believe that DES, like AES can be
implemented with either endian. Using the platform's native endian does
help quite a bit, especially if your platform supports aligned access.
I have only ever implemented little-endian DES, but for AES, #defines
flip the implementation.
eric
.
- Follow-Ups:
- Re: Conventional DES byte order?
- From: Thomas Pornin
- Re: Conventional DES byte order?
- Prev by Date: Re: THE SIMPLIEST SAFE CIPHER
- Next by Date: utility for building arbitrary PKCS #7 content structure? e.g. openssl
- Previous by thread: Re: Integer factorization equations
- Next by thread: Re: Conventional DES byte order?
- Index(es):