Changeset 1201 for trunk/library/aes.c
- Timestamp:
- 02/12/12 18:31:04 (3 months ago)
- File:
-
- 1 edited
-
trunk/library/aes.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/library/aes.c
r1052 r1201 58 58 (b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \ 59 59 } 60 #endif 61 62 #if defined(POLARSSL_PADLOCK_C) 63 static int aes_padlock_ace = -1; 60 64 #endif 61 65 … … 450 454 aes_gen_tables(); 451 455 aes_init_done = 1; 456 452 457 } 453 458 #endif … … 461 466 } 462 467 463 #if defined(PADLOCK_ALIGN16) 464 ctx->rk = RK = PADLOCK_ALIGN16( ctx->buf ); 465 #else 468 #if defined(POLARSSL_PADLOCK_C) && defined(PADLOCK_ALIGN16) 469 if( aes_padlock_ace == -1 ) 470 aes_padlock_ace = padlock_supports( PADLOCK_ACE ); 471 472 if( aes_padlock_ace ) 473 ctx->rk = RK = PADLOCK_ALIGN16( ctx->buf ); 474 else 475 #endif 466 476 ctx->rk = RK = ctx->buf; 467 #endif468 477 469 478 for( i = 0; i < (keysize >> 5); i++ ) … … 561 570 } 562 571 563 #if defined(PADLOCK_ALIGN16) 564 ctx->rk = RK = PADLOCK_ALIGN16( ctx->buf ); 565 #else 572 #if defined(POLARSSL_PADLOCK_C) && defined(PADLOCK_ALIGN16) 573 if( aes_padlock_ace == -1 ) 574 aes_padlock_ace = padlock_supports( PADLOCK_ACE ); 575 576 if( aes_padlock_ace ) 577 ctx->rk = RK = PADLOCK_ALIGN16( ctx->buf ); 578 else 579 #endif 566 580 ctx->rk = RK = ctx->buf; 567 #endif568 581 569 582 ret = aes_setkey_enc( &cty, key, keysize ); … … 657 670 658 671 #if defined(POLARSSL_PADLOCK_C) && defined(POLARSSL_HAVE_X86) 659 if( padlock_supports( PADLOCK_ACE ))672 if( aes_padlock_ace ) 660 673 { 661 674 if( padlock_xcryptecb( ctx, mode, input, output ) == 0 ) … … 769 782 770 783 #if defined(POLARSSL_PADLOCK_C) && defined(POLARSSL_HAVE_X86) 771 if( padlock_supports( PADLOCK_ACE ))784 if( aes_padlock_ace ) 772 785 { 773 786 if( padlock_xcryptcbc( ctx, mode, length, iv, input, output ) == 0 )
Note: See TracChangeset
for help on using the changeset viewer.


