]> git.cryptolib.org Git - avr-crypto-lib.git/blob - rc5.h
3ff2ed6a65040c6d0b7fd92879d79bae3382c713
[avr-crypto-lib.git] / rc5.h
1 /* rc5.h a C implementation of RC5 for AVR microcontrollers
2  * 
3  * author: Daniel Otte 
4  * email:  daniel.otte@rub.de
5  * license: GPLv3
6  * 
7  * this implementation is limited to 64bit blocks and a maximum of 255 rounds
8  * 
9  */
10 #ifndef RC5_H_
11 #define RC5_H_
12
13
14 #include <stdint.h>
15 #include <stdlib.h> /* malloc() & free() */
16 #include <string.h> /* memset() & memcpy() */
17  
18 typedef struct rc5_ctx_st {
19         uint8_t rounds;
20         uint32_t *s;
21 }rc5_ctx_t; 
22
23 void rc5_enc(void* buffer, const rc5_ctx_t* ctx);
24 void rc5_dec(void* buffer, const rc5_ctx_t* ctx);
25 void rc5_init(void* key, uint16_t keysize_b, uint8_t rounds, rc5_ctx_t* ctx);
26 void rc5_free(rc5_ctx_t* ctx);
27
28 #endif /*RC5_H_*/