@ -40,7 +40,7 @@
# include "rijndael.h"
static UINT8 S [ 256 ] =
static Q_ UINT8 S [ 256 ] =
{
99 , 124 , 119 , 123 , 242 , 107 , 111 , 197 , 48 , 1 , 103 , 43 , 254 , 215 , 171 , 118 ,
202 , 130 , 201 , 125 , 250 , 89 , 71 , 240 , 173 , 212 , 162 , 175 , 156 , 164 , 114 , 192 ,
@ -61,7 +61,7 @@ static UINT8 S[256]=
} ;
static UINT8 T1 [ 256 ] [ 4 ] =
static Q_ UINT8 T1 [ 256 ] [ 4 ] =
{
0xc6 , 0x63 , 0x63 , 0xa5 , 0xf8 , 0x7c , 0x7c , 0x84 , 0xee , 0x77 , 0x77 , 0x99 , 0xf6 , 0x7b , 0x7b , 0x8d ,
0xff , 0xf2 , 0xf2 , 0x0d , 0xd6 , 0x6b , 0x6b , 0xbd , 0xde , 0x6f , 0x6f , 0xb1 , 0x91 , 0xc5 , 0xc5 , 0x54 ,
@ -129,7 +129,7 @@ static UINT8 T1[256][4]=
0x7b , 0xb0 , 0xb0 , 0xcb , 0xa8 , 0x54 , 0x54 , 0xfc , 0x6d , 0xbb , 0xbb , 0xd6 , 0x2c , 0x16 , 0x16 , 0x3a
} ;
static UINT8 T2 [ 256 ] [ 4 ] =
static Q_ UINT8 T2 [ 256 ] [ 4 ] =
{
0xa5 , 0xc6 , 0x63 , 0x63 , 0x84 , 0xf8 , 0x7c , 0x7c , 0x99 , 0xee , 0x77 , 0x77 , 0x8d , 0xf6 , 0x7b , 0x7b ,
0x0d , 0xff , 0xf2 , 0xf2 , 0xbd , 0xd6 , 0x6b , 0x6b , 0xb1 , 0xde , 0x6f , 0x6f , 0x54 , 0x91 , 0xc5 , 0xc5 ,
@ -197,7 +197,7 @@ static UINT8 T2[256][4]=
0xcb , 0x7b , 0xb0 , 0xb0 , 0xfc , 0xa8 , 0x54 , 0x54 , 0xd6 , 0x6d , 0xbb , 0xbb , 0x3a , 0x2c , 0x16 , 0x16
} ;
static UINT8 T3 [ 256 ] [ 4 ] =
static Q_ UINT8 T3 [ 256 ] [ 4 ] =
{
0x63 , 0xa5 , 0xc6 , 0x63 , 0x7c , 0x84 , 0xf8 , 0x7c , 0x77 , 0x99 , 0xee , 0x77 , 0x7b , 0x8d , 0xf6 , 0x7b ,
0xf2 , 0x0d , 0xff , 0xf2 , 0x6b , 0xbd , 0xd6 , 0x6b , 0x6f , 0xb1 , 0xde , 0x6f , 0xc5 , 0x54 , 0x91 , 0xc5 ,
@ -265,7 +265,7 @@ static UINT8 T3[256][4]=
0xb0 , 0xcb , 0x7b , 0xb0 , 0x54 , 0xfc , 0xa8 , 0x54 , 0xbb , 0xd6 , 0x6d , 0xbb , 0x16 , 0x3a , 0x2c , 0x16
} ;
static UINT8 T4 [ 256 ] [ 4 ] =
static Q_ UINT8 T4 [ 256 ] [ 4 ] =
{
0x63 , 0x63 , 0xa5 , 0xc6 , 0x7c , 0x7c , 0x84 , 0xf8 , 0x77 , 0x77 , 0x99 , 0xee , 0x7b , 0x7b , 0x8d , 0xf6 ,
0xf2 , 0xf2 , 0x0d , 0xff , 0x6b , 0x6b , 0xbd , 0xd6 , 0x6f , 0x6f , 0xb1 , 0xde , 0xc5 , 0xc5 , 0x54 , 0x91 ,
@ -333,7 +333,7 @@ static UINT8 T4[256][4]=
0xb0 , 0xb0 , 0xcb , 0x7b , 0x54 , 0x54 , 0xfc , 0xa8 , 0xbb , 0xbb , 0xd6 , 0x6d , 0x16 , 0x16 , 0x3a , 0x2c
} ;
static UINT8 T5 [ 256 ] [ 4 ] =
static Q_ UINT8 T5 [ 256 ] [ 4 ] =
{
0x51 , 0xf4 , 0xa7 , 0x50 , 0x7e , 0x41 , 0x65 , 0x53 , 0x1a , 0x17 , 0xa4 , 0xc3 , 0x3a , 0x27 , 0x5e , 0x96 ,
0x3b , 0xab , 0x6b , 0xcb , 0x1f , 0x9d , 0x45 , 0xf1 , 0xac , 0xfa , 0x58 , 0xab , 0x4b , 0xe3 , 0x03 , 0x93 ,
@ -401,7 +401,7 @@ static UINT8 T5[256][4]=
0x7b , 0xcb , 0x84 , 0x61 , 0xd5 , 0x32 , 0xb6 , 0x70 , 0x48 , 0x6c , 0x5c , 0x74 , 0xd0 , 0xb8 , 0x57 , 0x42
} ;
static UINT8 T6 [ 256 ] [ 4 ] =
static Q_ UINT8 T6 [ 256 ] [ 4 ] =
{
0x50 , 0x51 , 0xf4 , 0xa7 , 0x53 , 0x7e , 0x41 , 0x65 , 0xc3 , 0x1a , 0x17 , 0xa4 , 0x96 , 0x3a , 0x27 , 0x5e ,
0xcb , 0x3b , 0xab , 0x6b , 0xf1 , 0x1f , 0x9d , 0x45 , 0xab , 0xac , 0xfa , 0x58 , 0x93 , 0x4b , 0xe3 , 0x03 ,
@ -469,7 +469,7 @@ static UINT8 T6[256][4]=
0x61 , 0x7b , 0xcb , 0x84 , 0x70 , 0xd5 , 0x32 , 0xb6 , 0x74 , 0x48 , 0x6c , 0x5c , 0x42 , 0xd0 , 0xb8 , 0x57
} ;
static UINT8 T7 [ 256 ] [ 4 ] =
static Q_ UINT8 T7 [ 256 ] [ 4 ] =
{
0xa7 , 0x50 , 0x51 , 0xf4 , 0x65 , 0x53 , 0x7e , 0x41 , 0xa4 , 0xc3 , 0x1a , 0x17 , 0x5e , 0x96 , 0x3a , 0x27 ,
0x6b , 0xcb , 0x3b , 0xab , 0x45 , 0xf1 , 0x1f , 0x9d , 0x58 , 0xab , 0xac , 0xfa , 0x03 , 0x93 , 0x4b , 0xe3 ,
@ -537,7 +537,7 @@ static UINT8 T7[256][4]=
0x84 , 0x61 , 0x7b , 0xcb , 0xb6 , 0x70 , 0xd5 , 0x32 , 0x5c , 0x74 , 0x48 , 0x6c , 0x57 , 0x42 , 0xd0 , 0xb8
} ;
static UINT8 T8 [ 256 ] [ 4 ] =
static Q_ UINT8 T8 [ 256 ] [ 4 ] =
{
0xf4 , 0xa7 , 0x50 , 0x51 , 0x41 , 0x65 , 0x53 , 0x7e , 0x17 , 0xa4 , 0xc3 , 0x1a , 0x27 , 0x5e , 0x96 , 0x3a ,
0xab , 0x6b , 0xcb , 0x3b , 0x9d , 0x45 , 0xf1 , 0x1f , 0xfa , 0x58 , 0xab , 0xac , 0xe3 , 0x03 , 0x93 , 0x4b ,
@ -605,7 +605,7 @@ static UINT8 T8[256][4]=
0xcb , 0x84 , 0x61 , 0x7b , 0x32 , 0xb6 , 0x70 , 0xd5 , 0x6c , 0x5c , 0x74 , 0x48 , 0xb8 , 0x57 , 0x42 , 0xd0
} ;
static UINT8 S5 [ 256 ] =
static Q_ UINT8 S5 [ 256 ] =
{
0x52 , 0x09 , 0x6a , 0xd5 ,
0x30 , 0x36 , 0xa5 , 0x38 ,
@ -673,7 +673,7 @@ static UINT8 S5[256]=
0x55 , 0x21 , 0x0c , 0x7d
} ;
static UINT8 U1 [ 256 ] [ 4 ] =
static Q_ UINT8 U1 [ 256 ] [ 4 ] =
{
0x00 , 0x00 , 0x00 , 0x00 , 0x0e , 0x09 , 0x0d , 0x0b , 0x1c , 0x12 , 0x1a , 0x16 , 0x12 , 0x1b , 0x17 , 0x1d ,
0x38 , 0x24 , 0x34 , 0x2c , 0x36 , 0x2d , 0x39 , 0x27 , 0x24 , 0x36 , 0x2e , 0x3a , 0x2a , 0x3f , 0x23 , 0x31 ,
@ -741,7 +741,7 @@ static UINT8 U1[256][4]=
0x9f , 0x5d , 0x80 , 0xbe , 0x91 , 0x54 , 0x8d , 0xb5 , 0x83 , 0x4f , 0x9a , 0xa8 , 0x8d , 0x46 , 0x97 , 0xa3
} ;
static UINT8 U2 [ 256 ] [ 4 ] =
static Q_ UINT8 U2 [ 256 ] [ 4 ] =
{
0x00 , 0x00 , 0x00 , 0x00 , 0x0b , 0x0e , 0x09 , 0x0d , 0x16 , 0x1c , 0x12 , 0x1a , 0x1d , 0x12 , 0x1b , 0x17 ,
0x2c , 0x38 , 0x24 , 0x34 , 0x27 , 0x36 , 0x2d , 0x39 , 0x3a , 0x24 , 0x36 , 0x2e , 0x31 , 0x2a , 0x3f , 0x23 ,
@ -809,7 +809,7 @@ static UINT8 U2[256][4]=
0xbe , 0x9f , 0x5d , 0x80 , 0xb5 , 0x91 , 0x54 , 0x8d , 0xa8 , 0x83 , 0x4f , 0x9a , 0xa3 , 0x8d , 0x46 , 0x97
} ;
static UINT8 U3 [ 256 ] [ 4 ] =
static Q_ UINT8 U3 [ 256 ] [ 4 ] =
{
0x00 , 0x00 , 0x00 , 0x00 , 0x0d , 0x0b , 0x0e , 0x09 , 0x1a , 0x16 , 0x1c , 0x12 , 0x17 , 0x1d , 0x12 , 0x1b ,
0x34 , 0x2c , 0x38 , 0x24 , 0x39 , 0x27 , 0x36 , 0x2d , 0x2e , 0x3a , 0x24 , 0x36 , 0x23 , 0x31 , 0x2a , 0x3f ,
@ -877,7 +877,7 @@ static UINT8 U3[256][4]=
0x80 , 0xbe , 0x9f , 0x5d , 0x8d , 0xb5 , 0x91 , 0x54 , 0x9a , 0xa8 , 0x83 , 0x4f , 0x97 , 0xa3 , 0x8d , 0x46
} ;
static UINT8 U4 [ 256 ] [ 4 ] =
static Q_ UINT8 U4 [ 256 ] [ 4 ] =
{
0x00 , 0x00 , 0x00 , 0x00 , 0x09 , 0x0d , 0x0b , 0x0e , 0x12 , 0x1a , 0x16 , 0x1c , 0x1b , 0x17 , 0x1d , 0x12 ,
0x24 , 0x34 , 0x2c , 0x38 , 0x2d , 0x39 , 0x27 , 0x36 , 0x36 , 0x2e , 0x3a , 0x24 , 0x3f , 0x23 , 0x31 , 0x2a ,
@ -945,7 +945,7 @@ static UINT8 U4[256][4]=
0x5d , 0x80 , 0xbe , 0x9f , 0x54 , 0x8d , 0xb5 , 0x91 , 0x4f , 0x9a , 0xa8 , 0x83 , 0x46 , 0x97 , 0xa3 , 0x8d
} ;
static UINT32 rcon [ 30 ] =
static Q_ UINT32 rcon [ 30 ] =
{
0x01 , 0x02 , 0x04 , 0x08 , 0x10 , 0x20 ,
0x40 , 0x80 , 0x1b , 0x36 , 0x6c , 0xd8 ,
@ -970,7 +970,7 @@ Rijndael::~Rijndael()
// nothing here
}
int Rijndael : : init ( Mode mode , Direction dir , const UINT8 * key , KeyLength keyLen , UINT8 * initVector )
int Rijndael : : init ( Mode mode , Direction dir , const Q_ UINT8 * key , KeyLength keyLen , Q_ UINT8 * initVector )
{
// Not initialized yet
m_state = Invalid ;
@ -999,7 +999,7 @@ int Rijndael::init(Mode mode,Direction dir,const UINT8 * key,KeyLength keyLen,UI
}
}
UINT32 uKeyLenInBytes ;
Q_ UINT32 uKeyLenInBytes ;
// And check the key length
switch ( keyLen )
@ -1025,9 +1025,9 @@ int Rijndael::init(Mode mode,Direction dir,const UINT8 * key,KeyLength keyLen,UI
if ( ! key ) return RIJNDAEL_BAD_KEY ;
UINT8 keyMatrix [ _MAX_KEY_COLUMNS ] [ 4 ] ;
Q_ UINT8 keyMatrix [ _MAX_KEY_COLUMNS ] [ 4 ] ;
for ( UINT32 i = 0 ; i < uKeyLenInBytes ; i + + ) keyMatrix [ i > > 2 ] [ i & 3 ] = key [ i ] ;
for ( Q_ UINT32 i = 0 ; i < uKeyLenInBytes ; i + + ) keyMatrix [ i > > 2 ] [ i & 3 ] = key [ i ] ;
keySched ( keyMatrix ) ;
@ -1038,10 +1038,10 @@ int Rijndael::init(Mode mode,Direction dir,const UINT8 * key,KeyLength keyLen,UI
return RIJNDAEL_SUCCESS ;
}
int Rijndael : : blockEncrypt ( const UINT8 * input , int inputLen , UINT8 * outBuffer )
int Rijndael : : blockEncrypt ( const Q_ UINT8 * input , int inputLen , Q_ UINT8 * outBuffer )
{
int i , k , numBlocks ;
UINT8 block [ 16 ] , iv [ 4 ] [ 4 ] ;
Q_ UINT8 block [ 16 ] , iv [ 4 ] [ 4 ] ;
if ( m_state ! = Valid ) return RIJNDAEL_NOT_INITIALIZED ;
if ( m_direction ! = Encrypt ) return RIJNDAEL_BAD_DIRECTION ;
@ -1060,18 +1060,18 @@ int Rijndael::blockEncrypt(const UINT8 *input,int inputLen,UINT8 *outBuffer)
}
break ;
case CBC :
( ( UINT32 * ) block ) [ 0 ] = ( ( UINT32 * ) m_initVector ) [ 0 ] ^ ( ( UINT32 * ) input ) [ 0 ] ;
( ( UINT32 * ) block ) [ 1 ] = ( ( UINT32 * ) m_initVector ) [ 1 ] ^ ( ( UINT32 * ) input ) [ 1 ] ;
( ( UINT32 * ) block ) [ 2 ] = ( ( UINT32 * ) m_initVector ) [ 2 ] ^ ( ( UINT32 * ) input ) [ 2 ] ;
( ( UINT32 * ) block ) [ 3 ] = ( ( UINT32 * ) m_initVector ) [ 3 ] ^ ( ( UINT32 * ) input ) [ 3 ] ;
( ( Q_ UINT32* ) block ) [ 0 ] = ( ( Q_ UINT32* ) m_initVector ) [ 0 ] ^ ( ( Q_ UINT32* ) input ) [ 0 ] ;
( ( Q_ UINT32* ) block ) [ 1 ] = ( ( Q_ UINT32* ) m_initVector ) [ 1 ] ^ ( ( Q_ UINT32* ) input ) [ 1 ] ;
( ( Q_ UINT32* ) block ) [ 2 ] = ( ( Q_ UINT32* ) m_initVector ) [ 2 ] ^ ( ( Q_ UINT32* ) input ) [ 2 ] ;
( ( Q_ UINT32* ) block ) [ 3 ] = ( ( Q_ UINT32* ) m_initVector ) [ 3 ] ^ ( ( Q_ UINT32* ) input ) [ 3 ] ;
encrypt ( block , outBuffer ) ;
input + = 16 ;
for ( i = numBlocks - 1 ; i > 0 ; i - - )
{
( ( UINT32 * ) block ) [ 0 ] = ( ( UINT32 * ) outBuffer ) [ 0 ] ^ ( ( UINT32 * ) input ) [ 0 ] ;
( ( UINT32 * ) block ) [ 1 ] = ( ( UINT32 * ) outBuffer ) [ 1 ] ^ ( ( UINT32 * ) input ) [ 1 ] ;
( ( UINT32 * ) block ) [ 2 ] = ( ( UINT32 * ) outBuffer ) [ 2 ] ^ ( ( UINT32 * ) input ) [ 2 ] ;
( ( UINT32 * ) block ) [ 3 ] = ( ( UINT32 * ) outBuffer ) [ 3 ] ^ ( ( UINT32 * ) input ) [ 3 ] ;
( ( Q_ UINT32* ) block ) [ 0 ] = ( ( Q_ UINT32* ) outBuffer ) [ 0 ] ^ ( ( Q_ UINT32* ) input ) [ 0 ] ;
( ( Q_ UINT32* ) block ) [ 1 ] = ( ( Q_ UINT32* ) outBuffer ) [ 1 ] ^ ( ( Q_ UINT32* ) input ) [ 1 ] ;
( ( Q_ UINT32* ) block ) [ 2 ] = ( ( Q_ UINT32* ) outBuffer ) [ 2 ] ^ ( ( Q_ UINT32* ) input ) [ 2 ] ;
( ( Q_ UINT32* ) block ) [ 3 ] = ( ( Q_ UINT32* ) outBuffer ) [ 3 ] ^ ( ( Q_ UINT32* ) input ) [ 3 ] ;
outBuffer + = 16 ;
encrypt ( block , outBuffer ) ;
input + = 16 ;
@ -1081,19 +1081,19 @@ int Rijndael::blockEncrypt(const UINT8 *input,int inputLen,UINT8 *outBuffer)
# if STRICT_ALIGN
memcpy ( iv , m_initVector , 16 ) ;
# else /* !STRICT_ALIGN */
* ( ( UINT32 * ) iv [ 0 ] ) = * ( ( UINT32 * ) ( m_initVector ) ) ;
* ( ( UINT32 * ) iv [ 1 ] ) = * ( ( UINT32 * ) ( m_initVector + 4 ) ) ;
* ( ( UINT32 * ) iv [ 2 ] ) = * ( ( UINT32 * ) ( m_initVector + 8 ) ) ;
* ( ( UINT32 * ) iv [ 3 ] ) = * ( ( UINT32 * ) ( m_initVector + 12 ) ) ;
* ( ( Q_ UINT32* ) iv [ 0 ] ) = * ( ( Q_ UINT32* ) ( m_initVector ) ) ;
* ( ( Q_ UINT32* ) iv [ 1 ] ) = * ( ( Q_ UINT32* ) ( m_initVector + 4 ) ) ;
* ( ( Q_ UINT32* ) iv [ 2 ] ) = * ( ( Q_ UINT32* ) ( m_initVector + 8 ) ) ;
* ( ( Q_ UINT32* ) iv [ 3 ] ) = * ( ( Q_ UINT32* ) ( m_initVector + 12 ) ) ;
# endif /* ?STRICT_ALIGN */
for ( i = numBlocks ; i > 0 ; i - - )
{
for ( k = 0 ; k < 128 ; k + + )
{
* ( ( UINT32 * ) block ) = * ( ( UINT32 * ) iv [ 0 ] ) ;
* ( ( UINT32 * ) ( block + 4 ) ) = * ( ( UINT32 * ) iv [ 1 ] ) ;
* ( ( UINT32 * ) ( block + 8 ) ) = * ( ( UINT32 * ) iv [ 2 ] ) ;
* ( ( UINT32 * ) ( block + 12 ) ) = * ( ( UINT32 * ) iv [ 3 ] ) ;
* ( ( Q_ UINT32* ) block ) = * ( ( Q_ UINT32* ) iv [ 0 ] ) ;
* ( ( Q_ UINT32* ) ( block + 4 ) ) = * ( ( Q_ UINT32* ) iv [ 1 ] ) ;
* ( ( Q_ UINT32* ) ( block + 8 ) ) = * ( ( Q_ UINT32* ) iv [ 2 ] ) ;
* ( ( Q_ UINT32* ) ( block + 12 ) ) = * ( ( Q_ UINT32* ) iv [ 3 ] ) ;
encrypt ( block , block ) ;
outBuffer [ k / 8 ] ^ = ( block [ 0 ] & 0x80 ) > > ( k & 7 ) ;
iv [ 0 ] [ 0 ] = ( iv [ 0 ] [ 0 ] < < 1 ) | ( iv [ 0 ] [ 1 ] > > 7 ) ;
@ -1123,10 +1123,10 @@ int Rijndael::blockEncrypt(const UINT8 *input,int inputLen,UINT8 *outBuffer)
return 128 * numBlocks ;
}
int Rijndael : : padEncrypt ( const UINT8 * input , int inputOctets , UINT8 * outBuffer )
int Rijndael : : padEncrypt ( const Q_ UINT8 * input , int inputOctets , Q_ UINT8 * outBuffer )
{
int i , numBlocks , padLen ;
UINT8 block [ 16 ] , * iv ;
Q_ UINT8 block [ 16 ] , * iv ;
if ( m_state ! = Valid ) return RIJNDAEL_NOT_INITIALIZED ;
if ( m_direction ! = Encrypt ) return RIJNDAEL_NOT_INITIALIZED ;
@ -1154,10 +1154,10 @@ int Rijndael::padEncrypt(const UINT8 *input, int inputOctets, UINT8 *outBuffer)
iv = m_initVector ;
for ( i = numBlocks ; i > 0 ; i - - )
{
( ( UINT32 * ) block ) [ 0 ] = ( ( UINT32 * ) input ) [ 0 ] ^ ( ( UINT32 * ) iv ) [ 0 ] ;
( ( UINT32 * ) block ) [ 1 ] = ( ( UINT32 * ) input ) [ 1 ] ^ ( ( UINT32 * ) iv ) [ 1 ] ;
( ( UINT32 * ) block ) [ 2 ] = ( ( UINT32 * ) input ) [ 2 ] ^ ( ( UINT32 * ) iv ) [ 2 ] ;
( ( UINT32 * ) block ) [ 3 ] = ( ( UINT32 * ) input ) [ 3 ] ^ ( ( UINT32 * ) iv ) [ 3 ] ;
( ( Q_ UINT32* ) block ) [ 0 ] = ( ( Q_ UINT32* ) input ) [ 0 ] ^ ( ( Q_ UINT32* ) iv ) [ 0 ] ;
( ( Q_ UINT32* ) block ) [ 1 ] = ( ( Q_ UINT32* ) input ) [ 1 ] ^ ( ( Q_ UINT32* ) iv ) [ 1 ] ;
( ( Q_ UINT32* ) block ) [ 2 ] = ( ( Q_ UINT32* ) input ) [ 2 ] ^ ( ( Q_ UINT32* ) iv ) [ 2 ] ;
( ( Q_ UINT32* ) block ) [ 3 ] = ( ( Q_ UINT32* ) input ) [ 3 ] ^ ( ( Q_ UINT32* ) iv ) [ 3 ] ;
encrypt ( block , outBuffer ) ;
iv = outBuffer ;
input + = 16 ;
@ -1169,7 +1169,7 @@ int Rijndael::padEncrypt(const UINT8 *input, int inputOctets, UINT8 *outBuffer)
block [ i ] = input [ i ] ^ iv [ i ] ;
}
for ( i = 16 - padLen ; i < 16 ; i + + ) {
block [ i ] = ( UINT8 ) padLen ^ iv [ i ] ;
block [ i ] = ( Q_ UINT8) padLen ^ iv [ i ] ;
}
encrypt ( block , outBuffer ) ;
break ;
@ -1181,10 +1181,10 @@ int Rijndael::padEncrypt(const UINT8 *input, int inputOctets, UINT8 *outBuffer)
return 16 * ( numBlocks + 1 ) ;
}
int Rijndael : : blockDecrypt ( const UINT8 * input , int inputLen , UINT8 * outBuffer )
int Rijndael : : blockDecrypt ( const Q_ UINT8 * input , int inputLen , Q_ UINT8 * outBuffer )
{
int i , k , numBlocks ;
UINT8 block [ 16 ] , iv [ 4 ] [ 4 ] ;
Q_ UINT8 block [ 16 ] , iv [ 4 ] [ 4 ] ;
if ( m_state ! = Valid ) return RIJNDAEL_NOT_INITIALIZED ;
if ( ( m_mode ! = CFB1 ) & & ( m_direction = = Encrypt ) ) return RIJNDAEL_BAD_DIRECTION ;
@ -1207,26 +1207,26 @@ int Rijndael::blockDecrypt(const UINT8 *input, int inputLen, UINT8 *outBuffer)
# if STRICT_ALIGN
memcpy ( iv , m_initVector , 16 ) ;
# else
* ( ( UINT32 * ) iv [ 0 ] ) = * ( ( UINT32 * ) ( m_initVector ) ) ;
* ( ( UINT32 * ) iv [ 1 ] ) = * ( ( UINT32 * ) ( m_initVector + 4 ) ) ;
* ( ( UINT32 * ) iv [ 2 ] ) = * ( ( UINT32 * ) ( m_initVector + 8 ) ) ;
* ( ( UINT32 * ) iv [ 3 ] ) = * ( ( UINT32 * ) ( m_initVector + 12 ) ) ;
* ( ( Q_ UINT32* ) iv [ 0 ] ) = * ( ( Q_ UINT32* ) ( m_initVector ) ) ;
* ( ( Q_ UINT32* ) iv [ 1 ] ) = * ( ( Q_ UINT32* ) ( m_initVector + 4 ) ) ;
* ( ( Q_ UINT32* ) iv [ 2 ] ) = * ( ( Q_ UINT32* ) ( m_initVector + 8 ) ) ;
* ( ( Q_ UINT32* ) iv [ 3 ] ) = * ( ( Q_ UINT32* ) ( m_initVector + 12 ) ) ;
# endif
for ( i = numBlocks ; i > 0 ; i - - )
{
decrypt ( input , block ) ;
( ( UINT32 * ) block ) [ 0 ] ^ = * ( ( UINT32 * ) iv [ 0 ] ) ;
( ( UINT32 * ) block ) [ 1 ] ^ = * ( ( UINT32 * ) iv [ 1 ] ) ;
( ( UINT32 * ) block ) [ 2 ] ^ = * ( ( UINT32 * ) iv [ 2 ] ) ;
( ( UINT32 * ) block ) [ 3 ] ^ = * ( ( UINT32 * ) iv [ 3 ] ) ;
( ( Q_ UINT32* ) block ) [ 0 ] ^ = * ( ( Q_ UINT32* ) iv [ 0 ] ) ;
( ( Q_ UINT32* ) block ) [ 1 ] ^ = * ( ( Q_ UINT32* ) iv [ 1 ] ) ;
( ( Q_ UINT32* ) block ) [ 2 ] ^ = * ( ( Q_ UINT32* ) iv [ 2 ] ) ;
( ( Q_ UINT32* ) block ) [ 3 ] ^ = * ( ( Q_ UINT32* ) iv [ 3 ] ) ;
# if STRICT_ALIGN
memcpy ( iv , input , 16 ) ;
memcpy ( outBuf , block , 16 ) ;
# else
* ( ( UINT32 * ) iv [ 0 ] ) = ( ( UINT32 * ) input ) [ 0 ] ; ( ( UINT32 * ) outBuffer ) [ 0 ] = ( ( UINT32 * ) block ) [ 0 ] ;
* ( ( UINT32 * ) iv [ 1 ] ) = ( ( UINT32 * ) input ) [ 1 ] ; ( ( UINT32 * ) outBuffer ) [ 1 ] = ( ( UINT32 * ) block ) [ 1 ] ;
* ( ( UINT32 * ) iv [ 2 ] ) = ( ( UINT32 * ) input ) [ 2 ] ; ( ( UINT32 * ) outBuffer ) [ 2 ] = ( ( UINT32 * ) block ) [ 2 ] ;
* ( ( UINT32 * ) iv [ 3 ] ) = ( ( UINT32 * ) input ) [ 3 ] ; ( ( UINT32 * ) outBuffer ) [ 3 ] = ( ( UINT32 * ) block ) [ 3 ] ;
* ( ( Q_ UINT32* ) iv [ 0 ] ) = ( ( Q_ UINT32* ) input ) [ 0 ] ; ( ( Q_ UINT32* ) outBuffer ) [ 0 ] = ( ( Q_ UINT32* ) block ) [ 0 ] ;
* ( ( Q_ UINT32* ) iv [ 1 ] ) = ( ( Q_ UINT32* ) input ) [ 1 ] ; ( ( Q_ UINT32* ) outBuffer ) [ 1 ] = ( ( Q_ UINT32* ) block ) [ 1 ] ;
* ( ( Q_ UINT32* ) iv [ 2 ] ) = ( ( Q_ UINT32* ) input ) [ 2 ] ; ( ( Q_ UINT32* ) outBuffer ) [ 2 ] = ( ( Q_ UINT32* ) block ) [ 2 ] ;
* ( ( Q_ UINT32* ) iv [ 3 ] ) = ( ( Q_ UINT32* ) input ) [ 3 ] ; ( ( Q_ UINT32* ) outBuffer ) [ 3 ] = ( ( Q_ UINT32* ) block ) [ 3 ] ;
# endif
input + = 16 ;
outBuffer + = 16 ;
@ -1236,19 +1236,19 @@ int Rijndael::blockDecrypt(const UINT8 *input, int inputLen, UINT8 *outBuffer)
# if STRICT_ALIGN
memcpy ( iv , m_initVector , 16 ) ;
# else
* ( ( UINT32 * ) iv [ 0 ] ) = * ( ( UINT32 * ) ( m_initVector ) ) ;
* ( ( UINT32 * ) iv [ 1 ] ) = * ( ( UINT32 * ) ( m_initVector + 4 ) ) ;
* ( ( UINT32 * ) iv [ 2 ] ) = * ( ( UINT32 * ) ( m_initVector + 8 ) ) ;
* ( ( UINT32 * ) iv [ 3 ] ) = * ( ( UINT32 * ) ( m_initVector + 12 ) ) ;
* ( ( Q_ UINT32* ) iv [ 0 ] ) = * ( ( Q_ UINT32* ) ( m_initVector ) ) ;
* ( ( Q_ UINT32* ) iv [ 1 ] ) = * ( ( Q_ UINT32* ) ( m_initVector + 4 ) ) ;
* ( ( Q_ UINT32* ) iv [ 2 ] ) = * ( ( Q_ UINT32* ) ( m_initVector + 8 ) ) ;
* ( ( Q_ UINT32* ) iv [ 3 ] ) = * ( ( Q_ UINT32* ) ( m_initVector + 12 ) ) ;
# endif
for ( i = numBlocks ; i > 0 ; i - - )
{
for ( k = 0 ; k < 128 ; k + + )
{
* ( ( UINT32 * ) block ) = * ( ( UINT32 * ) iv [ 0 ] ) ;
* ( ( UINT32 * ) ( block + 4 ) ) = * ( ( UINT32 * ) iv [ 1 ] ) ;
* ( ( UINT32 * ) ( block + 8 ) ) = * ( ( UINT32 * ) iv [ 2 ] ) ;
* ( ( UINT32 * ) ( block + 12 ) ) = * ( ( UINT32 * ) iv [ 3 ] ) ;
* ( ( Q_ UINT32* ) block ) = * ( ( Q_ UINT32* ) iv [ 0 ] ) ;
* ( ( Q_ UINT32* ) ( block + 4 ) ) = * ( ( Q_ UINT32* ) iv [ 1 ] ) ;
* ( ( Q_ UINT32* ) ( block + 8 ) ) = * ( ( Q_ UINT32* ) iv [ 2 ] ) ;
* ( ( Q_ UINT32* ) ( block + 12 ) ) = * ( ( Q_ UINT32* ) iv [ 3 ] ) ;
encrypt ( block , block ) ;
iv [ 0 ] [ 0 ] = ( iv [ 0 ] [ 0 ] < < 1 ) | ( iv [ 0 ] [ 1 ] > > 7 ) ;
iv [ 0 ] [ 1 ] = ( iv [ 0 ] [ 1 ] < < 1 ) | ( iv [ 0 ] [ 2 ] > > 7 ) ;
@ -1278,11 +1278,11 @@ int Rijndael::blockDecrypt(const UINT8 *input, int inputLen, UINT8 *outBuffer)
return 128 * numBlocks ;
}
int Rijndael : : padDecrypt ( const UINT8 * input , int inputOctets , UINT8 * outBuffer )
int Rijndael : : padDecrypt ( const Q_ UINT8 * input , int inputOctets , Q_ UINT8 * outBuffer )
{
int i , numBlocks , padLen ;
UINT8 block [ 16 ] ;
UINT32 iv [ 4 ] ;
Q_ UINT8 block [ 16 ] ;
Q_ UINT32 iv [ 4 ] ;
if ( m_state ! = Valid ) return RIJNDAEL_NOT_INITIALIZED ;
if ( m_direction ! = Decrypt ) return RIJNDAEL_BAD_DIRECTION ;
@ -1317,10 +1317,10 @@ int Rijndael::padDecrypt(const UINT8 *input, int inputOctets, UINT8 *outBuffer)
for ( i = numBlocks - 1 ; i > 0 ; i - - )
{
decrypt ( input , block ) ;
( ( UINT32 * ) block ) [ 0 ] ^ = iv [ 0 ] ;
( ( UINT32 * ) block ) [ 1 ] ^ = iv [ 1 ] ;
( ( UINT32 * ) block ) [ 2 ] ^ = iv [ 2 ] ;
( ( UINT32 * ) block ) [ 3 ] ^ = iv [ 3 ] ;
( ( Q_ UINT32* ) block ) [ 0 ] ^ = iv [ 0 ] ;
( ( Q_ UINT32* ) block ) [ 1 ] ^ = iv [ 1 ] ;
( ( Q_ UINT32* ) block ) [ 2 ] ^ = iv [ 2 ] ;
( ( Q_ UINT32* ) block ) [ 3 ] ^ = iv [ 3 ] ;
memcpy ( iv , input , 16 ) ;
memcpy ( outBuffer , block , 16 ) ;
input + = 16 ;
@ -1328,10 +1328,10 @@ int Rijndael::padDecrypt(const UINT8 *input, int inputOctets, UINT8 *outBuffer)
}
/* last block */
decrypt ( input , block ) ;
( ( UINT32 * ) block ) [ 0 ] ^ = iv [ 0 ] ;
( ( UINT32 * ) block ) [ 1 ] ^ = iv [ 1 ] ;
( ( UINT32 * ) block ) [ 2 ] ^ = iv [ 2 ] ;
( ( UINT32 * ) block ) [ 3 ] ^ = iv [ 3 ] ;
( ( Q_ UINT32* ) block ) [ 0 ] ^ = iv [ 0 ] ;
( ( Q_ UINT32* ) block ) [ 1 ] ^ = iv [ 1 ] ;
( ( Q_ UINT32* ) block ) [ 2 ] ^ = iv [ 2 ] ;
( ( Q_ UINT32* ) block ) [ 3 ] ^ = iv [ 3 ] ;
padLen = block [ 15 ] ;
if ( ( padLen < = 0 ) | | ( padLen > 16 ) ) return RIJNDAEL_CORRUPTED_DATA ;
for ( i = 16 - padLen ; i < 16 ; i + + )
@ -1354,7 +1354,7 @@ int Rijndael::padDecrypt(const UINT8 *input, int inputOctets, UINT8 *outBuffer)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void Rijndael : : keySched ( UINT8 key [ _MAX_KEY_COLUMNS ] [ 4 ] )
void Rijndael : : keySched ( Q_ UINT8 key [ _MAX_KEY_COLUMNS ] [ 4 ] )
{
int j , rconpointer = 0 ;
@ -1362,13 +1362,13 @@ void Rijndael::keySched(UINT8 key[_MAX_KEY_COLUMNS][4])
// The number of calculations depends on keyBits and blockBits
int uKeyColumns = m_uRounds - 6 ;
UINT8 tempKey [ _MAX_KEY_COLUMNS ] [ 4 ] ;
Q_ UINT8 tempKey [ _MAX_KEY_COLUMNS ] [ 4 ] ;
// Copy the input key to the temporary key matrix
for ( j = 0 ; j < uKeyColumns ; j + + )
{
* ( ( UINT32 * ) ( tempKey [ j ] ) ) = * ( ( UINT32 * ) ( key [ j ] ) ) ;
* ( ( Q_ UINT32* ) ( tempKey [ j ] ) ) = * ( ( Q_ UINT32* ) ( key [ j ] ) ) ;
}
int r = 0 ;
@ -1379,7 +1379,7 @@ void Rijndael::keySched(UINT8 key[_MAX_KEY_COLUMNS][4])
{
for ( ; ( j < uKeyColumns ) & & ( t < 4 ) ; j + + , t + + )
{
* ( ( UINT32 * ) m_expandedKey [ r ] [ t ] ) = * ( ( UINT32 * ) tempKey [ j ] ) ;
* ( ( Q_ UINT32* ) m_expandedKey [ r ] [ t ] ) = * ( ( Q_ UINT32* ) tempKey [ j ] ) ;
}
@ -1402,12 +1402,12 @@ void Rijndael::keySched(UINT8 key[_MAX_KEY_COLUMNS][4])
{
for ( j = 1 ; j < uKeyColumns ; j + + )
{
* ( ( UINT32 * ) tempKey [ j ] ) ^ = * ( ( UINT32 * ) tempKey [ j - 1 ] ) ;
* ( ( Q_ UINT32* ) tempKey [ j ] ) ^ = * ( ( Q_ UINT32* ) tempKey [ j - 1 ] ) ;
}
} else {
for ( j = 1 ; j < uKeyColumns / 2 ; j + + )
{
* ( ( UINT32 * ) tempKey [ j ] ) ^ = * ( ( UINT32 * ) tempKey [ j - 1 ] ) ;
* ( ( Q_ UINT32* ) tempKey [ j ] ) ^ = * ( ( Q_ UINT32* ) tempKey [ j - 1 ] ) ;
}
tempKey [ uKeyColumns / 2 ] [ 0 ] ^ = S [ tempKey [ uKeyColumns / 2 - 1 ] [ 0 ] ] ;
tempKey [ uKeyColumns / 2 ] [ 1 ] ^ = S [ tempKey [ uKeyColumns / 2 - 1 ] [ 1 ] ] ;
@ -1415,14 +1415,14 @@ void Rijndael::keySched(UINT8 key[_MAX_KEY_COLUMNS][4])
tempKey [ uKeyColumns / 2 ] [ 3 ] ^ = S [ tempKey [ uKeyColumns / 2 - 1 ] [ 3 ] ] ;
for ( j = uKeyColumns / 2 + 1 ; j < uKeyColumns ; j + + )
{
* ( ( UINT32 * ) tempKey [ j ] ) ^ = * ( ( UINT32 * ) tempKey [ j - 1 ] ) ;
* ( ( Q_ UINT32* ) tempKey [ j ] ) ^ = * ( ( Q_ UINT32* ) tempKey [ j - 1 ] ) ;
}
}
for ( j = 0 ; ( j < uKeyColumns ) & & ( r < = ( int ) m_uRounds ) ; )
{
for ( ; ( j < uKeyColumns ) & & ( t < 4 ) ; j + + , t + + )
{
* ( ( UINT32 * ) m_expandedKey [ r ] [ t ] ) = * ( ( UINT32 * ) tempKey [ j ] ) ;
* ( ( Q_ UINT32* ) m_expandedKey [ r ] [ t ] ) = * ( ( Q_ UINT32* ) tempKey [ j ] ) ;
}
if ( t = = 4 )
{
@ -1436,74 +1436,74 @@ void Rijndael::keySched(UINT8 key[_MAX_KEY_COLUMNS][4])
void Rijndael : : keyEncToDec ( )
{
int r ;
UINT8 * w ;
Q_ UINT8 * w ;
for ( r = 1 ; r < ( int ) m_uRounds ; r + + )
{
w = m_expandedKey [ r ] [ 0 ] ;
* ( ( UINT32 * ) w ) = * ( ( UINT32 * ) U1 [ w [ 0 ] ] ) ^ * ( ( UINT32 * ) U2 [ w [ 1 ] ] ) ^ * ( ( UINT32 * ) U3 [ w [ 2 ] ] ) ^ * ( ( UINT32 * ) U4 [ w [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) w ) = * ( ( Q_ UINT32* ) U1 [ w [ 0 ] ] ) ^ * ( ( Q_ UINT32* ) U2 [ w [ 1 ] ] ) ^ * ( ( Q_ UINT32* ) U3 [ w [ 2 ] ] ) ^ * ( ( Q_ UINT32* ) U4 [ w [ 3 ] ] ) ;
w = m_expandedKey [ r ] [ 1 ] ;
* ( ( UINT32 * ) w ) = * ( ( UINT32 * ) U1 [ w [ 0 ] ] ) ^ * ( ( UINT32 * ) U2 [ w [ 1 ] ] ) ^ * ( ( UINT32 * ) U3 [ w [ 2 ] ] ) ^ * ( ( UINT32 * ) U4 [ w [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) w ) = * ( ( Q_ UINT32* ) U1 [ w [ 0 ] ] ) ^ * ( ( Q_ UINT32* ) U2 [ w [ 1 ] ] ) ^ * ( ( Q_ UINT32* ) U3 [ w [ 2 ] ] ) ^ * ( ( Q_ UINT32* ) U4 [ w [ 3 ] ] ) ;
w = m_expandedKey [ r ] [ 2 ] ;
* ( ( UINT32 * ) w ) = * ( ( UINT32 * ) U1 [ w [ 0 ] ] ) ^ * ( ( UINT32 * ) U2 [ w [ 1 ] ] ) ^ * ( ( UINT32 * ) U3 [ w [ 2 ] ] ) ^ * ( ( UINT32 * ) U4 [ w [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) w ) = * ( ( Q_ UINT32* ) U1 [ w [ 0 ] ] ) ^ * ( ( Q_ UINT32* ) U2 [ w [ 1 ] ] ) ^ * ( ( Q_ UINT32* ) U3 [ w [ 2 ] ] ) ^ * ( ( Q_ UINT32* ) U4 [ w [ 3 ] ] ) ;
w = m_expandedKey [ r ] [ 3 ] ;
* ( ( UINT32 * ) w ) = * ( ( UINT32 * ) U1 [ w [ 0 ] ] ) ^ * ( ( UINT32 * ) U2 [ w [ 1 ] ] ) ^ * ( ( UINT32 * ) U3 [ w [ 2 ] ] ) ^ * ( ( UINT32 * ) U4 [ w [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) w ) = * ( ( Q_ UINT32* ) U1 [ w [ 0 ] ] ) ^ * ( ( Q_ UINT32* ) U2 [ w [ 1 ] ] ) ^ * ( ( Q_ UINT32* ) U3 [ w [ 2 ] ] ) ^ * ( ( Q_ UINT32* ) U4 [ w [ 3 ] ] ) ;
}
}
void Rijndael : : encrypt ( const UINT8 a [ 16 ] , UINT8 b [ 16 ] )
void Rijndael : : encrypt ( const Q_ UINT8 a [ 16 ] , Q_ UINT8 b [ 16 ] )
{
int r ;
UINT8 temp [ 4 ] [ 4 ] ;
* ( ( UINT32 * ) temp [ 0 ] ) = * ( ( UINT32 * ) ( a ) ) ^ * ( ( UINT32 * ) m_expandedKey [ 0 ] [ 0 ] ) ;
* ( ( UINT32 * ) temp [ 1 ] ) = * ( ( UINT32 * ) ( a + 4 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ 0 ] [ 1 ] ) ;
* ( ( UINT32 * ) temp [ 2 ] ) = * ( ( UINT32 * ) ( a + 8 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ 0 ] [ 2 ] ) ;
* ( ( UINT32 * ) temp [ 3 ] ) = * ( ( UINT32 * ) ( a + 12 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ 0 ] [ 3 ] ) ;
* ( ( UINT32 * ) ( b ) ) = * ( ( UINT32 * ) T1 [ temp [ 0 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T2 [ temp [ 1 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T3 [ temp [ 2 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T4 [ temp [ 3 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 4 ) ) = * ( ( UINT32 * ) T1 [ temp [ 1 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T2 [ temp [ 2 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T3 [ temp [ 3 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T4 [ temp [ 0 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 8 ) ) = * ( ( UINT32 * ) T1 [ temp [ 2 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T2 [ temp [ 3 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T3 [ temp [ 0 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T4 [ temp [ 1 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 12 ) ) = * ( ( UINT32 * ) T1 [ temp [ 3 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T2 [ temp [ 0 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T3 [ temp [ 1 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T4 [ temp [ 2 ] [ 3 ] ] ) ;
Q_ UINT8 temp [ 4 ] [ 4 ] ;
* ( ( Q_ UINT32* ) temp [ 0 ] ) = * ( ( Q_ UINT32* ) ( a ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ 0 ] [ 0 ] ) ;
* ( ( Q_ UINT32* ) temp [ 1 ] ) = * ( ( Q_ UINT32* ) ( a + 4 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ 0 ] [ 1 ] ) ;
* ( ( Q_ UINT32* ) temp [ 2 ] ) = * ( ( Q_ UINT32* ) ( a + 8 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ 0 ] [ 2 ] ) ;
* ( ( Q_ UINT32* ) temp [ 3 ] ) = * ( ( Q_ UINT32* ) ( a + 12 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ 0 ] [ 3 ] ) ;
* ( ( Q_ UINT32* ) ( b ) ) = * ( ( Q_ UINT32* ) T1 [ temp [ 0 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T2 [ temp [ 1 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T3 [ temp [ 2 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T4 [ temp [ 3 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 4 ) ) = * ( ( Q_ UINT32* ) T1 [ temp [ 1 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T2 [ temp [ 2 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T3 [ temp [ 3 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T4 [ temp [ 0 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 8 ) ) = * ( ( Q_ UINT32* ) T1 [ temp [ 2 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T2 [ temp [ 3 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T3 [ temp [ 0 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T4 [ temp [ 1 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 12 ) ) = * ( ( Q_ UINT32* ) T1 [ temp [ 3 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T2 [ temp [ 0 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T3 [ temp [ 1 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T4 [ temp [ 2 ] [ 3 ] ] ) ;
for ( r = 1 ; r < ( int ) m_uRounds - 1 ; r + + )
{
* ( ( UINT32 * ) temp [ 0 ] ) = * ( ( UINT32 * ) ( b ) ) ^ * ( ( UINT32 * ) m_expandedKey [ r ] [ 0 ] ) ;
* ( ( UINT32 * ) temp [ 1 ] ) = * ( ( UINT32 * ) ( b + 4 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ r ] [ 1 ] ) ;
* ( ( UINT32 * ) temp [ 2 ] ) = * ( ( UINT32 * ) ( b + 8 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ r ] [ 2 ] ) ;
* ( ( UINT32 * ) temp [ 3 ] ) = * ( ( UINT32 * ) ( b + 12 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ r ] [ 3 ] ) ;
* ( ( UINT32 * ) ( b ) ) = * ( ( UINT32 * ) T1 [ temp [ 0 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T2 [ temp [ 1 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T3 [ temp [ 2 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T4 [ temp [ 3 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 4 ) ) = * ( ( UINT32 * ) T1 [ temp [ 1 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T2 [ temp [ 2 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T3 [ temp [ 3 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T4 [ temp [ 0 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 8 ) ) = * ( ( UINT32 * ) T1 [ temp [ 2 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T2 [ temp [ 3 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T3 [ temp [ 0 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T4 [ temp [ 1 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 12 ) ) = * ( ( UINT32 * ) T1 [ temp [ 3 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T2 [ temp [ 0 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T3 [ temp [ 1 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T4 [ temp [ 2 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) temp [ 0 ] ) = * ( ( Q_ UINT32* ) ( b ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ r ] [ 0 ] ) ;
* ( ( Q_ UINT32* ) temp [ 1 ] ) = * ( ( Q_ UINT32* ) ( b + 4 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ r ] [ 1 ] ) ;
* ( ( Q_ UINT32* ) temp [ 2 ] ) = * ( ( Q_ UINT32* ) ( b + 8 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ r ] [ 2 ] ) ;
* ( ( Q_ UINT32* ) temp [ 3 ] ) = * ( ( Q_ UINT32* ) ( b + 12 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ r ] [ 3 ] ) ;
* ( ( Q_ UINT32* ) ( b ) ) = * ( ( Q_ UINT32* ) T1 [ temp [ 0 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T2 [ temp [ 1 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T3 [ temp [ 2 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T4 [ temp [ 3 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 4 ) ) = * ( ( Q_ UINT32* ) T1 [ temp [ 1 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T2 [ temp [ 2 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T3 [ temp [ 3 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T4 [ temp [ 0 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 8 ) ) = * ( ( Q_ UINT32* ) T1 [ temp [ 2 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T2 [ temp [ 3 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T3 [ temp [ 0 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T4 [ temp [ 1 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 12 ) ) = * ( ( Q_ UINT32* ) T1 [ temp [ 3 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T2 [ temp [ 0 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T3 [ temp [ 1 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T4 [ temp [ 2 ] [ 3 ] ] ) ;
}
* ( ( UINT32 * ) temp [ 0 ] ) = * ( ( UINT32 * ) ( b ) ) ^ * ( ( UINT32 * ) m_expandedKey [ m_uRounds - 1 ] [ 0 ] ) ;
* ( ( UINT32 * ) temp [ 1 ] ) = * ( ( UINT32 * ) ( b + 4 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ m_uRounds - 1 ] [ 1 ] ) ;
* ( ( UINT32 * ) temp [ 2 ] ) = * ( ( UINT32 * ) ( b + 8 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ m_uRounds - 1 ] [ 2 ] ) ;
* ( ( UINT32 * ) temp [ 3 ] ) = * ( ( UINT32 * ) ( b + 12 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ m_uRounds - 1 ] [ 3 ] ) ;
* ( ( Q_ UINT32* ) temp [ 0 ] ) = * ( ( Q_ UINT32* ) ( b ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds - 1 ] [ 0 ] ) ;
* ( ( Q_ UINT32* ) temp [ 1 ] ) = * ( ( Q_ UINT32* ) ( b + 4 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds - 1 ] [ 1 ] ) ;
* ( ( Q_ UINT32* ) temp [ 2 ] ) = * ( ( Q_ UINT32* ) ( b + 8 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds - 1 ] [ 2 ] ) ;
* ( ( Q_ UINT32* ) temp [ 3 ] ) = * ( ( Q_ UINT32* ) ( b + 12 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds - 1 ] [ 3 ] ) ;
b [ 0 ] = T1 [ temp [ 0 ] [ 0 ] ] [ 1 ] ;
b [ 1 ] = T1 [ temp [ 1 ] [ 1 ] ] [ 1 ] ;
b [ 2 ] = T1 [ temp [ 2 ] [ 2 ] ] [ 1 ] ;
@ -1520,66 +1520,66 @@ void Rijndael::encrypt(const UINT8 a[16], UINT8 b[16])
b [ 13 ] = T1 [ temp [ 0 ] [ 1 ] ] [ 1 ] ;
b [ 14 ] = T1 [ temp [ 1 ] [ 2 ] ] [ 1 ] ;
b [ 15 ] = T1 [ temp [ 2 ] [ 3 ] ] [ 1 ] ;
* ( ( UINT32 * ) ( b ) ) ^ = * ( ( UINT32 * ) m_expandedKey [ m_uRounds ] [ 0 ] ) ;
* ( ( UINT32 * ) ( b + 4 ) ) ^ = * ( ( UINT32 * ) m_expandedKey [ m_uRounds ] [ 1 ] ) ;
* ( ( UINT32 * ) ( b + 8 ) ) ^ = * ( ( UINT32 * ) m_expandedKey [ m_uRounds ] [ 2 ] ) ;
* ( ( UINT32 * ) ( b + 12 ) ) ^ = * ( ( UINT32 * ) m_expandedKey [ m_uRounds ] [ 3 ] ) ;
* ( ( Q_ UINT32* ) ( b ) ) ^ = * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds ] [ 0 ] ) ;
* ( ( Q_ UINT32* ) ( b + 4 ) ) ^ = * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds ] [ 1 ] ) ;
* ( ( Q_ UINT32* ) ( b + 8 ) ) ^ = * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds ] [ 2 ] ) ;
* ( ( Q_ UINT32* ) ( b + 12 ) ) ^ = * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds ] [ 3 ] ) ;
}
void Rijndael : : decrypt ( const UINT8 a [ 16 ] , UINT8 b [ 16 ] )
void Rijndael : : decrypt ( const Q_ UINT8 a [ 16 ] , Q_ UINT8 b [ 16 ] )
{
int r ;
UINT8 temp [ 4 ] [ 4 ] ;
* ( ( UINT32 * ) temp [ 0 ] ) = * ( ( UINT32 * ) ( a ) ) ^ * ( ( UINT32 * ) m_expandedKey [ m_uRounds ] [ 0 ] ) ;
* ( ( UINT32 * ) temp [ 1 ] ) = * ( ( UINT32 * ) ( a + 4 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ m_uRounds ] [ 1 ] ) ;
* ( ( UINT32 * ) temp [ 2 ] ) = * ( ( UINT32 * ) ( a + 8 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ m_uRounds ] [ 2 ] ) ;
* ( ( UINT32 * ) temp [ 3 ] ) = * ( ( UINT32 * ) ( a + 12 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ m_uRounds ] [ 3 ] ) ;
* ( ( UINT32 * ) ( b ) ) = * ( ( UINT32 * ) T5 [ temp [ 0 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T6 [ temp [ 3 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T7 [ temp [ 2 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T8 [ temp [ 1 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 4 ) ) = * ( ( UINT32 * ) T5 [ temp [ 1 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T6 [ temp [ 0 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T7 [ temp [ 3 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T8 [ temp [ 2 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 8 ) ) = * ( ( UINT32 * ) T5 [ temp [ 2 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T6 [ temp [ 1 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T7 [ temp [ 0 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T8 [ temp [ 3 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 12 ) ) = * ( ( UINT32 * ) T5 [ temp [ 3 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T6 [ temp [ 2 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T7 [ temp [ 1 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T8 [ temp [ 0 ] [ 3 ] ] ) ;
Q_ UINT8 temp [ 4 ] [ 4 ] ;
* ( ( Q_ UINT32* ) temp [ 0 ] ) = * ( ( Q_ UINT32* ) ( a ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds ] [ 0 ] ) ;
* ( ( Q_ UINT32* ) temp [ 1 ] ) = * ( ( Q_ UINT32* ) ( a + 4 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds ] [ 1 ] ) ;
* ( ( Q_ UINT32* ) temp [ 2 ] ) = * ( ( Q_ UINT32* ) ( a + 8 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds ] [ 2 ] ) ;
* ( ( Q_ UINT32* ) temp [ 3 ] ) = * ( ( Q_ UINT32* ) ( a + 12 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ m_uRounds ] [ 3 ] ) ;
* ( ( Q_ UINT32* ) ( b ) ) = * ( ( Q_ UINT32* ) T5 [ temp [ 0 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T6 [ temp [ 3 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T7 [ temp [ 2 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T8 [ temp [ 1 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 4 ) ) = * ( ( Q_ UINT32* ) T5 [ temp [ 1 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T6 [ temp [ 0 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T7 [ temp [ 3 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T8 [ temp [ 2 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 8 ) ) = * ( ( Q_ UINT32* ) T5 [ temp [ 2 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T6 [ temp [ 1 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T7 [ temp [ 0 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T8 [ temp [ 3 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 12 ) ) = * ( ( Q_ UINT32* ) T5 [ temp [ 3 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T6 [ temp [ 2 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T7 [ temp [ 1 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T8 [ temp [ 0 ] [ 3 ] ] ) ;
for ( r = m_uRounds - 1 ; r > 1 ; r - - )
{
* ( ( UINT32 * ) temp [ 0 ] ) = * ( ( UINT32 * ) ( b ) ) ^ * ( ( UINT32 * ) m_expandedKey [ r ] [ 0 ] ) ;
* ( ( UINT32 * ) temp [ 1 ] ) = * ( ( UINT32 * ) ( b + 4 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ r ] [ 1 ] ) ;
* ( ( UINT32 * ) temp [ 2 ] ) = * ( ( UINT32 * ) ( b + 8 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ r ] [ 2 ] ) ;
* ( ( UINT32 * ) temp [ 3 ] ) = * ( ( UINT32 * ) ( b + 12 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ r ] [ 3 ] ) ;
* ( ( UINT32 * ) ( b ) ) = * ( ( UINT32 * ) T5 [ temp [ 0 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T6 [ temp [ 3 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T7 [ temp [ 2 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T8 [ temp [ 1 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 4 ) ) = * ( ( UINT32 * ) T5 [ temp [ 1 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T6 [ temp [ 0 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T7 [ temp [ 3 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T8 [ temp [ 2 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 8 ) ) = * ( ( UINT32 * ) T5 [ temp [ 2 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T6 [ temp [ 1 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T7 [ temp [ 0 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T8 [ temp [ 3 ] [ 3 ] ] ) ;
* ( ( UINT32 * ) ( b + 12 ) ) = * ( ( UINT32 * ) T5 [ temp [ 3 ] [ 0 ] ] )
^ * ( ( UINT32 * ) T6 [ temp [ 2 ] [ 1 ] ] )
^ * ( ( UINT32 * ) T7 [ temp [ 1 ] [ 2 ] ] )
^ * ( ( UINT32 * ) T8 [ temp [ 0 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) temp [ 0 ] ) = * ( ( Q_ UINT32* ) ( b ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ r ] [ 0 ] ) ;
* ( ( Q_ UINT32* ) temp [ 1 ] ) = * ( ( Q_ UINT32* ) ( b + 4 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ r ] [ 1 ] ) ;
* ( ( Q_ UINT32* ) temp [ 2 ] ) = * ( ( Q_ UINT32* ) ( b + 8 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ r ] [ 2 ] ) ;
* ( ( Q_ UINT32* ) temp [ 3 ] ) = * ( ( Q_ UINT32* ) ( b + 12 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ r ] [ 3 ] ) ;
* ( ( Q_ UINT32* ) ( b ) ) = * ( ( Q_ UINT32* ) T5 [ temp [ 0 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T6 [ temp [ 3 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T7 [ temp [ 2 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T8 [ temp [ 1 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 4 ) ) = * ( ( Q_ UINT32* ) T5 [ temp [ 1 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T6 [ temp [ 0 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T7 [ temp [ 3 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T8 [ temp [ 2 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 8 ) ) = * ( ( Q_ UINT32* ) T5 [ temp [ 2 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T6 [ temp [ 1 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T7 [ temp [ 0 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T8 [ temp [ 3 ] [ 3 ] ] ) ;
* ( ( Q_ UINT32* ) ( b + 12 ) ) = * ( ( Q_ UINT32* ) T5 [ temp [ 3 ] [ 0 ] ] )
^ * ( ( Q_ UINT32* ) T6 [ temp [ 2 ] [ 1 ] ] )
^ * ( ( Q_ UINT32* ) T7 [ temp [ 1 ] [ 2 ] ] )
^ * ( ( Q_ UINT32* ) T8 [ temp [ 0 ] [ 3 ] ] ) ;
}
* ( ( UINT32 * ) temp [ 0 ] ) = * ( ( UINT32 * ) ( b ) ) ^ * ( ( UINT32 * ) m_expandedKey [ 1 ] [ 0 ] ) ;
* ( ( UINT32 * ) temp [ 1 ] ) = * ( ( UINT32 * ) ( b + 4 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ 1 ] [ 1 ] ) ;
* ( ( UINT32 * ) temp [ 2 ] ) = * ( ( UINT32 * ) ( b + 8 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ 1 ] [ 2 ] ) ;
* ( ( UINT32 * ) temp [ 3 ] ) = * ( ( UINT32 * ) ( b + 12 ) ) ^ * ( ( UINT32 * ) m_expandedKey [ 1 ] [ 3 ] ) ;
* ( ( Q_ UINT32* ) temp [ 0 ] ) = * ( ( Q_ UINT32* ) ( b ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ 1 ] [ 0 ] ) ;
* ( ( Q_ UINT32* ) temp [ 1 ] ) = * ( ( Q_ UINT32* ) ( b + 4 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ 1 ] [ 1 ] ) ;
* ( ( Q_ UINT32* ) temp [ 2 ] ) = * ( ( Q_ UINT32* ) ( b + 8 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ 1 ] [ 2 ] ) ;
* ( ( Q_ UINT32* ) temp [ 3 ] ) = * ( ( Q_ UINT32* ) ( b + 12 ) ) ^ * ( ( Q_ UINT32* ) m_expandedKey [ 1 ] [ 3 ] ) ;
b [ 0 ] = S5 [ temp [ 0 ] [ 0 ] ] ;
b [ 1 ] = S5 [ temp [ 3 ] [ 1 ] ] ;
b [ 2 ] = S5 [ temp [ 2 ] [ 2 ] ] ;
@ -1596,10 +1596,10 @@ void Rijndael::decrypt(const UINT8 a[16], UINT8 b[16])
b [ 13 ] = S5 [ temp [ 2 ] [ 1 ] ] ;
b [ 14 ] = S5 [ temp [ 1 ] [ 2 ] ] ;
b [ 15 ] = S5 [ temp [ 0 ] [ 3 ] ] ;
* ( ( UINT32 * ) ( b ) ) ^ = * ( ( UINT32 * ) m_expandedKey [ 0 ] [ 0 ] ) ;
* ( ( UINT32 * ) ( b + 4 ) ) ^ = * ( ( UINT32 * ) m_expandedKey [ 0 ] [ 1 ] ) ;
* ( ( UINT32 * ) ( b + 8 ) ) ^ = * ( ( UINT32 * ) m_expandedKey [ 0 ] [ 2 ] ) ;
* ( ( UINT32 * ) ( b + 12 ) ) ^ = * ( ( UINT32 * ) m_expandedKey [ 0 ] [ 3 ] ) ;
* ( ( Q_ UINT32* ) ( b ) ) ^ = * ( ( Q_ UINT32* ) m_expandedKey [ 0 ] [ 0 ] ) ;
* ( ( Q_ UINT32* ) ( b + 4 ) ) ^ = * ( ( Q_ UINT32* ) m_expandedKey [ 0 ] [ 1 ] ) ;
* ( ( Q_ UINT32* ) ( b + 8 ) ) ^ = * ( ( Q_ UINT32* ) m_expandedKey [ 0 ] [ 2 ] ) ;
* ( ( Q_ UINT32* ) ( b + 12 ) ) ^ = * ( ( Q_ UINT32* ) m_expandedKey [ 0 ] [ 3 ] ) ;
}