switch gcm-test from aes to aes-enconly
This commit is contained in:
parent
d72d6fbe7a
commit
6c688ee8a1
|
@ -0,0 +1,53 @@
|
|||
/* bcal_aes128.c */
|
||||
/*
|
||||
This file is part of the AVR-Crypto-Lib.
|
||||
Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* \file bcal_aes128.c
|
||||
* \email daniel.otte@rub.de
|
||||
* \author Daniel Otte
|
||||
* \date 2009-01-08
|
||||
* \license GPLv3 or later
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
#include <stdlib.h>
|
||||
#include "blockcipher_descriptor.h"
|
||||
#include "aes.h"
|
||||
#include "aes128_enc.h"
|
||||
#include "aes_keyschedule.h"
|
||||
#include "keysize_descriptor.h"
|
||||
|
||||
const char aes128_str[] PROGMEM = "AES-128";
|
||||
|
||||
const uint8_t aes128_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(128),
|
||||
KS_TYPE_TERMINATOR };
|
||||
|
||||
const bcdesc_t aes128_desc PROGMEM = {
|
||||
BCDESC_TYPE_BLOCKCIPHER,
|
||||
BC_INIT_TYPE_1,
|
||||
aes128_str,
|
||||
sizeof(aes128_ctx_t),
|
||||
128,
|
||||
{ (void_fpt) aes128_init },
|
||||
{ (void_fpt) aes128_enc },
|
||||
{ (void_fpt) NULL },
|
||||
(bc_free_fpt) NULL,
|
||||
aes128_keysize_desc
|
||||
};
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
/* bcal_aes128.h */
|
||||
/*
|
||||
This file is part of the AVR-Crypto-Lib.
|
||||
Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* \file bcal_aes128.h
|
||||
* \email daniel.otte@rub.de
|
||||
* \author Daniel Otte
|
||||
* \date 2009-01-08
|
||||
* \license GPLv3 or later
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
#include "blockcipher_descriptor.h"
|
||||
#include "aes.h"
|
||||
#include "aes128_enc.h"
|
||||
#include "keysize_descriptor.h"
|
||||
|
||||
extern const bcdesc_t aes128_desc;
|
|
@ -0,0 +1,53 @@
|
|||
/* bcal_aes192.c */
|
||||
/*
|
||||
This file is part of the AVR-Crypto-Lib.
|
||||
Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* \file bcal_aes192.c
|
||||
* \email daniel.otte@rub.de
|
||||
* \author Daniel Otte
|
||||
* \date 2009-01-08
|
||||
* \license GPLv3 or later
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
#include <stdlib.h>
|
||||
#include "blockcipher_descriptor.h"
|
||||
#include "aes.h"
|
||||
#include "aes192_enc.h"
|
||||
#include "aes_keyschedule.h"
|
||||
#include "keysize_descriptor.h"
|
||||
|
||||
const char aes192_str[] PROGMEM = "AES-192";
|
||||
|
||||
const uint8_t aes192_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(192),
|
||||
KS_TYPE_TERMINATOR };
|
||||
|
||||
const bcdesc_t aes192_desc PROGMEM = {
|
||||
BCDESC_TYPE_BLOCKCIPHER,
|
||||
BC_INIT_TYPE_1,
|
||||
aes192_str,
|
||||
sizeof(aes192_ctx_t),
|
||||
128,
|
||||
{ (void_fpt) aes192_init },
|
||||
{ (void_fpt) aes192_enc },
|
||||
{ (void_fpt) NULL },
|
||||
(bc_free_fpt) NULL,
|
||||
aes192_keysize_desc
|
||||
};
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
/* bcal_aes192.h */
|
||||
/*
|
||||
This file is part of the AVR-Crypto-Lib.
|
||||
Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* \file bcal_aes192.h
|
||||
* \email daniel.otte@rub.de
|
||||
* \author Daniel Otte
|
||||
* \date 2009-01-08
|
||||
* \license GPLv3 or later
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
#include "blockcipher_descriptor.h"
|
||||
#include "aes.h"
|
||||
#include "aes192_enc.h"
|
||||
#include "keysize_descriptor.h"
|
||||
|
||||
extern const bcdesc_t aes192_desc;
|
|
@ -0,0 +1,53 @@
|
|||
/* bcal_aes256.c */
|
||||
/*
|
||||
This file is part of the AVR-Crypto-Lib.
|
||||
Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* \file bcal_aes256.c
|
||||
* \email daniel.otte@rub.de
|
||||
* \author Daniel Otte
|
||||
* \date 2009-01-08
|
||||
* \license GPLv3 or later
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
#include <stdlib.h>
|
||||
#include "blockcipher_descriptor.h"
|
||||
#include "aes.h"
|
||||
#include "aes256_enc.h"
|
||||
#include "aes_keyschedule.h"
|
||||
#include "keysize_descriptor.h"
|
||||
|
||||
const char aes256_str[] PROGMEM = "AES-256";
|
||||
|
||||
const uint8_t aes256_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(256),
|
||||
KS_TYPE_TERMINATOR };
|
||||
|
||||
const bcdesc_t aes256_desc PROGMEM = {
|
||||
BCDESC_TYPE_BLOCKCIPHER,
|
||||
BC_INIT_TYPE_1,
|
||||
aes256_str,
|
||||
sizeof(aes256_ctx_t),
|
||||
128,
|
||||
{ (void_fpt) aes256_init },
|
||||
{ (void_fpt) aes256_enc },
|
||||
{ (void_fpt) NULL },
|
||||
(bc_free_fpt) NULL,
|
||||
aes256_keysize_desc
|
||||
};
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
/* bcal_aes256.h */
|
||||
/*
|
||||
This file is part of the AVR-Crypto-Lib.
|
||||
Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* \file bcal_aes256.h
|
||||
* \email daniel.otte@rub.de
|
||||
* \author Daniel Otte
|
||||
* \date 2009-01-08
|
||||
* \license GPLv3 or later
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
#include "blockcipher_descriptor.h"
|
||||
#include "aes.h"
|
||||
#include "aes256_enc.h"
|
||||
#include "keysize_descriptor.h"
|
||||
|
||||
extern const bcdesc_t aes256_desc;
|
|
@ -1,18 +1,17 @@
|
|||
# Makefile for AES
|
||||
# Makefile for GCM
|
||||
ALGO_NAME := GCM
|
||||
|
||||
# comment out the following line for removement of AES from the build process
|
||||
BLOCK_CIPHERS += $(ALGO_NAME)
|
||||
AEAD_CIPHERS += $(ALGO_NAME)
|
||||
|
||||
$(ALGO_NAME)_DIR := gcm/
|
||||
$(ALGO_NAME)_INCDIR := memxor/ aes/ gf256mul/ bcal/
|
||||
$(ALGO_NAME)_OBJ := gcm128.o \
|
||||
aes_enc-asm.o aes_dec-asm.o aes_sbox-asm.o aes_invsbox-asm.o \
|
||||
aes_keyschedule-asm.o
|
||||
aes_enc-asm.o aes_sbox-asm.o \
|
||||
aes_keyschedule-asm.o memxor.o
|
||||
$(ALGO_NAME)_TESTBIN := main-gcm-test.o $(CLI_STD) $(BCAL_STD) \
|
||||
bcal_aes128.o bcal_aes192.o bcal_aes256.o \
|
||||
dump-asm.o dump-decl.o \
|
||||
memxor.o
|
||||
bcal_aes128_enconly.o bcal_aes192_enconly.o bcal_aes256_enconly.o \
|
||||
dump-asm.o dump-decl.o
|
||||
$(ALGO_NAME)_NESSIE_TEST := test nessie
|
||||
$(ALGO_NAME)_PERFORMANCE_TEST := performance
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
#include "main-test-common.h"
|
||||
|
||||
#include <gcm128.h>
|
||||
#include <bcal_aes128.h>
|
||||
#include <bcal_aes192.h>
|
||||
#include <bcal_aes256.h>
|
||||
#include <bcal_aes128_enconly.h>
|
||||
#include <bcal_aes192_enconly.h>
|
||||
#include <bcal_aes256_enconly.h>
|
||||
#include "performance_test.h"
|
||||
|
||||
char *algo_name = "GCM-AES128";
|
||||
|
|
Loading…
Reference in New Issue