X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=nessie_bc_test.h;h=1bab98cd2d83d7601bd73d30853f32f5c606218a;hb=96ebafd201c9e8441c7677577b24aa402c1defc6;hp=b51081052540c39e5305bf78e07cc111ef8e37ef;hpb=6725841b72687bd3ede509c41ac50746c6bd1828;p=avr-crypto-lib.git diff --git a/nessie_bc_test.h b/nessie_bc_test.h index b510810..1bab98c 100644 --- a/nessie_bc_test.h +++ b/nessie_bc_test.h @@ -1,23 +1,47 @@ +/* nessie_bc_test.h */ +/* + This file is part of the Crypto-avr-lib/microcrypt-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 . +*/ #ifndef NESSIE_BC_TEST_H_ #define NESSIE_BC_TEST_H_ #include -typedef struct nessie_ctx_st{ - uint16_t keysize; +typedef void (*nessie_bc_gen_fpt)(uint8_t* key, uint16_t keysize_b, void* ctx); +typedef void (*nessie_bc_free_fpt)(void* ctx); +typedef void (*nessie_bc_enc_fpt)(void* buffer, void* ctx); +typedef void (*nessie_bc_dec_fpt)(void* buffer, void* ctx); + +typedef struct nessie_bc_ctx_st{ + uint16_t keysize_b; uint16_t blocksize_B; uint16_t ctx_size_B; char* name; - void (*cipher_genctx)(uint8_t* key, uint16_t keysize, void* ctx); - void (*cipher_enc)(void* buffer, void* ctx); - void (*cipher_dec)(void* buffer, void* ctx); -} nessie_ctx_t; + nessie_bc_gen_fpt cipher_genctx; + nessie_bc_free_fpt cipher_free; + nessie_bc_enc_fpt cipher_enc; + nessie_bc_dec_fpt cipher_dec; +} nessie_bc_ctx_t; + +extern nessie_bc_ctx_t nessie_bc_ctx; -extern nessie_ctx_t nessie_ctx; +void nessie_bc_run(void); +void nessie_bc_init(void); -void nessie_enc(uint8_t* key, uint8_t* pt); -void nessie_dec(uint8_t* key, uint8_t* ct); -void nessie_run(void); #endif /*NESSIE_BC_TEST_H_*/