[crypticl-cvs] CVS crypticl/src

tskogan tskogan at common-lisp.net
Sat Jan 6 12:56:16 UTC 2007


Update of /project/crypticl/cvsroot/crypticl/src
In directory clnet:/tmp/cvs-serv7923

Modified Files:
	sha.lisp md5.lisp 
Log Message:
Renamed rotation function in preparation for SHA-256.


--- /project/crypticl/cvsroot/crypticl/src/sha.lisp	2004/11/25 21:56:53	1.4
+++ /project/crypticl/cvsroot/crypticl/src/sha.lisp	2007/01/06 12:56:16	1.5
@@ -134,7 +134,7 @@
       (setf (aref w i) (aref m i)  ) )
     (dotimes (i 64 t)
       (setf (aref w (+ i 16)) 
-	(32-left-rot (logxor (aref w (+ i 13)) (aref w (+ i 8)) 
+	(left-rot-32 (logxor (aref w (+ i 13)) (aref w (+ i 8)) 
 			     (aref w (+ i 2)) (aref w (+ i ))) 1) ))
     w))
 
@@ -144,14 +144,14 @@
   (let ((w (sha1-expand x)) 
         (temp))
     (macrolet ((sha-round (sha-function w-offset constant)
-		 `(setf temp (32-add (32-left-rot a 5)
+		 `(setf temp (32-add (left-rot-32 a 5)
 				     (,sha-function b c d)
 				     e
 				     (aref w (+ i ,w-offset))
 				     ,constant)
 			e d 
 			d c
-			c (32-left-rot b 30 )
+			c (left-rot-32 b 30 )
 			b a
 			a temp)))
    
--- /project/crypticl/cvsroot/crypticl/src/md5.lisp	2004/11/25 21:56:52	1.3
+++ /project/crypticl/cvsroot/crypticl/src/md5.lisp	2007/01/06 12:56:16	1.4
@@ -107,7 +107,7 @@
 
 (defmacro md5-function-ffgghhii (a b c d X k s i fghi)
   `(setf ,a (32-add ,b
-		    (32-left-rot (32-add (32-add ,a
+		    (left-rot-32 (32-add (32-add ,a
 						 (,fghi ,b ,c ,d))
 					 (32-add (aref ,X ,k)
 						 ,(aref *random-sine-table* (1- i))))




More information about the Crypticl-cvs mailing list