/* rc6.c */
/*
This file is part of the AVR-Crypto-Lib.
- Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de)
+ Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
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
return ( (a>>n)| (a<<(32-n)) );
}
-uint8_t rc6_init(void* key, uint16_t keylength_b, rc6_ctx_t *s){
+uint8_t rc6_init(void *key, uint16_t keylength_b, rc6_ctx_t *s){
return rc6_initl(key, keylength_b, 20, s);
}
-uint8_t rc6_initl(void* key, uint16_t keylength_b, uint8_t rounds, rc6_ctx_t *s){
+uint8_t rc6_initl(void *key, uint16_t keylength_b, uint8_t rounds, rc6_ctx_t *s){
uint8_t i,j;
uint16_t v,p,c;
uint32_t a,b, l=0;
#define C (((uint32_t*)block)[2])
#define D (((uint32_t*)block)[3])
-void rc6_enc(void* block, rc6_ctx_t *s){
+void rc6_enc(void *block, rc6_ctx_t *s){
uint8_t i;
uint32_t t,u,x; /* greetings to Linux? */
B += s->S[0];
C += s->S[2*s->rounds+3];
}
-void rc6_dec(void* block, rc6_ctx_t *s){
+void rc6_dec(void *block, rc6_ctx_t *s){
uint8_t i;
uint32_t t,u,x; /* greetings to Linux? */