Re: Cohen's paper on byte order

From: Mok-Kong Shen (mok-kong.shen_at_t-online.de)
Date: 05/18/03


Date: Sun, 18 May 2003 22:40:49 +0200


Brian Gladman wrote:
>
> "Mok-Kong Shen" <mok-kong.shen@t-online.de> wrote:

> > It's not clear to me how you pack the bits into the
> > word w0 and how you would concretly check the
> > fulfillment of the condition w0=2b7e1516 inside
> > your program code? And how do you interpret
> > the semantics w0=2b7e1516? In the user's logical
> > view of the word w0 in your program code, what are
> > the leftmost 8 bits of w0? Is that view dependent on
> > the 'choice' mentioned above? Why that dependency,
> > which means two different bit sequences in the
> > user's logical view, if one could agree that there
> > is only one common convention of interpreting the
> > hex notation.
>
> In terms of byte arrays w0=2b7e1516 can be either
>
> byte w[4] = { 0x2b, 0x7e, 0x15, 0x16 }
>
> or
>
> byte w[4] = { 0x16, 0x15, 0x7e, 0x2b }
>
> My code will operate correctly for both these formats. If you inspect the
> internal data as if it is a 32-bit integer you will get 0x2b7e1516 in one
> case and 0x16157e2b in the other.
>
> So if I interpret your question about leftmost to mean 'leftmost' = 'most
> significant' for 32-bit integer values then the answer would be 0x2b in one
> case and 0x16 in the other.
>
> I have code that reverses the bits as well but I have not published this.
> Whereas there are advantages for byte order reversal, I have not come across
> a machine where bit order reversal is advantageous. It is, however,
> posssible that machines might exist where this would apply.

No. I avoided the use of 'integer' in the last post.
In FIPS' notation w0 is a 32-bit word. Unless it is
said there to be an integer variable (apparently
not), I consider it to be simply a 'container' of size
32 for bits. So in the code the variable w0 depicts
32 bits as viewed by the user in a left to right
ordering. (Let's temporarily ignore the bytes.) What
does w0=2b7e1516 mean? Could you re-write it in
the bit sequence notation according to the common
convention of hex (the first 8 bits suffice)? I refer
to this as the user's logical view of w0. Is that
unique? If not, why?

Thanks.

M. K. Shen



Relevant Pages

  • Re: Cantor Confusion
    ... You are able to invent new notation without knowing it. ... >>> and S is the set of corresponding sequences ... >> S is certainly not an ordered set because it contains multiple ...
    (sci.math)
  • Re: Cantor Confusion
    ... Yes, I look closer. ... By what magical notation change do you make it that the elements ... > and S is the set of corresponding sequences ... The cardinality of L is 3. ...
    (sci.math)
  • Re: runtime complexity
    ... of sequences of matrix multiplications depend on the ... computations with O notation. ... but the asymptotic growth might still be the same. ...
    (comp.soft-sys.matlab)
  • Re: Cohens paper on byte order
    ... > bit sequences and numbers. ... decimal digits) interpret it differently than the ... conform to our human interpretation, ... large efficiency difference between the two (which ...
    (sci.crypt)
  • Re: slurred staccatos
    ... >>> I'm interest in finding out how different people interpret the ... >>> musical notation of slurred staccatos. ... > But if the interpretation of a slurred staccato is the same as no ... Obviously it's not the same as no marking at all, ...
    (rec.music.classical)