@@ -12751,22 +12751,21 @@ static int AesXtsEncryptUpdate_sw(XtsAes* xaes, byte* out, const byte* in,
1275112751 word32 blocks = (sz / AES_BLOCK_SIZE );
1275212752 Aes * aes = & xaes - > aes ;
1275312753
12754- #if 0 && defined( HAVE_AES_ECB )
12754+ #ifdef HAVE_AES_ECB
1275512755 /* encrypt all of buffer at once when possible */
12756- if (( in != out ) && (( sz & ( AES_BLOCK_SIZE - 1 )) == 0 ) ) { /* can not handle inline */
12756+ if (in != out ) { /* can not handle inline */
1275712757 XMEMCPY (out , i , AES_BLOCK_SIZE );
1275812758 if ((ret = _AesXtsHelper (aes , out , in , sz , AES_ENCRYPTION )) != 0 )
1275912759 return ret ;
12760- XMEMCPY (i , out + sz - AES_BLOCK_SIZE , AES_BLOCK_SIZE );
1276112760 }
1276212761#endif
1276312762
1276412763 while (blocks > 0 ) {
1276512764 word32 j ;
1276612765 byte carry = 0 ;
1276712766
12768- #if 0 && defined( HAVE_AES_ECB )
12769- if (( in == out ) || (( sz & ( AES_BLOCK_SIZE - 1 )) != 0 ) )
12767+ #ifdef HAVE_AES_ECB
12768+ if (in == out )
1277012769#endif
1277112770 { /* check for if inline */
1277212771 byte buf [AES_BLOCK_SIZE ];
@@ -13199,19 +13198,18 @@ static int AesXtsDecryptUpdate_sw(XtsAes* xaes, byte* out, const byte* in,
1319913198 blocks -- ;
1320013199 }
1320113200
13202- #if 0 && defined( HAVE_AES_ECB )
13201+ #ifdef HAVE_AES_ECB
1320313202 /* decrypt all of buffer at once when possible */
13204- if (( in != out ) && (( sz & ( AES_BLOCK_SIZE - 1 )) == 0 ) ) { /* can not handle inline */
13203+ if (in != out ) { /* can not handle inline */
1320513204 XMEMCPY (out , i , AES_BLOCK_SIZE );
1320613205 if ((ret = _AesXtsHelper (aes , out , in , sz , AES_DECRYPTION )) != 0 )
1320713206 return ret ;
13208- XMEMCPY (i , out + sz - AES_BLOCK_SIZE , AES_BLOCK_SIZE );
1320913207 }
1321013208#endif
1321113209
1321213210 while (blocks > 0 ) {
13213- #if 0 && defined( HAVE_AES_ECB )
13214- if (( in == out ) || (( sz & ( AES_BLOCK_SIZE - 1 )) != 0 ) )
13211+ #ifdef HAVE_AES_ECB
13212+ if (in == out )
1321513213#endif
1321613214 { /* check for if inline */
1321713215 byte buf [AES_BLOCK_SIZE ];
0 commit comments