
PRELIMINARY
Read Memory [F0h]
The read memory command may be used to read all memory except for the secret. Attempting to read the
secret will not reveal any data. After issuing the command, the master must provide the 2-byte target
address. After these two bytes, the master reads data beginning from the target address and may continue
until address 0097h. If the master continues reading the result will be logic 1’s. It is important to realize
that the target address registers will point to the last byte read. The ending offset/data status byte and the
scratchpad are unaffected.
DS2432
19 of 30
The hardware of the DS2432 provides a means to accomplish error-free writing to the memory section.
To safeguard reading data in the 1-Wire environment and to simultaneously speed up data transfers, it is
recommended to packetize data into data packets of the size of one memory page each. Such a packet
would typically store a master-calculated 16-bit CRC with each page of data to ensure rapid, error-free
data transfers that eliminate having to read a page multiple times to determine if the received data is
correct or not. (See Application Note 114 for the recommended file structure, which is also referred to as
TMEX Format.)
SHA-1 COMPUTATION ALGORITHM
This description of the SHA computation is adapted from the Secure Hash Standard SHA-1 document as
it can be downloaded from the NIST web site (http://www.itl.nist.gov/fipspubs/fip180-1.htm). The
algorithm takes as its input data sixteen 32-bit words Mt (0
≤
t
≤
15), as shown in Tables 1, 2 and 4 for
the Compute Next Secret, Copy Scratchpad and Read Authenticated Page command, respectively. The
SHA computation involves a sequence of eighty 32-bit words called Wt (0
≤
t
≤
79), a sequence of eighty
32-bit words called Kt (0
≤
t
≤
79), a Boolean function ft (B, C, D) (0
≤
t
≤
79) with B, C and D being
32-bit words, and three more 32-bit words called A, E and TMP. The operations required for the SHA
computation are arithmetic addition without carry (“+”), logical inversion or 1’s complement (“\”),
EXCLUSIVE OR (“
⊕
”), logical AND (“
∧
”), logical OR (“
∨
”), assignment (“:=”), and circular shifting
within a 32-bit word. The expression “Sn(X)” represents a circular shift of X by n positions to the left,
with X being a 32-bit word.
The function ft is defined as follows:
ft(B,C,D) = (B
∧
C)
∨
((B\)
∧
D)
B
⊕
C
⊕
D
(B
∧
C)
∨
(B
∧
D)
∨
(C
∧
D)
B
⊕
C
⊕
D
(0
≤
t
≤
19)
(20
≤
t
≤
39)
(40
≤
t
≤
59)
(60
≤
t
≤
79)
The sequence Wt (0
≤
t
≤
79) is defined as follows:
Wt := Mt
S1(Wt-3
⊕
Wt-8
⊕
Wt-14
⊕
Wt-16)
(0
≤
t
≤
15)
(16
≤
t
≤
79)
The sequence Kt (0
≤
t
≤
79) is defined as follows:
Kt
:=
5A827999h
6ED9EBA1h (20
≤
t
≤
39)
8F1BBCDCh (40
≤
t
≤
59)
CA62C1D6h (60
≤
t
≤
79)
(0
≤
t
≤
19)