diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2007-05-27 07:17:48 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2007-05-27 07:17:48 +0000 |
commit | b138ce8a7a91d745072497d69175d5dfff1d8990 (patch) | |
tree | 5a0d893f53c0775b1403a55705d14b77f070ee4a /sys/arch/i386 | |
parent | 6ecee977905fec92cda018a25f426843b211af40 (diff) |
fix another use of MAXNR for rijndael
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/via.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/via.c b/sys/arch/i386/i386/via.c index d56607badfb..d33ea3bb516 100644 --- a/sys/arch/i386/i386/via.c +++ b/sys/arch/i386/i386/via.c @@ -1,4 +1,4 @@ -/* $OpenBSD: via.c,v 1.9 2007/04/10 17:47:54 miod Exp $ */ +/* $OpenBSD: via.c,v 1.10 2007/05/27 07:17:47 tedu Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -63,8 +63,8 @@ void viac3_rnd(void *); #ifdef CRYPTO struct viac3_session { - u_int32_t ses_ekey[4 * (MAXNR + 1) + 4]; /* 128 bit aligned */ - u_int32_t ses_dkey[4 * (MAXNR + 1) + 4]; /* 128 bit aligned */ + u_int32_t ses_ekey[4 * (AES_MAXROUNDS + 1) + 4]; /* 128 bit aligned */ + u_int32_t ses_dkey[4 * (AES_MAXROUNDS + 1) + 4]; /* 128 bit aligned */ u_int8_t ses_iv[16]; /* 128 bit aligned */ u_int32_t ses_cw0; struct swcr_data *swd; @@ -202,7 +202,7 @@ viac3_crypto_newsession(u_int32_t *sidp, struct cryptoini *cri) c->cri_klen); rijndaelKeySetupDec(ses->ses_dkey, c->cri_key, c->cri_klen); - for (i = 0; i < 4 * (MAXNR + 1); i++) { + for (i = 0; i < 4 * (AES_MAXROUNDS + 1); i++) { ses->ses_ekey[i] = ntohl(ses->ses_ekey[i]); ses->ses_dkey[i] = ntohl(ses->ses_dkey[i]); } |