/* -*-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
*
/*----- 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.
*
\
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 } } \
}; \
/* -*-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
*
/*----- 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.
*
/*----- 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 };
/* -*-c-*-
*
- * $Id: cast-base.h,v 1.1 2000/06/17 10:48:29 mdw Exp $
+ * $Id: cast-base.h,v 1.2 2004/04/02 01:03:49 mdw Exp $
*
* Basic macros and definitions for CAST-128 and CAST-256
*
/*----- 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.
*
/*----- 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 -------------------------------------------------*/
/* -*-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
*
/*----- 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.
*
/*----- Global variables --------------------------------------------------*/
-uint32 cast_s[4][256] = CAST_S;
+const uint32 cast_s[4][256] = CAST_S;
/*----- That's all, folks -------------------------------------------------*/
/* -*-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
*
/*----- 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.
*
/*----- Global variables --------------------------------------------------*/
-uint32 cast_sk[4][256] = CAST_SK;
+const uint32 cast_sk[4][256] = CAST_SK;
/*----- That's all, folks -------------------------------------------------*/
/* -*-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
*
/*----- 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
*
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); \
} \
/* -*-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
*
/*----- 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
*
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); \
} \
/* -*-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)
*
/*----- 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
*
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); \
} \
/* -*-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
*
/*----- 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.
*
/*----- Global variables --------------------------------------------------*/
-uint32 des_sp[8][64] = DES_SP;
+const uint32 des_sp[8][64] = DES_SP;
/*----- That's all, folks -------------------------------------------------*/
/* -*-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
*
/*----- 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.
*
/*----- External data -----------------------------------------------------*/
-extern uint32 des_sp[8][64];
+extern const uint32 des_sp[8][64];
/*----- Macros ------------------------------------------------------------*/
/* -*-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
*
/*----- 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.
*
/*----- Tables ------------------------------------------------------------*/
-static octet s[256] = DESX_S;
+static const octet s[256] = DESX_S;
/*----- Global variables --------------------------------------------------*/
/* -*-c-*-
*
- * $Id: ec-test.c,v 1.4 2004/04/01 12:50:09 mdw Exp $
+ * $Id: ec-test.c,v 1.5 2004/04/02 01:03:49 mdw Exp $
*
* Code for testing elliptic-curve stuff
*
/*----- 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.
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
};
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)
{
/* -*-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
*
/*----- 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
/* --- Field operations table --- */
-static field_ops fops = {
+static const field_ops fops = {
FTY_BINARY, "binpoly",
fdestroy, frand, field_stdsamep,
freduce, field_id,
/* --- Field operations table --- */
-static field_ops fnops = {
+static const field_ops fnops = {
FTY_BINARY, "binnorm",
fndestroy, frand, fnsamep,
fnin, fnout,
/* -*-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
*
/*----- 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
/* --- Field operations table --- */
-static field_ops fops = {
+static const field_ops fops = {
FTY_PRIME, "niceprime",
fdestroy, frand, field_stdsamep,
freduce, field_id,
/* -*-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
*
/*----- 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
/* --- Field operations table --- */
-static field_ops fops = {
+static const field_ops fops = {
FTY_PRIME, "prime",
fdestroy, frand, field_stdsamep,
fin, fout,
/* -*-c-*-
*
- * $Id: genprimes.c,v 1.5 2004/04/01 12:50:09 mdw Exp $
+ * $Id: genprimes.c,v 1.6 2004/04/02 01:03:49 mdw Exp $
*
* Generate prime number table
*
/*----- 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.
#define MAXPRIME %uu\n\
\n\
typedef %s smallprime;\n\
-extern smallprime %s[];\n\
+extern const smallprime %s[];\n\
\n\
#endif\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)
/* -*-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}$%
*
/*----- 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.
*
/*----- Static variables --------------------------------------------------*/
-static octet gflog[] = GFSHARE_LOG, gfexp[] = GFSHARE_EXP;
+static const octet gflog[] = GFSHARE_LOG, gfexp[] = GFSHARE_EXP;
/*----- Main code ---------------------------------------------------------*/
/* -*-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
*
/*----- 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.
*
/*----- Static variables --------------------------------------------------*/
-static uint16 tab[256] = GFX_SQRTAB;
+static const uint16 tab[256] = GFX_SQRTAB;
/*----- Main code ---------------------------------------------------------*/
/* -*-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
*
/*----- 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.
*
unsigned m;
} flagent;
-static flagent flagtab[] = {
+static const flagent flagtab[] = {
/* --- Encoding types --- */
for (;;) {
size_t sz = strcspn(p, ",:");
- flagent *e, *ee = 0;
+ const flagent *e, *ee = 0;
/* --- Look up the string in the flags table --- */
void key_writeflags(unsigned f, dstr *d)
{
int del = 0;
- flagent *e;
+ const flagent *e;
unsigned m = 0;
for (e = flagtab; e->name; e++) {
/* -*-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)
*
/*----- 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.
*
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 ---------------------------------------------------------*/
/* -*-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
*
/*----- 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.
*
/*----- Tables ------------------------------------------------------------*/
-static octet s[256] = MD2_S;
+static const octet s[256] = MD2_S;
/*----- Main code ---------------------------------------------------------*/
/* -*-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)
*
/*----- 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.
/*----- Noise source definition -------------------------------------------*/
-rand_source noise_source = { noise_acquire, noise_timer };
+const rand_source noise_source = { noise_acquire, noise_timer };
/*----- Static variables --------------------------------------------------*/
/* -*-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)
*
/*----- 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.
/*----- Noise source definition -------------------------------------------*/
-extern rand_source noise_source;
+extern const rand_source noise_source;
/*----- Magic numbers -----------------------------------------------------*/
/* -*-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
*
/*----- 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
*
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); \
} \
/* -*-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
*
/*----- 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.)
int rabin_iters(unsigned len)
{
- static struct {
+ static const struct {
unsigned b;
int i;
} *p, *q, tab[] = {
/* -*-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
*
/*----- 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@.
*
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
};
/* -*-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
*
/*----- 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.
*
/* --- 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 */
/* -*-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
*
/*----- 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.
/*----- The Skipjack S-box ------------------------------------------------*/
-static octet f[256] = SKIPJACK_S;
+static const octet f[256] = SKIPJACK_S;
/*----- Main code ---------------------------------------------------------*/
/* -*-c-*-
*
- * $Id: twofish.c,v 1.3 2002/01/13 13:37:59 mdw Exp $
+ * $Id: twofish.c,v 1.4 2004/04/02 01:03:49 mdw Exp $
*
* Implementation of the Twofish cipher
*
/*----- 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.
*
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);
}