DS1963S
22 of 37
SHA-1 Input Message Formats
(continued) Table 2
Validate Data Page, Sign Data Page, Authenticate Host, Compute First Secret, Compute Next Secret
M0[31:24] = (SS+0)
M0[23:16] = (SS+1)
M1[31:24] = (PP+0)
M1[23:16] = (PP+1)
M2[31:24] = (PP+4)
M2[23:16] = (PP+5)
M3[31:24] = (PP+8)
M3[23:16] = (PP+9)
M4[31:24] = (PP+12)
M4[23:16] = (PP+13)
M5[31:24] = (PP+16)
M5[23:16] = (PP+17)
M6[31:24] = (PP+20)
M6[23:16] = (PP+21)
M7[31:24] = (PP+24)
M7[23:16] = (PP+25)
M8[31:24] = (PP+28)
M8[23:16] = (PP+29)
M9[31:24] = (SP+8)
M9[23:16] = (SP+9)
M10[31:24] = MPX
M10[23:16] = (SP+13)
M11[31:24] = (SP+16)
M11[23:16] = (SP+17)
M12[31:24] = (SS+4)
M12[23:16] = (SS+5)
M13[31:24] = (SP+20)
M13[23:16] = (SP+21)
M14[31:24] = 00h
M14[23:16] = 00h
M15[31:24] = 00h
M15[23:16] = 00h
M0[15:8] = (SS+2)
M1[15:8] = (PP+2)
M2[15:8] = (PP+6)
M3[15:8] = (PP+10)
M4[15:8] = (PP+14)
M5[15:8] = (PP+18)
M6[15:8] = (PP+22)
M7[15:8] = (PP+26)
M8[15:8] = (PP+30)
M9[15:8] = (SP+10)
M10[15:8] = (SP+14)
M11[15:8] = (SP+18)
M12[15:8] = (SS+6)
M13[15:8] = (SP+22)
M14[15:8] = 00h
M15[15:8] = 01h
M0[7:0] = (SS+3)
M1[7:0] = (PP+3)
M2[7:0] = (PP+7)
M3[7:0] = (PP+11)
M4[7:0] = (PP+15)
M5[7:0] = (PP+19)
M6[7:0] = (PP+23)
M7[7:0] = (PP+27)
M8[7:0] = (PP+31)
M9[7:0] = (SP+11)
M10[7:0] = (SP+15)
M11[7:0] = (SP+19)
M12[7:0] = (SS+7)
M13[7:0] = 80h
M14[7:0] = 00h
M15[7:0] = B8h
Legend
Mt
Input buffer of SHA engine
0 t 15; 32-bit words
Starting address of secret
See Figure 5, Memory Map, memory pages 16 and 17
With Compute First Secret the secret data is replaced by all zeros.
Starting address of memory page
See Figure 5, Memory Map, memory pages 0 through 15
MPX[7] = Control bit M, see Figure 8
MPX[6] = Control bit X, see Figure 8
MPX[5:0] = (SP+12)[5:0]
Byte n of scratchpad
The counting of n is in decimal
SS
PP
MPX
(SP+n)
The SHA functions as well as the memory functions involve several flags that may affect the function
itself and the result of functions executed in subsequent steps. These flags are HIDE, CHLG, AUTH and
MATCH. Table 3 summarizes the operation of these flags. The only command that does not change any
flag is Read Scratchpad. Note that a power-on reset of the parasite-powered 1-Wire front end of the
device also affects the flags. This “Return to Probe” condition occurs typically when a DS1963S device
makes contact with a read/write probe of a host computer or bus master or if the connection is
intermittent. The most apparent is the HIDE-flag. If set it prevents the user from reading the data in the
scratchpad; the current value of the target address and E/S byte remain readable, though. The HIDE-flag
also affects the Write Scratchpad and Copy Scratchpad commands. The other three flags are used in
special situations only and remain cleared most of the time. The flags CHLG and AUTH act as a pair in
the host/user authentication process to ensure that commands are executed in a certain sequence. If the
sequence is correct and the subsequent Match Scratchpad command results in matching data, the
MATCH flag is set. The MATCH flag then may affect Validate Data Page, Sign Data Page or Read
Authenticated Page.