X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=rc5%2Frc5.h;fp=rc5%2Frc5.h;h=2a0182c51216428ed79fcf3c934350504773f07c;hb=d32eba56ce10ea6b9eff123b50d9842673b38f2b;hp=0000000000000000000000000000000000000000;hpb=8f855d283a31a468ea014774c4723a8b77b81644;p=avr-crypto-lib.git diff --git a/rc5/rc5.h b/rc5/rc5.h new file mode 100644 index 0000000..2a0182c --- /dev/null +++ b/rc5/rc5.h @@ -0,0 +1,46 @@ +/* rc5.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 . +*/ +/* rc5.h a C implementation of RC5 for AVR microcontrollers + * + * author: Daniel Otte + * email: daniel.otte@rub.de + * license: GPLv3 + * + * this implementation is limited to 64bit blocks and a maximum of 255 rounds + * + */ +#ifndef RC5_H_ +#define RC5_H_ + + +#include +#include /* malloc() & free() */ +#include /* memset() & memcpy() */ + +typedef struct rc5_ctx_st { + uint8_t rounds; + uint32_t *s; +}rc5_ctx_t; + +void rc5_enc(void* buffer, const rc5_ctx_t* ctx); +void rc5_dec(void* buffer, const rc5_ctx_t* ctx); +void rc5_init(void* key, uint16_t keysize_b, uint8_t rounds, rc5_ctx_t* ctx); +void rc5_free(rc5_ctx_t* ctx); + +#endif /*RC5_H_*/