2 * eax-test.c: test harness for EAX, common declarations
5 * This file is Free Software. It was originally written for secnet.
6 * See README for full list of copyright holders.
8 * Copyright 2013 Ian Jackson
9 * Copyright 2013 Mark Wooding
11 * You may redistribute secnet as a whole and/or modify it under the
12 * terms of the GNU General Public License as published by the Free
13 * Software Foundation; either version 3, or (at your option) any
16 * You may redistribute this file and/or modify it under the terms of
17 * the GNU General Public License as published by the Free Software
18 * Foundation; either version 2, or (at your option) any later
21 * This software is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this software; if not, see
28 * https://www.gnu.org/licenses/gpl.html.
41 #include <sys/types.h>
43 #define INFO int dummy_info
45 #define EAX_ENTRYPOINT_DECL /* empty */
47 #define EAX_DECLARATIONS_ONLY
49 #undef EAX_DECLARATIONS_ONLY
51 void eaxtest_blockcipher_key_setup(const uint8_t *keydata, uint8_t bytes);
53 #define consttime_memeq(s1,s2,sz) (!memcmp((s1),(s2),(sz)))
54 /* fine for running test vectors */
56 extern const size_t blocksize;
58 #define EAX_SOME_TEST \
59 const size_t blocksize = BLOCK_SIZE; \
60 static uint8_t INFO_B[BLOCK_SIZE], INFO_P[BLOCK_SIZE]
62 #endif /* EAX_TEST_H */