Some people have been asking about binary values and how they work.
You have a section in memory that hold 128 bits (16 bytes) for memory. Lets say within that 128 bits you have the letter A = 65 = 0100001 now you want to encrypt that letter A you shift it 1 bit left or right of memory (how about right).
x = 65;
y = 65 >> 1;
y then equals 65/2^1 (if we pushed it right >> 2 then it would be 65/2^2)
thus y would = (in binary) 0010000 = 32 which is a symbol that I can't remember. If you want to push it to the left it would be y = x << 1; y then equals 65*2^1 = 130; 1000010
there you all go.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-12-14
hmmmm... nice... never seen it explained that way though... might help some people figure it out...
Zero Valintine
PS. wouldn't make a good encryption setup though...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Depends on the byte order doesnt it?
i think you are assuming little endian.
if it was big endian then the left and right bit shifting will have different effects
but all intel chipsets (and AMD) IIRC are little endian.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Some people have been asking about binary values and how they work.
You have a section in memory that hold 128 bits (16 bytes) for memory. Lets say within that 128 bits you have the letter A = 65 = 0100001 now you want to encrypt that letter A you shift it 1 bit left or right of memory (how about right).
x = 65;
y = 65 >> 1;
y then equals 65/2^1 (if we pushed it right >> 2 then it would be 65/2^2)
thus y would = (in binary) 0010000 = 32 which is a symbol that I can't remember. If you want to push it to the left it would be y = x << 1; y then equals 65*2^1 = 130; 1000010
there you all go.
hmmmm... nice... never seen it explained that way though... might help some people figure it out...
Zero Valintine
PS. wouldn't make a good encryption setup though...
Depends on the byte order doesnt it?
i think you are assuming little endian.
if it was big endian then the left and right bit shifting will have different effects
but all intel chipsets (and AMD) IIRC are little endian.