projects
/
u
/
mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
eb31b00
)
Miscellaneous constification.
author
mdw
<mdw>
Fri, 2 Apr 2004 01:03:49 +0000
(
01:03
+0000)
committer
mdw
<mdw>
Fri, 2 Apr 2004 01:03:49 +0000
(
01:03
+0000)
29 files changed:
blkc.h
patch
|
blob
|
blame
|
history
blowfish.c
patch
|
blob
|
blame
|
history
cast-base.h
patch
|
blob
|
blame
|
history
cast-s.c
patch
|
blob
|
blame
|
history
cast-sk.c
patch
|
blob
|
blame
|
history
cbc-def.h
patch
|
blob
|
blame
|
history
cfb-def.h
patch
|
blob
|
blame
|
history
counter-def.h
patch
|
blob
|
blame
|
history
des-base.c
patch
|
blob
|
blame
|
history
des-base.h
patch
|
blob
|
blame
|
history
desx.c
patch
|
blob
|
blame
|
history
ec-test.c
patch
|
blob
|
blame
|
history
f-binpoly.c
patch
|
blob
|
blame
|
history
f-niceprime.c
patch
|
blob
|
blame
|
history
f-prime.c
patch
|
blob
|
blame
|
history
genprimes.c
patch
|
blob
|
blame
|
history
gfshare.c
patch
|
blob
|
blame
|
history
gfx-sqr.c
patch
|
blob
|
blame
|
history
key-flags.c
patch
|
blob
|
blame
|
history
lmem.c
patch
|
blob
|
blame
|
history
md2.c
patch
|
blob
|
blame
|
history
noise.c
patch
|
blob
|
blame
|
history
noise.h
patch
|
blob
|
blame
|
history
ofb-def.h
patch
|
blob
|
blame
|
history
rabin.c
patch
|
blob
|
blame
|
history
rho.c
patch
|
blob
|
blame
|
history
rho.h
patch
|
blob
|
blame
|
history
skipjack.c
patch
|
blob
|
blame
|
history
twofish.c
patch
|
blob
|
blame
|
history
diff --git
a/blkc.h
b/blkc.h
index
54f883d
..
5a7d3ec
100644
(file)
--- a/
blkc.h
+++ b/
blkc.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: blkc.h,v 1.
5 2001/05/07 17:28:42
mdw Exp $
+ * $Id: blkc.h,v 1.
6 2004/04/02 01:03:49
mdw Exp $
*
* Common definitions for block ciphers
*
*
* Common definitions for block ciphers
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: blkc.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: blkc.h,v $
+ * Revision 1.6 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.5 2001/05/07 17:28:42 mdw
* Support block ciphers with larger blocks.
*
* Revision 1.5 2001/05/07 17:28:42 mdw
* Support block ciphers with larger blocks.
*
@@
-330,7
+333,7
@@
static int pre##_verify(dstr *v) \
\
BLKC_VERIFY(PRE, pre) \
\
\
BLKC_VERIFY(PRE, pre) \
\
-static
test_chunk defs[] = {
\
+static
const test_chunk defs[] = {
\
{ #pre, pre##_verify, { &type_hex, &type_hex, &type_hex, 0 } }, \
{ 0, 0, { 0 } } \
}; \
{ #pre, pre##_verify, { &type_hex, &type_hex, &type_hex, 0 } }, \
{ 0, 0, { 0 } } \
}; \
diff --git
a/blowfish.c
b/blowfish.c
index
2821a45
..
c57ebb2
100644
(file)
--- a/
blowfish.c
+++ b/
blowfish.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: blowfish.c,v 1.
2 2000/06/17 10:47:56
mdw Exp $
+ * $Id: blowfish.c,v 1.
3 2004/04/02 01:03:49
mdw Exp $
*
* The Blowfish block cipher
*
*
* The Blowfish block cipher
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: blowfish.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: blowfish.c,v $
+ * Revision 1.3 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.2 2000/06/17 10:47:56 mdw
* Tidy round function a little. Support new key size interface.
*
* Revision 1.2 2000/06/17 10:47:56 mdw
* Tidy round function a little. Support new key size interface.
*
@@
-50,7
+53,7
@@
/*----- Global variables --------------------------------------------------*/
/*----- Global variables --------------------------------------------------*/
-static blowfish_ctx ikey = BLOWFISH_IKEY;
+static
const
blowfish_ctx ikey = BLOWFISH_IKEY;
const octet blowfish_keysz[] = { KSZ_RANGE, BLOWFISH_KEYSZ, 1, 56, 1 };
const octet blowfish_keysz[] = { KSZ_RANGE, BLOWFISH_KEYSZ, 1, 56, 1 };
diff --git
a/cast-base.h
b/cast-base.h
index
841f221
..
387b95a
100644
(file)
--- a/
cast-base.h
+++ b/
cast-base.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: cast-base.h,v 1.
1 2000/06/17 10:48:2
9 mdw Exp $
+ * $Id: cast-base.h,v 1.
2 2004/04/02 01:03:4
9 mdw Exp $
*
* Basic macros and definitions for CAST-128 and CAST-256
*
*
* Basic macros and definitions for CAST-128 and CAST-256
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: cast-base.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: cast-base.h,v $
+ * Revision 1.2 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.1 2000/06/17 10:48:29 mdw
* CAST round function macros.
*
* Revision 1.1 2000/06/17 10:48:29 mdw
* CAST round function macros.
*
@@
-64,7
+67,7
@@
/*----- Global variables --------------------------------------------------*/
/*----- Global variables --------------------------------------------------*/
-extern uint32 cast_s[4][256], cast_sk[4][256];
+extern
const
uint32 cast_s[4][256], cast_sk[4][256];
/*----- That's all, folks -------------------------------------------------*/
/*----- That's all, folks -------------------------------------------------*/
diff --git
a/cast-s.c
b/cast-s.c
index
040d538
..
2bd3e28
100644
(file)
--- a/
cast-s.c
+++ b/
cast-s.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: cast-s.c,v 1.
1 2000/06/17 10:48:52
mdw Exp $
+ * $Id: cast-s.c,v 1.
2 2004/04/02 01:03:49
mdw Exp $
*
* Basic S-boxes for CAST-128 and CAST-256
*
*
* Basic S-boxes for CAST-128 and CAST-256
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: cast-s.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: cast-s.c,v $
+ * Revision 1.2 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.1 2000/06/17 10:48:52 mdw
* CAST S-boxes.
*
* Revision 1.1 2000/06/17 10:48:52 mdw
* CAST S-boxes.
*
@@
-44,6
+47,6
@@
/*----- Global variables --------------------------------------------------*/
/*----- Global variables --------------------------------------------------*/
-uint32 cast_s[4][256] = CAST_S;
+
const
uint32 cast_s[4][256] = CAST_S;
/*----- That's all, folks -------------------------------------------------*/
/*----- That's all, folks -------------------------------------------------*/
diff --git
a/cast-sk.c
b/cast-sk.c
index
db8310a
..
98174a3
100644
(file)
--- a/
cast-sk.c
+++ b/
cast-sk.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: cast-sk.c,v 1.
1 2000/06/17 10:48:52
mdw Exp $
+ * $Id: cast-sk.c,v 1.
2 2004/04/02 01:03:49
mdw Exp $
*
* Key-schedule S-boxes for CAST-128
*
*
* Key-schedule S-boxes for CAST-128
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: cast-sk.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: cast-sk.c,v $
+ * Revision 1.2 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.1 2000/06/17 10:48:52 mdw
* CAST S-boxes.
*
* Revision 1.1 2000/06/17 10:48:52 mdw
* CAST S-boxes.
*
@@
-44,6
+47,6
@@
/*----- Global variables --------------------------------------------------*/
/*----- Global variables --------------------------------------------------*/
-uint32 cast_sk[4][256] = CAST_SK;
+
const
uint32 cast_sk[4][256] = CAST_SK;
/*----- That's all, folks -------------------------------------------------*/
/*----- That's all, folks -------------------------------------------------*/
diff --git
a/cbc-def.h
b/cbc-def.h
index
1be3549
..
5b89ab1
100644
(file)
--- a/
cbc-def.h
+++ b/
cbc-def.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: cbc-def.h,v 1.
3 2001/06/17 00:10:51
mdw Exp $
+ * $Id: cbc-def.h,v 1.
4 2004/04/02 01:03:49
mdw Exp $
*
* Definitions for cipher block chaining mode
*
*
* Definitions for cipher block chaining mode
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: cbc-def.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: cbc-def.h,v $
+ * Revision 1.4 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.3 2001/06/17 00:10:51 mdw
* Typesetting fixes
*
* Revision 1.3 2001/06/17 00:10:51 mdw
* Typesetting fixes
*
@@
-148,7
+151,7
@@
void pre##_cbcinit(pre##_cbcctx *ctx, \
const void *key, size_t sz, \
const void *iv) \
{ \
const void *key, size_t sz, \
const void *iv) \
{ \
- static
octet zero[PRE##_BLKSZ] = { 0 };
\
+ static
const octet zero[PRE##_BLKSZ] = { 0 };
\
pre##_init(&ctx->ctx, key, sz); \
BLKC_LOAD(PRE, ctx->iv, iv ? iv : zero); \
} \
pre##_init(&ctx->ctx, key, sz); \
BLKC_LOAD(PRE, ctx->iv, iv ? iv : zero); \
} \
diff --git
a/cfb-def.h
b/cfb-def.h
index
51ab9e7
..
1d983f3
100644
(file)
--- a/
cfb-def.h
+++ b/
cfb-def.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: cfb-def.h,v 1.
3 2001/06/17 00:10:51
mdw Exp $
+ * $Id: cfb-def.h,v 1.
4 2004/04/02 01:03:49
mdw Exp $
*
* Definitions for ciphertext feedback mode
*
*
* Definitions for ciphertext feedback mode
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: cfb-def.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: cfb-def.h,v $
+ * Revision 1.4 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.3 2001/06/17 00:10:51 mdw
* Typesetting fixes
*
* Revision 1.3 2001/06/17 00:10:51 mdw
* Typesetting fixes
*
@@
-180,7
+183,7
@@
void pre##_cfbinit(pre##_cfbctx *ctx, \
const void *key, size_t sz, \
const void *iv) \
{ \
const void *key, size_t sz, \
const void *iv) \
{ \
- static
octet zero[PRE##_BLKSZ] = { 0 };
\
+ static
const octet zero[PRE##_BLKSZ] = { 0 };
\
pre##_init(&ctx->ctx, key, sz); \
pre##_cfbsetiv(ctx, iv ? iv : zero); \
} \
pre##_init(&ctx->ctx, key, sz); \
pre##_cfbsetiv(ctx, iv ? iv : zero); \
} \
diff --git
a/counter-def.h
b/counter-def.h
index
e0336a4
..
e9ee952
100644
(file)
--- a/
counter-def.h
+++ b/
counter-def.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: counter-def.h,v 1.
2 2001/06/17 00:10:51
mdw Exp $
+ * $Id: counter-def.h,v 1.
3 2004/04/02 01:03:49
mdw Exp $
*
* Block cipher counter mode (or long cycle mode)
*
*
* Block cipher counter mode (or long cycle mode)
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: counter-def.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: counter-def.h,v $
+ * Revision 1.3 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.2 2001/06/17 00:10:51 mdw
* Typesetting fixes
*
* Revision 1.2 2001/06/17 00:10:51 mdw
* Typesetting fixes
*
@@
-166,7
+169,7
@@
void pre##_counterinit(pre##_counterctx *ctx, \
const void *key, size_t sz, \
const void *iv) \
{ \
const void *key, size_t sz, \
const void *iv) \
{ \
- static
octet zero[PRE##_BLKSZ] = { 0 };
\
+ static
const octet zero[PRE##_BLKSZ] = { 0 };
\
pre##_init(&ctx->ctx, key, sz); \
pre##_countersetiv(ctx, iv ? iv : zero); \
} \
pre##_init(&ctx->ctx, key, sz); \
pre##_countersetiv(ctx, iv ? iv : zero); \
} \
diff --git
a/des-base.c
b/des-base.c
index
f91628e
..
c42d03c
100644
(file)
--- a/
des-base.c
+++ b/
des-base.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: des-base.c,v 1.
2 2000/06/17 10:52:01
mdw Exp $
+ * $Id: des-base.c,v 1.
3 2004/04/02 01:03:49
mdw Exp $
*
* Common features for DES implementation
*
*
* Common features for DES implementation
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: des-base.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: des-base.c,v $
+ * Revision 1.3 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.2 2000/06/17 10:52:01 mdw
* Change name for S-box header file.
*
* Revision 1.2 2000/06/17 10:52:01 mdw
* Change name for S-box header file.
*
@@
-47,6
+50,6
@@
/*----- Global variables --------------------------------------------------*/
/*----- Global variables --------------------------------------------------*/
-uint32 des_sp[8][64] = DES_SP;
+
const
uint32 des_sp[8][64] = DES_SP;
/*----- That's all, folks -------------------------------------------------*/
/*----- That's all, folks -------------------------------------------------*/
diff --git
a/des-base.h
b/des-base.h
index
db3391f
..
2f06754
100644
(file)
--- a/
des-base.h
+++ b/
des-base.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: des-base.h,v 1.
2 1999/12/10 23:29:48
mdw Exp $
+ * $Id: des-base.h,v 1.
3 2004/04/02 01:03:49
mdw Exp $
*
* Common features for DES implementation
*
*
* Common features for DES implementation
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: des-base.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: des-base.h,v $
+ * Revision 1.3 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.2 1999/12/10 23:29:48 mdw
* Change header file guard names.
*
* Revision 1.2 1999/12/10 23:29:48 mdw
* Change header file guard names.
*
@@
-51,7
+54,7
@@
/*----- External data -----------------------------------------------------*/
/*----- External data -----------------------------------------------------*/
-extern uint32 des_sp[8][64];
+extern
const
uint32 des_sp[8][64];
/*----- Macros ------------------------------------------------------------*/
/*----- Macros ------------------------------------------------------------*/
diff --git
a/desx.c
b/desx.c
index
2d325b4
..
060815d
100644
(file)
--- a/
desx.c
+++ b/
desx.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: desx.c,v 1.
1 2001/04/03 19:36:50
mdw Exp $
+ * $Id: desx.c,v 1.
2 2004/04/02 01:03:49
mdw Exp $
*
* Implementation of DESX
*
*
* Implementation of DESX
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: desx.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: desx.c,v $
+ * Revision 1.2 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.1 2001/04/03 19:36:50 mdw
* New block cipher DESX added.
*
* Revision 1.1 2001/04/03 19:36:50 mdw
* New block cipher DESX added.
*
@@
-53,7
+56,7
@@
/*----- Tables ------------------------------------------------------------*/
/*----- Tables ------------------------------------------------------------*/
-static octet s[256] = DESX_S;
+static
const
octet s[256] = DESX_S;
/*----- Global variables --------------------------------------------------*/
/*----- Global variables --------------------------------------------------*/
diff --git
a/ec-test.c
b/ec-test.c
index
1307e32
..
de01ad8
100644
(file)
--- a/
ec-test.c
+++ b/
ec-test.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: ec-test.c,v 1.
4 2004/04/01 12:50:0
9 mdw Exp $
+ * $Id: ec-test.c,v 1.
5 2004/04/02 01:03:4
9 mdw Exp $
*
* Code for testing elliptic-curve stuff
*
*
* Code for testing elliptic-curve stuff
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: ec-test.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: ec-test.c,v $
+ * Revision 1.5 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.4 2004/04/01 12:50:09 mdw
* Add cyclic group abstraction, with test code. Separate off exponentation
* functions for better static linking. Fix a buttload of bugs on the way.
* Revision 1.4 2004/04/01 12:50:09 mdw
* Add cyclic group abstraction, with test code. Separate off exponentation
* functions for better static linking. Fix a buttload of bugs on the way.
@@
-123,7
+126,7
@@
static int ecSAMEP(ec_curve *cc, ec_curve *dd)
return (ec_samep(c->real, d->real));
}
return (ec_samep(c->real, d->real));
}
-static ec_ops ecops = {
+static
const
ec_ops ecops = {
ecDESTROY, ecSAMEP, ecIN, ecOUT, ecFIX,
ecFIND, ecNEG, ecADD, ecSUB, ecDBL, ecCHECK
};
ecDESTROY, ecSAMEP, ecIN, ecOUT, ecFIX,
ecFIND, ecNEG, ecADD, ecSUB, ecDBL, ecCHECK
};
@@
-173,7
+176,7
@@
static void ecvdump(dstr *d, FILE *fp)
fprintf(fp, "%s", ec_name(v));
}
fprintf(fp, "%s", ec_name(v));
}
-test_type type_ecurve = { ecvcvt, ecvdump };
+
const
test_type type_ecurve = { ecvcvt, ecvdump };
static void eccvt(const char *p, dstr *d)
{
static void eccvt(const char *p, dstr *d)
{
diff --git
a/f-binpoly.c
b/f-binpoly.c
index
45e1449
..
9c09356
100644
(file)
--- a/
f-binpoly.c
+++ b/
f-binpoly.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: f-binpoly.c,v 1.
7 2004/04/01 21:28:41
mdw Exp $
+ * $Id: f-binpoly.c,v 1.
8 2004/04/02 01:03:49
mdw Exp $
*
* Binary fields with polynomial basis representation
*
*
* Binary fields with polynomial basis representation
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: f-binpoly.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: f-binpoly.c,v $
+ * Revision 1.8 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.7 2004/04/01 21:28:41 mdw
* Normal basis support (translates to poly basis internally). Rewrite
* EC and prime group table generators in awk, so that they can reuse data
* Revision 1.7 2004/04/01 21:28:41 mdw
* Normal basis support (translates to poly basis internally). Rewrite
* EC and prime group table generators in awk, so that they can reuse data
@@
-112,7
+115,7
@@
static mp *fquadsolve(field *ff, mp *d, mp *x)
/* --- Field operations table --- */
/* --- Field operations table --- */
-static field_ops fops = {
+static
const
field_ops fops = {
FTY_BINARY, "binpoly",
fdestroy, frand, field_stdsamep,
freduce, field_id,
FTY_BINARY, "binpoly",
fdestroy, frand, field_stdsamep,
freduce, field_id,
@@
-171,7
+174,7
@@
static mp *fnout(field *ff, mp *d, mp *x)
/* --- Field operations table --- */
/* --- Field operations table --- */
-static field_ops fnops = {
+static
const
field_ops fnops = {
FTY_BINARY, "binnorm",
fndestroy, frand, fnsamep,
fnin, fnout,
FTY_BINARY, "binnorm",
fndestroy, frand, fnsamep,
fnin, fnout,
diff --git
a/f-niceprime.c
b/f-niceprime.c
index
2a51352
..
8f0b43d
100644
(file)
--- a/
f-niceprime.c
+++ b/
f-niceprime.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: f-niceprime.c,v 1.
4 2004/04/01 21:28:41
mdw Exp $
+ * $Id: f-niceprime.c,v 1.
5 2004/04/02 01:03:49
mdw Exp $
*
* Prime fields with efficient reduction for special-form primes
*
*
* Prime fields with efficient reduction for special-form primes
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: f-niceprime.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: f-niceprime.c,v $
+ * Revision 1.5 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.4 2004/04/01 21:28:41 mdw
* Normal basis support (translates to poly basis internally). Rewrite
* EC and prime group table generators in awk, so that they can reuse data
* Revision 1.4 2004/04/01 21:28:41 mdw
* Normal basis support (translates to poly basis internally). Rewrite
* EC and prime group table generators in awk, so that they can reuse data
@@
-139,7
+142,7
@@
static mp *fhlv(field *ff, mp *d, mp *x) {
/* --- Field operations table --- */
/* --- Field operations table --- */
-static field_ops fops = {
+static
const
field_ops fops = {
FTY_PRIME, "niceprime",
fdestroy, frand, field_stdsamep,
freduce, field_id,
FTY_PRIME, "niceprime",
fdestroy, frand, field_stdsamep,
freduce, field_id,
diff --git
a/f-prime.c
b/f-prime.c
index
088032b
..
66db76a
100644
(file)
--- a/
f-prime.c
+++ b/
f-prime.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: f-prime.c,v 1.
9 2004/04/01 21:28:41
mdw Exp $
+ * $Id: f-prime.c,v 1.
10 2004/04/02 01:03:49
mdw Exp $
*
* Prime fields with Montgomery arithmetic
*
*
* Prime fields with Montgomery arithmetic
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: f-prime.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: f-prime.c,v $
+ * Revision 1.10 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.9 2004/04/01 21:28:41 mdw
* Normal basis support (translates to poly basis internally). Rewrite
* EC and prime group table generators in awk, so that they can reuse data
* Revision 1.9 2004/04/01 21:28:41 mdw
* Normal basis support (translates to poly basis internally). Rewrite
* EC and prime group table generators in awk, so that they can reuse data
@@
-175,7
+178,7
@@
static mp *fhlv(field *ff, mp *d, mp *x) {
/* --- Field operations table --- */
/* --- Field operations table --- */
-static field_ops fops = {
+static
const
field_ops fops = {
FTY_PRIME, "prime",
fdestroy, frand, field_stdsamep,
fin, fout,
FTY_PRIME, "prime",
fdestroy, frand, field_stdsamep,
fin, fout,
diff --git
a/genprimes.c
b/genprimes.c
index
56e388e
..
2ee4115
100644
(file)
--- a/
genprimes.c
+++ b/
genprimes.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: genprimes.c,v 1.
5 2004/04/01 12:50:0
9 mdw Exp $
+ * $Id: genprimes.c,v 1.
6 2004/04/02 01:03:4
9 mdw Exp $
*
* Generate prime number table
*
*
* Generate prime number table
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: genprimes.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: genprimes.c,v $
+ * Revision 1.6 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.5 2004/04/01 12:50:09 mdw
* Add cyclic group abstraction, with test code. Separate off exponentation
* functions for better static linking. Fix a buttload of bugs on the way.
* Revision 1.5 2004/04/01 12:50:09 mdw
* Add cyclic group abstraction, with test code. Separate off exponentation
* functions for better static linking. Fix a buttload of bugs on the way.
@@
-167,7
+170,7
@@
int main(int argc, char *argv[])
#define MAXPRIME %uu\n\
\n\
typedef %s smallprime;\n\
#define MAXPRIME %uu\n\
\n\
typedef %s smallprime;\n\
-extern smallprime %s[];\n\
+extern
const
smallprime %s[];\n\
\n\
#endif\n\
",
\n\
#endif\n\
",
@@
-195,7
+198,7
@@
extern smallprime %s[];\n\
\n\
#include \"%s\"\n\
\n\
\n\
#include \"%s\"\n\
\n\
-%s %s[] = {",
+
const
%s %s[] = {",
header, type, name);
for (i = 0; i < DA_LEN(&p); i++) {
if (i % 8 == 0)
header, type, name);
for (i = 0; i < DA_LEN(&p); i++) {
if (i % 8 == 0)
diff --git
a/gfshare.c
b/gfshare.c
index
2bc72c6
..
841e556
100644
(file)
--- a/
gfshare.c
+++ b/
gfshare.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: gfshare.c,v 1.
7 2001/06/16 23:42:17
mdw Exp $
+ * $Id: gfshare.c,v 1.
8 2004/04/02 01:03:49
mdw Exp $
*
* Secret sharing over %$\gf{2^8}$%
*
*
* Secret sharing over %$\gf{2^8}$%
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: gfshare.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: gfshare.c,v $
+ * Revision 1.8 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.7 2001/06/16 23:42:17 mdw
* Typesetting fixes.
*
* Revision 1.7 2001/06/16 23:42:17 mdw
* Typesetting fixes.
*
@@
-73,7
+76,7
@@
/*----- Static variables --------------------------------------------------*/
/*----- Static variables --------------------------------------------------*/
-static octet gflog[] = GFSHARE_LOG, gfexp[] = GFSHARE_EXP;
+static
const
octet gflog[] = GFSHARE_LOG, gfexp[] = GFSHARE_EXP;
/*----- Main code ---------------------------------------------------------*/
/*----- Main code ---------------------------------------------------------*/
diff --git
a/gfx-sqr.c
b/gfx-sqr.c
index
19ec574
..
60e1b3c
100644
(file)
--- a/
gfx-sqr.c
+++ b/
gfx-sqr.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: gfx-sqr.c,v 1.
2 2004/03/21 22:52:06
mdw Exp $
+ * $Id: gfx-sqr.c,v 1.
3 2004/04/02 01:03:49
mdw Exp $
*
* Sqaring binary polynomials
*
*
* Sqaring binary polynomials
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: gfx-sqr.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: gfx-sqr.c,v $
+ * Revision 1.3 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.2 2004/03/21 22:52:06 mdw
* Merge and close elliptic curve branch.
*
* Revision 1.2 2004/03/21 22:52:06 mdw
* Merge and close elliptic curve branch.
*
@@
-49,7
+52,7
@@
/*----- Static variables --------------------------------------------------*/
/*----- Static variables --------------------------------------------------*/
-static uint16 tab[256] = GFX_SQRTAB;
+static
const
uint16 tab[256] = GFX_SQRTAB;
/*----- Main code ---------------------------------------------------------*/
/*----- Main code ---------------------------------------------------------*/
diff --git
a/key-flags.c
b/key-flags.c
index
b225ba1
..
d80da4f
100644
(file)
--- a/
key-flags.c
+++ b/
key-flags.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: key-flags.c,v 1.
3 2004/03/28 01:58:47
mdw Exp $
+ * $Id: key-flags.c,v 1.
4 2004/04/02 01:03:49
mdw Exp $
*
* Reading and writing key flag strings
*
*
* Reading and writing key flag strings
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: key-flags.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: key-flags.c,v $
+ * Revision 1.4 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.3 2004/03/28 01:58:47 mdw
* Generate, store and retreive elliptic curve keys.
*
* Revision 1.3 2004/03/28 01:58:47 mdw
* Generate, store and retreive elliptic curve keys.
*
@@
-66,7
+69,7
@@
typedef struct flagent {
unsigned m;
} flagent;
unsigned m;
} flagent;
-static flagent flagtab[] = {
+static
const
flagent flagtab[] = {
/* --- Encoding types --- */
/* --- Encoding types --- */
@@
-116,7
+119,7
@@
int key_readflags(const char *p, char **pp, unsigned *ff, unsigned *mm)
for (;;) {
size_t sz = strcspn(p, ",:");
for (;;) {
size_t sz = strcspn(p, ",:");
- flagent *e, *ee = 0;
+
const
flagent *e, *ee = 0;
/* --- Look up the string in the flags table --- */
/* --- Look up the string in the flags table --- */
@@
-170,7
+173,7
@@
int key_readflags(const char *p, char **pp, unsigned *ff, unsigned *mm)
void key_writeflags(unsigned f, dstr *d)
{
int del = 0;
void key_writeflags(unsigned f, dstr *d)
{
int del = 0;
- flagent *e;
+
const
flagent *e;
unsigned m = 0;
for (e = flagtab; e->name; e++) {
unsigned m = 0;
for (e = flagtab; e->name; e++) {
diff --git
a/lmem.c
b/lmem.c
index
97e3968
..
e534d4a
100644
(file)
--- a/
lmem.c
+++ b/
lmem.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: lmem.c,v 1.
4 2002/01/24 22:26:11
mdw Exp $
+ * $Id: lmem.c,v 1.
5 2004/04/02 01:03:49
mdw Exp $
*
* Locked memory allocation (Unix-specific)
*
*
* Locked memory allocation (Unix-specific)
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: lmem.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: lmem.c,v $
+ * Revision 1.5 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.4 2002/01/24 22:26:11 mdw
* Fix build failure when @mlock@ not available.
*
* Revision 1.4 2002/01/24 22:26:11 mdw
* Fix build failure when @mlock@ not available.
*
@@
-73,7
+76,7
@@
static void *aalloc(arena *a, size_t sz) { return l_alloc((lmem *)a, sz); }
static void afree(arena *a, void *p) { l_free((lmem *)a, p); }
static void apurge(arena *a) { l_purge((lmem *)a); }
static void afree(arena *a, void *p) { l_free((lmem *)a, p); }
static void apurge(arena *a) { l_purge((lmem *)a); }
-static arena_ops l_ops = { aalloc, arena_fakerealloc, afree, apurge };
+static
const
arena_ops l_ops = { aalloc, arena_fakerealloc, afree, apurge };
/*----- Main code ---------------------------------------------------------*/
/*----- Main code ---------------------------------------------------------*/
diff --git
a/md2.c
b/md2.c
index
b93a1b2
..
d374d87
100644
(file)
--- a/
md2.c
+++ b/
md2.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: md2.c,v 1.
1 2001/02/21 20:03:22
mdw Exp $
+ * $Id: md2.c,v 1.
2 2004/04/02 01:03:49
mdw Exp $
*
* The MD2 message digest function
*
*
* The MD2 message digest function
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: md2.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: md2.c,v $
+ * Revision 1.2 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.1 2001/02/21 20:03:22 mdw
* Added support for MD2 hash function.
*
* Revision 1.1 2001/02/21 20:03:22 mdw
* Added support for MD2 hash function.
*
@@
-47,7
+50,7
@@
/*----- Tables ------------------------------------------------------------*/
/*----- Tables ------------------------------------------------------------*/
-static octet s[256] = MD2_S;
+static
const
octet s[256] = MD2_S;
/*----- Main code ---------------------------------------------------------*/
/*----- Main code ---------------------------------------------------------*/
diff --git
a/noise.c
b/noise.c
index
a4648f8
..
8e5129b
100644
(file)
--- a/
noise.c
+++ b/
noise.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: noise.c,v 1.
6 2000/06/17 12:57:47
mdw Exp $
+ * $Id: noise.c,v 1.
7 2004/04/02 01:03:49
mdw Exp $
*
* Acquisition of environmental noise (Unix-specific)
*
*
* Acquisition of environmental noise (Unix-specific)
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: noise.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: noise.c,v $
+ * Revision 1.7 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.6 2000/06/17 12:57:47 mdw
* New free counter noise generator, for use if /dev/random is
* unavailable.
* Revision 1.6 2000/06/17 12:57:47 mdw
* New free counter noise generator, for use if /dev/random is
* unavailable.
@@
-85,7
+88,7
@@
/*----- Noise source definition -------------------------------------------*/
/*----- Noise source definition -------------------------------------------*/
-rand_source noise_source = { noise_acquire, noise_timer };
+
const
rand_source noise_source = { noise_acquire, noise_timer };
/*----- Static variables --------------------------------------------------*/
/*----- Static variables --------------------------------------------------*/
diff --git
a/noise.h
b/noise.h
index
3777a6f
..
9252809
100644
(file)
--- a/
noise.h
+++ b/
noise.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: noise.h,v 1.
4 2000/06/17 12:57:47
mdw Exp $
+ * $Id: noise.h,v 1.
5 2004/04/02 01:03:49
mdw Exp $
*
* Acquisition of environmental noise (Unix-specific)
*
*
* Acquisition of environmental noise (Unix-specific)
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: noise.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: noise.h,v $
+ * Revision 1.5 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.4 2000/06/17 12:57:47 mdw
* New free counter noise generator, for use if /dev/random is
* unavailable.
* Revision 1.4 2000/06/17 12:57:47 mdw
* New free counter noise generator, for use if /dev/random is
* unavailable.
@@
-62,7
+65,7
@@
/*----- Noise source definition -------------------------------------------*/
/*----- Noise source definition -------------------------------------------*/
-extern rand_source noise_source;
+extern
const
rand_source noise_source;
/*----- Magic numbers -----------------------------------------------------*/
/*----- Magic numbers -----------------------------------------------------*/
diff --git
a/ofb-def.h
b/ofb-def.h
index
9bc69e8
..
67d3a6a
100644
(file)
--- a/
ofb-def.h
+++ b/
ofb-def.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: ofb-def.h,v 1.
5 2001/06/17 00:10:51
mdw Exp $
+ * $Id: ofb-def.h,v 1.
6 2004/04/02 01:03:49
mdw Exp $
*
* Definitions for output feedback mode
*
*
* Definitions for output feedback mode
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: ofb-def.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: ofb-def.h,v $
+ * Revision 1.6 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.5 2001/06/17 00:10:51 mdw
* Typesetting fixes
*
* Revision 1.5 2001/06/17 00:10:51 mdw
* Typesetting fixes
*
@@
-182,7
+185,7
@@
void pre##_ofbinit(pre##_ofbctx *ctx, \
const void *key, size_t sz, \
const void *iv) \
{ \
const void *key, size_t sz, \
const void *iv) \
{ \
- static
octet zero[PRE##_BLKSZ] = { 0 };
\
+ static
const octet zero[PRE##_BLKSZ] = { 0 };
\
pre##_init(&ctx->ctx, key, sz); \
pre##_ofbsetiv(ctx, iv ? iv : zero); \
} \
pre##_init(&ctx->ctx, key, sz); \
pre##_ofbsetiv(ctx, iv ? iv : zero); \
} \
diff --git
a/rabin.c
b/rabin.c
index
915dc14
..
200ab0d
100644
(file)
--- a/
rabin.c
+++ b/
rabin.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: rabin.c,v 1.
7 2002/01/13 13:42:53
mdw Exp $
+ * $Id: rabin.c,v 1.
8 2004/04/02 01:03:49
mdw Exp $
*
* Miller-Rabin primality test
*
*
* Miller-Rabin primality test
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: rabin.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: rabin.c,v $
+ * Revision 1.8 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.7 2002/01/13 13:42:53 mdw
* More efficient Rabin-Miller test: with random witnesses, skip redundant
* Montgomerization. (Being bijective, it can't affect the distribution.)
* Revision 1.7 2002/01/13 13:42:53 mdw
* More efficient Rabin-Miller test: with random witnesses, skip redundant
* Montgomerization. (Being bijective, it can't affect the distribution.)
@@
-182,7
+185,7
@@
int rabin_test(rabin *r, mp *g)
int rabin_iters(unsigned len)
{
int rabin_iters(unsigned len)
{
- static struct {
+ static
const
struct {
unsigned b;
int i;
} *p, *q, tab[] = {
unsigned b;
int i;
} *p, *q, tab[] = {
diff --git
a/rho.c
b/rho.c
index
aae4951
..
57754d3
100644
(file)
--- a/
rho.c
+++ b/
rho.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: rho.c,v 1.
3 2001/06/16 12:56:38
mdw Exp $
+ * $Id: rho.c,v 1.
4 2004/04/02 01:03:49
mdw Exp $
*
* Pollard's rho algorithm for discrete logs
*
*
* Pollard's rho algorithm for discrete logs
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: rho.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: rho.c,v $
+ * Revision 1.4 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.3 2001/06/16 12:56:38 mdw
* Fixes for interface change to @mpmont_expr@ and @mpmont_mexpr@.
*
* Revision 1.3 2001/06/16 12:56:38 mdw
* Fixes for interface change to @mpmont_expr@ and @mpmont_mexpr@.
*
@@
-215,7
+218,7
@@
static void prime_drop(void *x)
MP_DROP(*(mp **)x);
}
MP_DROP(*(mp **)x);
}
-static rho_ops prime_ops = {
+static
const
rho_ops prime_ops = {
prime_sqr, prime_mul, prime_eq, prime_split, prime_drop
};
prime_sqr, prime_mul, prime_eq, prime_split, prime_drop
};
diff --git
a/rho.h
b/rho.h
index
6d060b0
..
2760096
100644
(file)
--- a/
rho.h
+++ b/
rho.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: rho.h,v 1.
1 2000/07/09 21:32:30
mdw Exp $
+ * $Id: rho.h,v 1.
2 2004/04/02 01:03:49
mdw Exp $
*
* Pollard's rho algorithm for discrete logs
*
*
* Pollard's rho algorithm for discrete logs
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: rho.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: rho.h,v $
+ * Revision 1.2 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.1 2000/07/09 21:32:30 mdw
* Pollard's rho algorithm for computing discrete logs.
*
* Revision 1.1 2000/07/09 21:32:30 mdw
* Pollard's rho algorithm for computing discrete logs.
*
@@
-63,7
+66,7
@@
typedef struct rho_ops {
/* --- The Pollard's rho context structure --- */
typedef struct rho_ctx {
/* --- The Pollard's rho context structure --- */
typedef struct rho_ctx {
-
rho_ops *ops;
/* Group operations table */
+
const rho_ops *ops;
/* Group operations table */
void *c; /* Context for group operations */
void *g, *a; /* Generator and argument for log */
mp *n; /* Cyclic group order */
void *c; /* Context for group operations */
void *g, *a; /* Generator and argument for log */
mp *n; /* Cyclic group order */
diff --git
a/skipjack.c
b/skipjack.c
index
98bb48f
..
f0a3f23
100644
(file)
--- a/
skipjack.c
+++ b/
skipjack.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: skipjack.c,v 1.
3 2000/08/01 00:28:34
mdw Exp $
+ * $Id: skipjack.c,v 1.
4 2004/04/02 01:03:49
mdw Exp $
*
* The Skipjack block cipher
*
*
* The Skipjack block cipher
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: skipjack.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: skipjack.c,v $
+ * Revision 1.4 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.3 2000/08/01 00:28:34 mdw
* Performance improvement: read keys in as 32-bit words and deal them out
* byte-by-byte.
* Revision 1.3 2000/08/01 00:28:34 mdw
* Performance improvement: read keys in as 32-bit words and deal them out
* byte-by-byte.
@@
-57,7
+60,7
@@
const octet skipjack_keysz[] = { KSZ_SET, 10, 0 };
/*----- The Skipjack S-box ------------------------------------------------*/
/*----- The Skipjack S-box ------------------------------------------------*/
-static octet f[256] = SKIPJACK_S;
+static
const
octet f[256] = SKIPJACK_S;
/*----- Main code ---------------------------------------------------------*/
/*----- Main code ---------------------------------------------------------*/
diff --git
a/twofish.c
b/twofish.c
index
566ee1e
..
6f79963
100644
(file)
--- a/
twofish.c
+++ b/
twofish.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: twofish.c,v 1.
3 2002/01/13 13:37:5
9 mdw Exp $
+ * $Id: twofish.c,v 1.
4 2004/04/02 01:03:4
9 mdw Exp $
*
* Implementation of the Twofish cipher
*
*
* Implementation of the Twofish cipher
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: twofish.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: twofish.c,v $
+ * Revision 1.4 2004/04/02 01:03:49 mdw
+ * Miscellaneous constification.
+ *
* Revision 1.3 2002/01/13 13:37:59 mdw
* Add support for Twofish family keys.
*
* Revision 1.3 2002/01/13 13:37:59 mdw
* Add support for Twofish family keys.
*
@@
-286,7
+289,7
@@
void twofish_initfk(twofish_ctx *k, const void *buf, size_t sz,
void twofish_init(twofish_ctx *k, const void *buf, size_t sz)
{
void twofish_init(twofish_ctx *k, const void *buf, size_t sz)
{
- static twofish_fk fk = { { 0 } };
+ static
const
twofish_fk fk = { { 0 } };
twofish_initfk(k, buf, sz, &fk);
}
twofish_initfk(k, buf, sz, &fk);
}