X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=aes_dec.c;h=8c476de0dbe70d3105eda6412befb75f334e78ba;hb=5ef100e38af8134b518c1307f17ad21dfd46f5dd;hp=c2ee5f2a7dd94f44502ab7d3d5d2d63625ec9acc;hpb=bb6e6769cf20a6948e15ff43eff6d13a1cce104b;p=avr-crypto-lib.git diff --git a/aes_dec.c b/aes_dec.c index c2ee5f2..8c476de 100644 --- a/aes_dec.c +++ b/aes_dec.c @@ -1,6 +1,6 @@ /* aes.c */ /* - This file is part of the Crypto-avr-lib/microcrypt-lib. + This file is part of the AVR-Crypto-Lib. Copyright (C) 2008, 2009 Daniel Otte (daniel.otte@rub.de) This program is free software: you can redistribute it and/or modify @@ -59,7 +59,7 @@ void aes_dec_round(aes_cipher_state_t* state, const aes_roundkey_t* k){ t = tmp[4*i+3] ^ tmp[4*i+2]; u = tmp[4*i+1] ^ tmp[4*i+0]; v = t ^ u; - v ^= gf256mul(0x08, v, 0x1b); + v = gf256mul(0x09, v, 0x1b); w = v ^ gf256mul(0x04, tmp[4*i+2] ^ tmp[4*i+0], 0x1b); v = v ^ gf256mul(0x04, tmp[4*i+3] ^ tmp[4*i+1], 0x1b); state->s[4*i+3] = tmp[4*i+3] ^ v ^ gf256mul(0x02, tmp[4*i+0] ^ tmp[4*i+3], 0x1b);