-/* $OpenBSD: aesni.c,v 1.40 2017/02/07 17:25:45 patrick Exp $ */
+/* $OpenBSD: aesni.c,v 1.41 2017/05/02 11:47:49 mikeb Exp $ */
/*-
* Copyright (c) 2003 Jason Wright
* Copyright (c) 2003, 2004 Theo de Raadt
#include <sys/mbuf.h>
#include <crypto/cryptodev.h>
-#include <crypto/rijndael.h>
+#include <crypto/aes.h>
#include <crypto/gmac.h>
#include <crypto/xform.h>
#include <crypto/cryptosoft.h>
-/* $OpenBSD: via.c,v 1.22 2017/02/07 17:25:45 patrick Exp $ */
+/* $OpenBSD: via.c,v 1.23 2017/05/02 11:47:49 mikeb Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
#ifdef CRYPTO
#include <crypto/cryptodev.h>
-#include <crypto/rijndael.h>
+#include <crypto/aes.h>
#include <crypto/xform.h>
#include <crypto/cryptosoft.h>
#endif
ses->ses_cw0 = cw0;
/* Build expanded keys for both directions */
- rijndaelKeySetupEnc(ses->ses_ekey, c->cri_key,
+ AES_KeySetup_Encrypt(ses->ses_ekey, c->cri_key,
c->cri_klen);
- rijndaelKeySetupDec(ses->ses_dkey, c->cri_key,
+ AES_KeySetup_Decrypt(ses->ses_dkey, c->cri_key,
c->cri_klen);
for (i = 0; i < 4 * (AES_MAXROUNDS + 1); i++) {
ses->ses_ekey[i] = ntohl(ses->ses_ekey[i]);
-/* $OpenBSD: via.c,v 1.36 2017/02/07 17:25:45 patrick Exp $ */
+/* $OpenBSD: via.c,v 1.37 2017/05/02 11:47:49 mikeb Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
#ifdef CRYPTO
#include <crypto/cryptodev.h>
-#include <crypto/rijndael.h>
+#include <crypto/aes.h>
#include <crypto/xform.h>
#include <crypto/cryptosoft.h>
#endif
ses->ses_cw0 = cw0;
/* Build expanded keys for both directions */
- rijndaelKeySetupEnc(ses->ses_ekey, c->cri_key,
+ AES_KeySetup_Encrypt(ses->ses_ekey, c->cri_key,
c->cri_klen);
- rijndaelKeySetupDec(ses->ses_dkey, c->cri_key,
+ AES_KeySetup_Decrypt(ses->ses_dkey, c->cri_key,
c->cri_klen);
for (i = 0; i < 4 * (AES_MAXROUNDS + 1); i++) {
ses->ses_ekey[i] = ntohl(ses->ses_ekey[i]);
-/* $OpenBSD: glxsb.c,v 1.31 2017/02/07 17:25:45 patrick Exp $ */
+/* $OpenBSD: glxsb.c,v 1.32 2017/05/02 11:47:49 mikeb Exp $ */
/*
* Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
#ifdef CRYPTO
#include <crypto/cryptodev.h>
-#include <crypto/rijndael.h>
+#include <crypto/aes.h>
#include <crypto/xform.h>
#include <crypto/cryptosoft.h>
#endif
return (ENOMEM);
}
ses->ses_swd_enc = swd;
- txf = &enc_xform_rijndael128;
+ txf = &enc_xform_aes;
if (txf->ctxsize > 0) {
swd->sw_kschedule =
malloc(txf->ctxsize,
#ifndef _AES_H_
#define _AES_H_
+#define AES_MAXROUNDS (14)
+
typedef struct aes_ctx {
uint32_t sk[60];
uint32_t sk_exp[120];