From 3ad0ef4e0619ef60eeb8bad95ba2ba672efc1a3b Mon Sep 17 00:00:00 2001 From: erana Date: Fri, 20 Jan 2012 20:28:29 +0900 Subject: [PATCH] blowfish fixes - 17 --- scsh/encryption/blowfish.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scsh/encryption/blowfish.scm b/scsh/encryption/blowfish.scm index 5f8178d..28b0ef1 100644 --- a/scsh/encryption/blowfish.scm +++ b/scsh/encryption/blowfish.scm @@ -1202,11 +1202,12 @@ (define (blowfish-decrypt bc ret_xl ret_xr) ;; NOTE bc = blowfish-context (let ((xl ret_xl) (xr ret_xr) - (p (blowfish-p bc)) - (s0 (blowfish-s0 bc)) - (s1 (blowfish-s1 bc)) - (s2 (blowfish-s2 bc)) - (s3 (blowfish-s3 bc))) +;; (p (blowfish-p bc)) +;; (s0 (blowfish-s0 bc)) +;; (s1 (blowfish-s1 bc)) +;; (s2 (blowfish-s2 bc)) +;; (s3 (blowfish-s3 bc)) + ) (blowfish-R xl xr 17) (blowfish-R xr xl 16) @@ -1225,8 +1226,8 @@ (blowfish-R xl xr 3) (blowfish-R xr xl 2) - (let ((xl (bitwise-xor xl (vector-ref p 1))) - (xr (bitwise-xor xr (vector-ref p 0)))) + (let ((xl (bitwise-xor xl (vector-ref (blowfish-p bc) 1))) + (xr (bitwise-xor xr (vector-ref (blowfish-p bc) 0)))) (set! ret_xl xr) (set! ret_xr xl) )))