@@ -42,7 +42,6 @@ Mean: 500 cycles = 51.2 mbits/sec
42
42
43
43
#include <sys/param.h>
44
44
#include <string.h>
45
- #include <stdint.h>
46
45
47
46
#include "storage/rijndael.h"
48
47
@@ -500,23 +499,23 @@ rijndael_decrypt(rijndael_ctx *ctx, const u4byte *in_blk, u4byte *out_blk)
500
499
*/
501
500
502
501
void
503
- aes_set_key (rijndael_ctx * ctx , const uint8_t * key , unsigned keybits , int enc )
502
+ aes_set_key (rijndael_ctx * ctx , const uint8 * key , unsigned keybits , int enc )
504
503
{
505
- uint32_t * k ;
504
+ uint32 * k ;
506
505
507
- k = (uint32_t * ) key ;
506
+ k = (uint32 * ) key ;
508
507
rijndael_set_key (ctx , k , keybits , enc );
509
508
}
510
509
511
510
void
512
- aes_ecb_encrypt (rijndael_ctx * ctx , uint8_t * data , unsigned len )
511
+ aes_ecb_encrypt (rijndael_ctx * ctx , uint8 * data , unsigned len )
513
512
{
514
513
unsigned bs = 16 ;
515
- uint32_t * d ;
514
+ uint32 * d ;
516
515
517
516
while (len >= bs )
518
517
{
519
- d = (uint32_t * ) data ;
518
+ d = (uint32 * ) data ;
520
519
rijndael_encrypt (ctx , d , d );
521
520
522
521
len -= bs ;
@@ -525,14 +524,14 @@ aes_ecb_encrypt(rijndael_ctx *ctx, uint8_t *data, unsigned len)
525
524
}
526
525
527
526
void
528
- aes_ecb_decrypt (rijndael_ctx * ctx , uint8_t * data , unsigned len )
527
+ aes_ecb_decrypt (rijndael_ctx * ctx , uint8 * data , unsigned len )
529
528
{
530
529
unsigned bs = 16 ;
531
- uint32_t * d ;
530
+ uint32 * d ;
532
531
533
532
while (len >= bs )
534
533
{
535
- d = (uint32_t * ) data ;
534
+ d = (uint32 * ) data ;
536
535
rijndael_decrypt (ctx , d , d );
537
536
538
537
len -= bs ;
@@ -541,10 +540,10 @@ aes_ecb_decrypt(rijndael_ctx *ctx, uint8_t *data, unsigned len)
541
540
}
542
541
543
542
void
544
- aes_cbc_encrypt (rijndael_ctx * ctx , uint8_t * iva , uint8_t * data , unsigned len )
543
+ aes_cbc_encrypt (rijndael_ctx * ctx , uint8 * iva , uint8 * data , unsigned len )
545
544
{
546
- uint32_t * iv = (uint32_t * ) iva ;
547
- uint32_t * d = (uint32_t * ) data ;
545
+ uint32 * iv = (uint32 * ) iva ;
546
+ uint32 * d = (uint32 * ) data ;
548
547
unsigned bs = 16 ;
549
548
550
549
while (len >= bs )
@@ -563,11 +562,11 @@ aes_cbc_encrypt(rijndael_ctx *ctx, uint8_t *iva, uint8_t *data, unsigned len)
563
562
}
564
563
565
564
void
566
- aes_cbc_decrypt (rijndael_ctx * ctx , uint8_t * iva , uint8_t * data , unsigned len )
565
+ aes_cbc_decrypt (rijndael_ctx * ctx , uint8 * iva , uint8 * data , unsigned len )
567
566
{
568
- uint32_t * d = (uint32_t * ) data ;
567
+ uint32 * d = (uint32 * ) data ;
569
568
unsigned bs = 16 ;
570
- uint32_t buf [4 ],
569
+ uint32 buf [4 ],
571
570
iv [4 ];
572
571
573
572
memcpy (iv , iva , bs );
@@ -604,7 +603,7 @@ aes_cbc_decrypt(rijndael_ctx *ctx, uint8_t *iva, uint8_t *data, unsigned len)
604
603
#ifdef PRINT_TABS
605
604
606
605
static void
607
- show256u8 (char * name , uint8_t * data )
606
+ show256u8 (char * name , uint8 * data )
608
607
{
609
608
int i ;
610
609
@@ -620,7 +619,7 @@ show256u8(char *name, uint8_t *data)
620
619
621
620
622
621
static void
623
- show4x256u32 (char * name , uint32_t data [4 ][256 ])
622
+ show4x256u32 (char * name , uint32 data [4 ][256 ])
624
623
{
625
624
int i ,
626
625
j ;
0 commit comments