LIBGCRYPT-1-2-BRANCH libgcrypt/cipher (ChangeLog serpent.c)
cvs user mo
cvs at cvs.gnupg.org
Wed Sep 15 19:39:47 CEST 2004
Date: Wednesday, September 15, 2004 @ 20:46:34
Author: mo
Path: /cvs/libgcrypt/libgcrypt/cipher
Tag: LIBGCRYPT-1-2-BRANCH
Modified: ChangeLog serpent.c
2004-09-17 Moritz Schulte <moritz at g10code.com>
* serpent.c: Use "u32_t" instead of "unsigned long", do not
declare S-Box variables as "register". Fixes failure on
OpenBSD/sparc64, reported by Nikolay Sturm.
-----------+
ChangeLog | 6 +++++
serpent.c | 64 ++++++++++++++++++++++++++++++------------------------------
2 files changed, 38 insertions(+), 32 deletions(-)
Index: libgcrypt/cipher/ChangeLog
diff -u libgcrypt/cipher/ChangeLog:1.211.2.5 libgcrypt/cipher/ChangeLog:1.211.2.6
--- libgcrypt/cipher/ChangeLog:1.211.2.5 Wed Sep 15 16:56:22 2004
+++ libgcrypt/cipher/ChangeLog Wed Sep 15 20:46:34 2004
@@ -1,3 +1,9 @@
+2004-09-17 Moritz Schulte <moritz at g10code.com>
+
+ * serpent.c: Use "u32_t" instead of "unsigned long", do not
+ declare S-Box variables as "register". Fixes failure on
+ OpenBSD/sparc64, reported by Nikolay Sturm.
+
2004-09-16 Moritz Schulte <moritz at g10code.com>
* pubkey.c (pubkey_table): Added an alias entry for GCRY_PK_ELG_E;
Index: libgcrypt/cipher/serpent.c
diff -u libgcrypt/cipher/serpent.c:1.4 libgcrypt/cipher/serpent.c:1.4.2.1
--- libgcrypt/cipher/serpent.c:1.4 Thu Dec 11 16:46:12 2003
+++ libgcrypt/cipher/serpent.c Wed Sep 15 20:46:34 2004
@@ -78,8 +78,8 @@
#define SBOX0(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t05, t06, t07, t08, t09; \
- register unsigned long t11, t12, t13, t14, t15, t17, t01; \
+ u32_t t02, t03, t05, t06, t07, t08, t09; \
+ u32_t t11, t12, t13, t14, t15, t17, t01; \
t01 = b ^ c ; \
t02 = a | d ; \
t03 = a ^ b ; \
@@ -102,8 +102,8 @@
#define SBOX0_INVERSE(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t06, t08, t09, t10; \
- register unsigned long t12, t13, t14, t15, t17, t18, t01; \
+ u32_t t02, t03, t04, t05, t06, t08, t09, t10; \
+ u32_t t12, t13, t14, t15, t17, t18, t01; \
t01 = c ^ d ; \
t02 = a | b ; \
t03 = b | c ; \
@@ -127,8 +127,8 @@
#define SBOX1(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t06, t07, t08; \
- register unsigned long t10, t11, t12, t13, t16, t17, t01; \
+ u32_t t02, t03, t04, t05, t06, t07, t08; \
+ u32_t t10, t11, t12, t13, t16, t17, t01; \
t01 = a | d ; \
t02 = c ^ d ; \
t03 = ~ b ; \
@@ -151,8 +151,8 @@
#define SBOX1_INVERSE(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t06, t07, t08; \
- register unsigned long t09, t10, t11, t14, t15, t17, t01; \
+ u32_t t02, t03, t04, t05, t06, t07, t08; \
+ u32_t t09, t10, t11, t14, t15, t17, t01; \
t01 = a ^ b ; \
t02 = b | d ; \
t03 = a & c ; \
@@ -175,8 +175,8 @@
#define SBOX2(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t05, t06, t07, t08; \
- register unsigned long t09, t10, t12, t13, t14, t01; \
+ u32_t t02, t03, t05, t06, t07, t08; \
+ u32_t t09, t10, t12, t13, t14, t01; \
t01 = a | c ; \
t02 = a ^ b ; \
t03 = d ^ t01; \
@@ -197,8 +197,8 @@
#define SBOX2_INVERSE(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t06, t07, t08, t09; \
- register unsigned long t10, t11, t12, t15, t16, t17, t01; \
+ u32_t t02, t03, t04, t06, t07, t08, t09; \
+ u32_t t10, t11, t12, t15, t16, t17, t01; \
t01 = a ^ d ; \
t02 = c ^ d ; \
t03 = a & c ; \
@@ -221,8 +221,8 @@
#define SBOX3(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t06, t07, t08; \
- register unsigned long t09, t10, t11, t13, t14, t15, t01; \
+ u32_t t02, t03, t04, t05, t06, t07, t08; \
+ u32_t t09, t10, t11, t13, t14, t15, t01; \
t01 = a ^ c ; \
t02 = a | d ; \
t03 = a & d ; \
@@ -245,8 +245,8 @@
#define SBOX3_INVERSE(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t06, t07, t09; \
- register unsigned long t11, t12, t13, t14, t16, t01; \
+ u32_t t02, t03, t04, t05, t06, t07, t09; \
+ u32_t t11, t12, t13, t14, t16, t01; \
t01 = c | d ; \
t02 = a | d ; \
t03 = c ^ t02; \
@@ -268,8 +268,8 @@
#define SBOX4(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t06, t08, t09; \
- register unsigned long t10, t11, t12, t13, t14, t15, t16, t01; \
+ u32_t t02, t03, t04, t05, t06, t08, t09; \
+ u32_t t10, t11, t12, t13, t14, t15, t16, t01; \
t01 = a | b ; \
t02 = b | c ; \
t03 = a ^ t02; \
@@ -293,8 +293,8 @@
#define SBOX4_INVERSE(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t06, t07, t09; \
- register unsigned long t10, t11, t12, t13, t15, t01; \
+ u32_t t02, t03, t04, t05, t06, t07, t09; \
+ u32_t t10, t11, t12, t13, t15, t01; \
t01 = b | d ; \
t02 = c | d ; \
t03 = a & t01; \
@@ -316,8 +316,8 @@
#define SBOX5(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t07, t08, t09; \
- register unsigned long t10, t11, t12, t13, t14, t01; \
+ u32_t t02, t03, t04, t05, t07, t08, t09; \
+ u32_t t10, t11, t12, t13, t14, t01; \
t01 = b ^ d ; \
t02 = b | d ; \
t03 = a & t01; \
@@ -339,8 +339,8 @@
#define SBOX5_INVERSE(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t07, t08, t09; \
- register unsigned long t10, t12, t13, t15, t16, t01; \
+ u32_t t02, t03, t04, t05, t07, t08, t09; \
+ u32_t t10, t12, t13, t15, t16, t01; \
t01 = a & d ; \
t02 = c ^ t01; \
t03 = a ^ d ; \
@@ -362,8 +362,8 @@
#define SBOX6(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t07, t08, t09, t10; \
- register unsigned long t11, t12, t13, t15, t17, t18, t01; \
+ u32_t t02, t03, t04, t05, t07, t08, t09, t10; \
+ u32_t t11, t12, t13, t15, t17, t18, t01; \
t01 = a & d ; \
t02 = b ^ c ; \
t03 = a ^ d ; \
@@ -387,8 +387,8 @@
#define SBOX6_INVERSE(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t06, t07, t08, t09; \
- register unsigned long t12, t13, t14, t15, t16, t17, t01; \
+ u32_t t02, t03, t04, t05, t06, t07, t08, t09; \
+ u32_t t12, t13, t14, t15, t16, t17, t01; \
t01 = a ^ c ; \
t02 = ~ c ; \
t03 = b & t01; \
@@ -412,8 +412,8 @@
#define SBOX7(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t05, t06, t08, t09, t10; \
- register unsigned long t11, t13, t14, t15, t16, t17, t01; \
+ u32_t t02, t03, t04, t05, t06, t08, t09, t10; \
+ u32_t t11, t13, t14, t15, t16, t17, t01; \
t01 = a & c ; \
t02 = ~ d ; \
t03 = a & t02; \
@@ -437,8 +437,8 @@
#define SBOX7_INVERSE(a, b, c, d, w, x, y, z) \
{ \
- register unsigned long t02, t03, t04, t06, t07, t08, t09; \
- register unsigned long t10, t11, t13, t14, t15, t16, t01; \
+ u32_t t02, t03, t04, t06, t07, t08, t09; \
+ u32_t t10, t11, t13, t14, t15, t16, t01; \
t01 = a & b ; \
t02 = a | b ; \
t03 = c | t01; \
More information about the Gnupg-commits
mailing list