X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=aes%2Faes_dec.c;h=fabe7a216f98a2cdeaf2f085ccbc2e2f86766eec;hp=8c476de0dbe70d3105eda6412befb75f334e78ba;hb=4b5da1dc27a791b5c448274a3db09cd035b33493;hpb=4f50c75ee5a6cc88bf7ea71957ed509e298e6c25 diff --git a/aes/aes_dec.c b/aes/aes_dec.c index 8c476de..fabe7a2 100644 --- a/aes/aes_dec.c +++ b/aes/aes_dec.c @@ -1,7 +1,7 @@ /* aes.c */ /* This file is part of the AVR-Crypto-Lib. - Copyright (C) 2008, 2009 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 @@ -25,7 +25,7 @@ #include "aes_dec.h" #include -void aes_invshiftrow(void* data, uint8_t shift){ +void aes_invshiftrow(void *data, uint8_t shift){ uint8_t tmp[4]; tmp[0] = ((uint8_t*)data)[(4+0-shift)&3]; tmp[1] = ((uint8_t*)data)[(4+1-shift)&3]; @@ -34,7 +34,7 @@ void aes_invshiftrow(void* data, uint8_t shift){ memcpy(data, tmp, 4); } -void aes_invshiftcol(void* data, uint8_t shift){ +void aes_invshiftcol(void *data, uint8_t shift){ uint8_t tmp[4]; tmp[0] = ((uint8_t*)data)[ 0]; tmp[1] = ((uint8_t*)data)[ 4]; @@ -46,7 +46,7 @@ void aes_invshiftcol(void* data, uint8_t shift){ ((uint8_t*)data)[12] = tmp[(4-shift+3)&3]; } static -void aes_dec_round(aes_cipher_state_t* state, const aes_roundkey_t* k){ +void aes_dec_round(aes_cipher_state_t *state, const aes_roundkey_t *k){ uint8_t tmp[16]; uint8_t i; uint8_t t,u,v,w; @@ -102,7 +102,7 @@ void aes_dec_round(aes_cipher_state_t* state, const aes_roundkey_t* k){ static -void aes_dec_firstround(aes_cipher_state_t* state, const aes_roundkey_t* k){ +void aes_dec_firstround(aes_cipher_state_t *state, const aes_roundkey_t *k){ uint8_t i; /* keyAdd */ for(i=0; i<16; ++i){ @@ -118,7 +118,7 @@ void aes_dec_firstround(aes_cipher_state_t* state, const aes_roundkey_t* k){ } } -void aes_decrypt_core(aes_cipher_state_t* state, const aes_genctx_t* ks, uint8_t rounds){ +void aes_decrypt_core(aes_cipher_state_t *state, const aes_genctx_t *ks, uint8_t rounds){ uint8_t i; aes_dec_firstround(state, &(ks->key[i=rounds])); for(;rounds>1;--rounds){