-# $OpenBSD: Makefile,v 1.3 2016/09/02 11:20:48 mikeb Exp $
+# $OpenBSD: Makefile,v 1.4 2017/05/02 11:46:00 mikeb Exp $
DIR= ${.CURDIR}/../../../../sys
REGRESS_ROOT_TARGETS= run-regress-${PROG}
.PATH: ${DIR}/crypto
-SRCS+= cast.c ecb_enc.c ecb3_enc.c gmac.c rijndael.c set_key.c
+SRCS+= cast.c ecb_enc.c ecb3_enc.c gmac.c aes.c set_key.c
SRCS+= chachapoly.c poly1305.c
SRCS+= xform.c
-/* $OpenBSD: aesctr.c,v 1.2 2014/08/15 14:39:04 mikeb Exp $ */
+/* $OpenBSD: aesctr.c,v 1.3 2017/05/02 11:46:00 mikeb Exp $ */
/*
* Copyright (c) 2005 Markus Friedl <markus@openbsd.org>
*/
#include <sys/param.h>
-#include <crypto/rijndael.h>
+#include <crypto/aes.h>
#include <err.h>
#include <stdio.h>
#include <stdlib.h>
#define AESCTR_BLOCKSIZE 16
struct aes_ctr_ctx {
- u_int32_t ac_ek[4*(AES_MAXROUNDS + 1)];
+ AES_CTX ac_key;
u_int8_t ac_block[AESCTR_BLOCKSIZE];
- int ac_nr;
};
int aes_ctr_setkey(void *, u_int8_t *, int);
out += AESCTR_BLOCKSIZE;
}
return 0;
-
}
static int
if (docrypt(data[TST_KEY], length[TST_KEY],
data[TST_IV], data[TST_PLAIN], p,
length[TST_PLAIN], 0) < 0) {
- warnx("crypt with /dev/crypto failed");
+ warnx("encryption failed");
goto done;
}
fail = !match(data[TST_CIPHER], p, len);
-# $OpenBSD: Makefile,v 1.4 2016/09/02 11:22:23 mikeb Exp $
+# $OpenBSD: Makefile,v 1.5 2017/05/02 11:46:00 mikeb Exp $
DIR= ${.CURDIR}/../../../../sys
REGRESS_TARGETS= run-regress-${PROG}
.PATH: ${DIR}/crypto
-SRCS+= cast.c ecb_enc.c ecb3_enc.c gmac.c rijndael.c set_key.c
+SRCS+= cast.c ecb_enc.c ecb3_enc.c gmac.c aes.c set_key.c
SRCS+= chachapoly.c poly1305.c
SRCS+= xform.c
-/* $OpenBSD: aes_xts.c,v 1.2 2013/10/06 16:59:34 jsing Exp $ */
+/* $OpenBSD: aes_xts.c,v 1.3 2017/05/02 11:46:00 mikeb Exp $ */
/*
* Copyright (c) 2002 Markus Friedl. All rights reserved.
*/
#include <sys/types.h>
-#include <crypto/rijndael.h>
+#include <crypto/aes.h>
#include <err.h>
#include <fcntl.h>
#include <stdio.h>
#define AES_XTS_BLOCKSIZE 16
struct aes_xts_ctx {
- rijndael_ctx key1;
- rijndael_ctx key2;
+ AES_CTX key1;
+ AES_CTX key2;
u_int8_t tweak[AES_XTS_BLOCKSIZE];
};
-# $OpenBSD: Makefile,v 1.2 2014/01/18 05:54:52 martynas Exp $
+# $OpenBSD: Makefile,v 1.3 2017/05/02 11:46:00 mikeb Exp $
DIR=${.CURDIR}/../../../../sys
PROG= gmac_test
-SRCS+= rijndael.c gmac.c gmac_test.c
+SRCS+= aes.c gmac.c gmac_test.c
CDIAGFLAGS= -Wall
CDIAGFLAGS+= -Werror
CDIAGFLAGS+= -Wpointer-arith
-/* $OpenBSD: gmac_test.c,v 1.4 2017/03/07 16:11:34 inoguchi Exp $ */
+/* $OpenBSD: gmac_test.c,v 1.5 2017/05/02 11:46:00 mikeb Exp $ */
/*
* Copyright (c) 2010 Mike Belopuhov <mikeb@openbsd.org>
*/
#include <sys/param.h>
-#include <crypto/rijndael.h>
+#include <crypto/aes.h>
#include <crypto/gmac.h>
#include <err.h>
#include <errno.h>