Reformat AES changes for readability
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
This commit is contained in:
parent
6d71944f0d
commit
7656a373b6
1 changed files with 2 additions and 4 deletions
|
@ -550,15 +550,14 @@ int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ctx->rk_offset = 0;
|
||||||
#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_PADLOCK_ALIGN16)
|
#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_PADLOCK_ALIGN16)
|
||||||
if( aes_padlock_ace == -1 )
|
if( aes_padlock_ace == -1 )
|
||||||
aes_padlock_ace = mbedtls_padlock_has_support( MBEDTLS_PADLOCK_ACE );
|
aes_padlock_ace = mbedtls_padlock_has_support( MBEDTLS_PADLOCK_ACE );
|
||||||
|
|
||||||
if( aes_padlock_ace )
|
if( aes_padlock_ace )
|
||||||
ctx->rk_offset = MBEDTLS_PADLOCK_ALIGN16( ctx->buf ) - ctx->buf;
|
ctx->rk_offset = MBEDTLS_PADLOCK_ALIGN16( ctx->buf ) - ctx->buf;
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
ctx->rk_offset = 0;
|
|
||||||
RK = ctx->buf + ctx->rk_offset;
|
RK = ctx->buf + ctx->rk_offset;
|
||||||
|
|
||||||
#if defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_HAVE_X86_64)
|
#if defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_HAVE_X86_64)
|
||||||
|
@ -655,15 +654,14 @@ int mbedtls_aes_setkey_dec( mbedtls_aes_context *ctx, const unsigned char *key,
|
||||||
|
|
||||||
mbedtls_aes_init( &cty );
|
mbedtls_aes_init( &cty );
|
||||||
|
|
||||||
|
ctx->rk_offset = 0;
|
||||||
#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_PADLOCK_ALIGN16)
|
#if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_PADLOCK_ALIGN16)
|
||||||
if( aes_padlock_ace == -1 )
|
if( aes_padlock_ace == -1 )
|
||||||
aes_padlock_ace = mbedtls_padlock_has_support( MBEDTLS_PADLOCK_ACE );
|
aes_padlock_ace = mbedtls_padlock_has_support( MBEDTLS_PADLOCK_ACE );
|
||||||
|
|
||||||
if( aes_padlock_ace )
|
if( aes_padlock_ace )
|
||||||
ctx->rk_offset = MBEDTLS_PADLOCK_ALIGN16( ctx->buf ) - ctx->buf;
|
ctx->rk_offset = MBEDTLS_PADLOCK_ALIGN16( ctx->buf ) - ctx->buf;
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
ctx->rk_offset = 0;
|
|
||||||
RK = ctx->buf + ctx->rk_offset;
|
RK = ctx->buf + ctx->rk_offset;
|
||||||
|
|
||||||
/* Also checks keybits */
|
/* Also checks keybits */
|
||||||
|
|
Loading…
Reference in a new issue