]> git.cryptolib.org Git - avr-crypto-lib.git/blob - rc6.h
f1f78e953c37f19bbc9c25836c606232ece39c07
[avr-crypto-lib.git] / rc6.h
1 /* 
2  * File:        rc6.h
3  * Author:      Daniel Otte
4  * Date:        06.08.2006
5  * License: GPL
6  * Description: Implementation of the RC6 cipher algorithm.
7  *      This implementation is restricted to 32-bit words, but free in the choice of number of rounds (0 to 255).
8  *      so it is RC6-32/r/b
9  */
10
11 #ifndef RC6_H_
12 #define RC6_H_
13
14  
15 #include <stdint.h>
16  
17 typedef struct rc6_ctx_st{
18         uint8_t         rounds;         /* specifys the number of rounds; default: 20 */
19         uint32_t*       S;                      /* the round-keys */
20 } rc6_ctx_t;
21  
22  
23 uint8_t rc6_init(void* key, uint16_t keylength_b, rc6_ctx_t *s);
24  
25 uint8_t rc6_initl(void* key, uint16_t keylength_b, uint8_t rounds, rc6_ctx_t *s);
26  
27 void rc6_enc(void* block, rc6_ctx_t *s);
28
29 void rc6_dec(void* block, rc6_ctx_t *s);
30  
31 void rc6_free(rc6_ctx_t *s); 
32
33 #endif /* RC6_H_ */
34