[Ffmpeg-cvslog] r7491 - trunk/libavutil/aes.c
michael
subversion
Sun Jan 14 20:02:59 CET 2007
Author: michael
Date: Sun Jan 14 20:02:59 2007
New Revision: 7491
Modified:
trunk/libavutil/aes.c
Log:
make decode look more like encode
Modified: trunk/libavutil/aes.c
==============================================================================
--- trunk/libavutil/aes.c (original)
+++ trunk/libavutil/aes.c Sun Jan 14 20:02:59 2007
@@ -75,14 +75,14 @@
void av_aes_decrypt(AVAES *a){
int t, r;
- addkey(a->state, a->round_dec_key[a->rounds]);
- for(r=a->rounds-2; r>=0; r--){
+ for(r=a->rounds; r>1; r--){
+ addkey(a->state, a->round_dec_key[r]);
SUBSHIFT3x((a->state[0]+1))
SUBSHIFT2x((a->state[0]+2))
SUBSHIFT1x((a->state[0]+3))
mix(a->state, dec_multbl);
- addkey(a->state, a->round_dec_key[r+1]);
}
+ addkey(a->state, a->round_dec_key[1]);
SUBSHIFT0((a->state[0]+0), inv_sbox)
SUBSHIFT3((a->state[0]+1), inv_sbox)
SUBSHIFT2((a->state[0]+2), inv_sbox)
More information about the ffmpeg-cvslog
mailing list