From ac702302f540904759f7215a211b6328190621be Mon Sep 17 00:00:00 2001 From: erana Date: Fri, 20 Jan 2012 20:49:34 +0900 Subject: [PATCH] blowfish fixes - 22 --- scsh/encryption/blowfish.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scsh/encryption/blowfish.scm b/scsh/encryption/blowfish.scm index 24bd61d..be7d1ce 100644 --- a/scsh/encryption/blowfish.scm +++ b/scsh/encryption/blowfish.scm @@ -1152,11 +1152,11 @@ (+ (vector-ref (blowfish-s2 blowfish-context) 2) (vector-ref (blowfish-s3 blowfish-context) 3)))) (define (blowfish-F-le x) - (bitwise-xor (+ (vector-ref (blowfish-s0 blowfish-context) 3) - (vector-ref (blowfish-s1 blowfish-context) 2)) - (+ (vector-ref (blowfish-s2 blowfish-context) 1) - (vector-ref (blowfish-s3 blowfish-context) 0)))) -(define blowfish-F (if BIG-ENDIAN-HOST blowfish-F-be blowfish-F-le)) ;; FIXME default is big endian + (bitwise-xor (+ (dictionary-ref-with-index (blowfish-s0 blowfish-context) 3) + (dictionary-ref-with-index (blowfish-s1 blowfish-context) 2)) + (+ (dictionary-ref (blowfish-s2 blowfish-context) 1) + (dictionary-ref (blowfish-s3 blowfish-context) 0)))) +(define blowfish-F (if BIG-ENDIAN-HOST blowfish-F-le blowfish-F-be)) ;; FIXME2 default is big endian (define (blowfish-R bc l r i) (set! l (bitwise-xor l (dictionary-ref (blowfish-p bc) i)))