Re: Cohen's paper on byte order
From: Mok-Kong Shen (mok-kong.shen_at_t-online.de)
Date: 05/18/03
- Next message: Jan Bruns: "Re: Karatsuba squaring"
- Previous message: Brian Gladman: "Re: Cohen's paper on byte order"
- In reply to: Brian Gladman: "Re: Cohen's paper on byte order"
- Next in thread: Brian Gladman: "Re: Cohen's paper on byte order"
- Reply: Brian Gladman: "Re: Cohen's paper on byte order"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Next message: Jan Bruns: "Re: Karatsuba squaring"
- Previous message: Brian Gladman: "Re: Cohen's paper on byte order"
- In reply to: Brian Gladman: "Re: Cohen's paper on byte order"
- Next in thread: Brian Gladman: "Re: Cohen's paper on byte order"
- Reply: Brian Gladman: "Re: Cohen's paper on byte order"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|