The present invention is a device for and method of generating a hash value
for a message by padding the message, loading the padded message into a
first shift register that generates values according to a first rule of
motion, initializing eight registers a, b, c, d, e, f, g, and h with
user-definable values; converting the contents of the registers to h.sub.j
=g.sub.j-1 ; g.sub.j =f.sub.j-1 ; f.sub.j =e.sub.j-1 ; e.sub.j =d.sub.j-1
+T.sub.1, where T.sub.1 =h.sub.j-1 +.SIGMA..sub.1
(e.sub.j-1)+Ch(e.sub.j-1, f.sub.j-1, g.sub.j-1)+K.sub.j +W.sub.j,; d.sub.j
=c.sub.j-1 ; c.sub.j =b.sub.j-1 ; b.sub.j =a.sub.j-1 ; and a.sub.j
=T.sub.1 +T.sub.2, where T.sub.2 =.SIGMA..sub.0 (a.sub.j-1)+Maj(a.sub.j-1,
b.sub.j-1, c.sub.j-1); computing H.sub.1 (j)=a+H.sub.1 (j-1); H.sub.2
(j)=b+H.sub.2 (j-1); H.sub.3 (j)=c+H.sub.3 (j-1); H.sub.4 (j)=d+H.sub.4
(j-1); H.sub.5 (j)=e+H.sub.5 (j-1); H.sub.6 (j)=f+H.sub.6 (j-1); H.sub.7
(j)=g+H.sub.7 (j-1); and H.sub.8 (j)=h+H.sub.8 (j-1); and either
performing additional conversions of the registers or returning (H.sub.1
(j), H.sub.2 (j), H.sub.3 (j), H.sub.4 (j), H.sub.5 (j), H.sub.6 (j),
H.sub.7 (j), H.sub.8 (j)) as the hash value of the message.