blowfish fixes

This commit is contained in:
erana 2012-01-20 17:24:15 +09:00
parent a472e6b222
commit 9cdfda6021
1 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@
;;; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(load "dictionary.scm") (load "dictionary.scm")
;; ,open records ;; ,open records tables ;; NOTE
(define BIG-ENDIAN-HOST (if (getenv "BIG_ENDIAN_HOST") (define BIG-ENDIAN-HOST (if (getenv "BIG_ENDIAN_HOST")
(getenv "BIG_ENDIAN_HOST") (getenv "BIG_ENDIAN_HOST")
#t)) ;; NOTE : Do not forget to set this ! #t)) ;; NOTE : Do not forget to set this !
@ -1143,7 +1143,7 @@
(define (blowfish-R l r i) (define (blowfish-R l r i)
(set! l (bitwise-xor l (dictionary-ref (blowfish-p blowfish-context) i))) (set! l (bitwise-xor l (dictionary-ref (blowfish-p blowfish-context) i)))
(set! r (bitwise-xor r ((dictionary-ref (blowfish-p blowfish-context) blowfish_F l))))) (set! r (bitwise-xor r ((dictionary-ref (blowfish-p blowfish-context) blowfish-F l)))))
;; blowfish-rounds == 16 -> ;; blowfish-rounds == 16 ->
(define (blowfish-encrypt bc ret_xl ret_xr) ;; NOTE bc = blowfish-context (define (blowfish-encrypt bc ret_xl ret_xr) ;; NOTE bc = blowfish-context