09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>RM0090</strong> Hash processor (HASH)<br />

Figure 220. Bit, byte and half-word swapping<br />

A-In case of binary data hash, all bits should be swapped as below<br />

Bit s w a p pi n g ope r a t i o n<br />

H A S H_D I N<br />

bit string organization in<br />

Hash processor: Big-Endian<br />

b i t 3 1<br />

B y t e s w a p ping ope r a t i o n<br />

H A S H_D I N<br />

HA S H_ D I N<br />

bi t 0 bi t 1 bi t 2 9 b i t 3 0 b i t 3 1<br />

B y t e 3<br />

bi t s 7 . . . 0<br />

B y t e 0<br />

bi t s 7 . . . 0<br />

bi t 3 0<br />

B y t e 2<br />

b i t s 7 .. . 0<br />

B y t e 1<br />

b i t s 7 .. . 0<br />

bi t 2<br />

B y t e 1<br />

b i t s 7 .. . 0<br />

B y t e 2<br />

b i t s 7 .. . 0<br />

bi t 1<br />

bi t 0<br />

B y t e 0<br />

bi t s 7 . . . 0<br />

B y t e 3<br />

bi t s 7 . . . 0<br />

b i t- s tr i n g g r o ws<br />

i n t hi s di rect io n<br />

as d e f i n e d b y<br />

FIPS PUB 1 80 - 2 s t d .<br />

b i t- s tr i n g g r o ws<br />

i n t hi s di rect io n<br />

as d e f i n e d b y<br />

FIPS PUB 1 80 - 2 s t d .<br />

C-In case of half-word hash, all half-word should be swapped as below<br />

H a l f - w o r d s w a pping o p er a t io n<br />

D A T A T YPE = bx 01<br />

Half-wo r d 1<br />

bi t s 15 . . . 0<br />

Half-wor d 0<br />

bi t s 15 .. . 0<br />

Half-wo r d 0<br />

bi t s 15 . . . 0<br />

Half-wor d 1<br />

bi t s 15 .. . 0<br />

“1”<br />

D A T A TYPE = bx 1 1<br />

Bits entred with little-Endian format<br />

p ad d ing is perfo r m ed<br />

on this side of the<br />

bit s t ri n g.<br />

B-In case of byte data hash, all bytes should be swapped as below<br />

Bit string organization in<br />

Hash processor: Big-Endian<br />

Bit string organization in<br />

Hash processor: Big-Endian<br />

D A T A T YPE = bx 10<br />

Bytes entred with little-Endian format<br />

half word entred with little-Endian format<br />

b i t-str in g g r o ws<br />

i n t h is d i rect i o n<br />

a s d e fi n e d b y<br />

F I PS PUB 18 0 - 2 s t d .<br />

ai16082<br />

Doc ID 018909 Rev 3 598/1416

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!