From 1c5f871b492f0b28d053f45881faba2f24d9c077 Mon Sep 17 00:00:00 2001 From: jbj Date: Thu, 29 May 2003 16:07:35 +0000 Subject: [PATCH] Yet another beecrypt-3.0.0 merge. CVS patchset: 6878 CVS date: 2003/05/29 16:07:35 --- beecrypt/acinclude.m4 | 2 ++ beecrypt/blockmode.c | 9 +++++---- beecrypt/configure.ac | 32 ++++++++++++++++---------------- beecrypt/gas/ia64.m4 | 5 +++-- beecrypt/gas/mpopt.alpha.m4 | 14 +++++++------- beecrypt/python/test/Makefile.am | 2 +- 6 files changed, 34 insertions(+), 30 deletions(-) diff --git a/beecrypt/acinclude.m4 b/beecrypt/acinclude.m4 index 77fd92d..ae46b17 100644 --- a/beecrypt/acinclude.m4 +++ b/beecrypt/acinclude.m4 @@ -568,6 +568,8 @@ AC_DEFUN(BEECRYPT_ASM_ALIGN,[ bc_cv_asm_align=".align 4" ;; ia64) bc_cv_asm_align=".align 16" ;; + powerpc*) + bc_cv_asm_align=".align 2" ;; s390x) bc_cv_asm_align=".align 4" ;; sparc*) diff --git a/beecrypt/blockmode.c b/beecrypt/blockmode.c index f9967c0..78cb2a9 100644 --- a/beecrypt/blockmode.c +++ b/beecrypt/blockmode.c @@ -84,7 +84,6 @@ int blockEncryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, (void) bc->encrypt(bp, dst, dst); /*@=noeffectuncon@*/ - dst += blockwords; src += blockwords; nblocks--; @@ -93,20 +92,22 @@ int blockEncryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, while (nblocks > 0) { for (i = 0; i < blockwords; i++) - dst[i] = src[i] ^ dst[i-blockwords]; + dst[i+blockwords] = src[i] ^ dst[i]; + dst += blockwords; /*@-noeffectuncon@*/ (void) bc->encrypt(bp, dst, dst); /*@=noeffectuncon@*/ - dst += blockwords; src += blockwords; nblocks--; } + dst -= blockwords; + for (i = 0; i < blockwords; i++) - fdback[i] = dst[i-blockwords]; + fdback[i] = dst[i]; /*@=usedef@*/ } return 0; diff --git a/beecrypt/configure.ac b/beecrypt/configure.ac index dda6b30..555ac65 100644 --- a/beecrypt/configure.ac +++ b/beecrypt/configure.ac @@ -166,13 +166,13 @@ AC_ARG_WITH(mtmalloc,[ --with-mtmalloc links against the mtmalloc libra fi ],[ac_with_mtmalloc=no]) -AC_ARG_WITH(javaglue,[ --with-javaglue creates the java glue code [default=no]],[ +AC_ARG_WITH(java,[ --with-java creates the java glue code [default=no]],[ if test "$withval" = no; then - ac_with_javaglue=no + ac_with_java=no else - ac_with_javaglue=yes + ac_with_java=yes fi - ],[ac_with_javaglue=no]) + ],[ac_with_java=no]) AC_ARG_WITH(python,[ --with-python creates the python bindings code [default=no]],[ if test "$withval" = no; then @@ -433,7 +433,7 @@ fi # Predefines and checks for Java API support AH_TEMPLATE([JAVAGLUE],[Define to 1 if you want to include the Java code]) -if test "$ac_with_javaglue" = yes ; then +if test "$ac_with_java" = yes ; then AC_CHECK_PROG(ac_cv_have_gcj, gcj, yes, no) if test "$ac_cv_have_gcj" = yes; then AC_CACHE_CHECK([for java native interface headers], ac_cv_java_include, [ @@ -458,10 +458,10 @@ EOF ac_cv_java_include="$ac_cv_java_include -I$gcjpath/include" fi else - AC_MSG_WARN([java headers not found, disabling javaglue]) + AC_MSG_WARN([java headers not found, disabling java]) ac_cv_java_headers=no ac_cv_java_include= - ac_with_javaglue=no + ac_with_java=no fi rm -fr conftest* ]) @@ -512,29 +512,29 @@ EOF ac_cv_java_include="-I$java_include" ;; esac else - AC_MSG_WARN([java headers not found, disabling javaglue]) + AC_MSG_WARN([java headers not found, disabling java]) ac_cv_java_headers=no ac_cv_java_include= - ac_with_javaglue=no + ac_with_java=no fi fi rm -fr conftest* ]) else - AC_MSG_WARN([javac not found, disabling javaglue]) + AC_MSG_WARN([javac not found, disabling java]) ac_cv_java_headers=no ac_cv_java_include= - ac_with_javaglue=no + ac_with_java=no fi else - AC_MSG_WARN([java not found, disabling javaglue]) + AC_MSG_WARN([java not found, disabling java]) ac_cv_java_headers=no - ac_with_javaglue=no + ac_with_java=no fi fi fi -if test "$ac_with_javaglue" = yes ; then +if test "$ac_with_java" = yes ; then AC_DEFINE([JAVAGLUE],1) fi @@ -696,13 +696,13 @@ fi BEECRYPT_INT_TYPES BEECRYPT_CPU_BITS -if test "$ac_with_javaglue" = yes ; then +if test "$ac_with_java" = yes ; then CFLAGS="$CFLAGS $ac_cv_java_include" fi MAYBE_OPT= -if test "$ac_with_javaglue" = yes; then +if test "$ac_with_java" = yes; then MAYBE_OPT="$MAYBE_OPT java" fi diff --git a/beecrypt/gas/ia64.m4 b/beecrypt/gas/ia64.m4 index 51d27a8..be857de 100644 --- a/beecrypt/gas/ia64.m4 +++ b/beecrypt/gas/ia64.m4 @@ -19,8 +19,9 @@ dnl License along with this library; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -define(`saved_pfs',`r14') -define(`saved_lc',`r15') +define(`saved_pfs',`r31') +define(`saved_lc',`r30') +define(`saved_pr',`r29') ifelse(substr(ASM_OS,0,5),linux,` undefine(`C_FUNCTION_BEGIN') diff --git a/beecrypt/gas/mpopt.alpha.m4 b/beecrypt/gas/mpopt.alpha.m4 index 55d4b52..c4001ea 100644 --- a/beecrypt/gas/mpopt.alpha.m4 +++ b/beecrypt/gas/mpopt.alpha.m4 @@ -27,7 +27,7 @@ C_FUNCTION_BEGIN(mpadd) s8addq `$'16,0,`$'1 addq `$'17,`$'1,`$'17 addq `$'18,`$'1,`$'18 - mov `$31',`$'0 + clr `$'0 .align 4 LOCAL(mpadd_loop): @@ -52,7 +52,7 @@ C_FUNCTION_BEGIN(mpsub) s8addq `$'16,0,`$'1 addq `$'17,`$'1,`$'17 addq `$'18,`$'1,`$'18 - mov `$31',`$'0 + clr `$'0 .align 4 LOCAL(mpsub_loop): @@ -77,7 +77,7 @@ C_FUNCTION_BEGIN(mpsetmul) s8addq `$'16,0,`$'1 addq `$'17,`$'1,`$'17 addq `$'18,`$'1,`$'18 - mov `$31',`$'0 + clr `$'0 .align 4 LOCAL(mpsetmul_loop): @@ -101,7 +101,7 @@ C_FUNCTION_BEGIN(mpaddmul) s8addq `$'16,0,`$'1 addq `$'17,`$'1,`$'17 addq `$'18,`$'1,`$'18 - mov `$31',`$'0 + clr `$'0 .align 4 LOCAL(mpaddmul_loop): @@ -128,9 +128,9 @@ C_FUNCTION_BEGIN(mpaddsqrtrc) subq `$'16,1,`$'16 s8addq `$'16,0,`$'1 addq `$'17,`$'1,`$'17 - addq `$'17,`$'1,`$'17 addq `$'18,`$'1,`$'18 - mov `$31',`$'0 + addq `$'17,`$'1,`$'17 + clr `$'0 .align 4 LOCAL(mpaddsqrtrc_loop): @@ -154,6 +154,6 @@ LOCAL(mpaddsqrtrc_loop): subq `$'16,1,`$'16 subq `$'17,16,`$'17 subq `$'18,8,`$'18 - bge `$'16,LOCAL(mpaddmul_loop) + bge `$'16,LOCAL(mpaddsqrtrc_loop) ret `$'31,(`$'26),1 C_FUNCTION_END(mpaddsqrtrc) diff --git a/beecrypt/python/test/Makefile.am b/beecrypt/python/test/Makefile.am index b2c978a..7710090 100644 --- a/beecrypt/python/test/Makefile.am +++ b/beecrypt/python/test/Makefile.am @@ -14,4 +14,4 @@ EXTRA_DIST = \ all: check: - $(VALGRIND) python test_all.py verbose + env PYTHONPATH=.. $(VALGRIND) python test_all.py verbose -- 2.7.4