1#! /usr/bin/env perl 2# Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. 3# 4# Licensed under the Apache License 2.0 (the "License"). You may not use 5# this file except in compliance with the License. You can obtain a copy 6# in the file LICENSE in the source distribution or at 7# https://www.openssl.org/source/license.html 8 9# $output is the last argument if it looks like a file (it has an extension) 10# $flavour is the first argument if it doesn't look like a file 11$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef; 12$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef; 13 14$output and open STDOUT,">$output"; 15 16################################################################################ 17# Utility functions to help with keeping track of which registers to stack/ 18# unstack when entering / exiting routines. 19################################################################################ 20{ 21 # Callee-saved registers 22 my @callee_saved = map("x$_",(2,8,9,18..27)); 23 # Caller-saved registers 24 my @caller_saved = map("x$_",(1,5..7,10..17,28..31)); 25 my @must_save; 26 sub use_reg { 27 my $reg = shift; 28 if (grep(/^$reg$/, @callee_saved)) { 29 push(@must_save, $reg); 30 } elsif (!grep(/^$reg$/, @caller_saved)) { 31 # Register is not usable! 32 die("Unusable register ".$reg); 33 } 34 return $reg; 35 } 36 sub use_regs { 37 return map(use_reg("x$_"), @_); 38 } 39 sub save_regs { 40 my $ret = ''; 41 my $stack_reservation = ($#must_save + 1) * 8; 42 my $stack_offset = $stack_reservation; 43 if ($stack_reservation % 16) { 44 $stack_reservation += 8; 45 } 46 $ret.=" addi sp,sp,-$stack_reservation\n"; 47 foreach (@must_save) { 48 $stack_offset -= 8; 49 $ret.=" sd $_,$stack_offset(sp)\n"; 50 } 51 return $ret; 52 } 53 sub load_regs { 54 my $ret = ''; 55 my $stack_reservation = ($#must_save + 1) * 8; 56 my $stack_offset = $stack_reservation; 57 if ($stack_reservation % 16) { 58 $stack_reservation += 8; 59 } 60 foreach (@must_save) { 61 $stack_offset -= 8; 62 $ret.=" ld $_,$stack_offset(sp)\n"; 63 } 64 $ret.=" addi sp,sp,$stack_reservation\n"; 65 return $ret; 66 } 67 sub clear_regs { 68 @must_save = (); 69 } 70} 71 72################################################################################ 73# Register assignment for AES_encrypt and AES_decrypt 74################################################################################ 75 76# Registers to hold AES state (called s0-s3 or y0-y3 elsewhere) 77my ($Q0,$Q1,$Q2,$Q3) = use_regs(6..9); 78 79# Function arguments (x10-x12 are a0-a2 in the ABI) 80# Input block pointer, output block pointer, key pointer 81my ($INP,$OUTP,$KEYP) = use_regs(10..12); 82 83# Temporaries 84my ($T0,$T1,$T2,$T3) = use_regs(13..16); 85my ($T4,$T5,$T6,$T7,$T8,$T9,$T10,$T11) = use_regs(17..24); 86my ($T12,$T13,$T14,$T15) = use_regs(25..28); 87 88# Register to hold table offset 89my ($I0) = use_regs(29); 90 91# Loop counter 92my ($loopcntr) = use_regs(30); 93 94# Lookup table address register 95my ($TBL) = use_regs(31); 96 97# Lookup table mask register 98my ($MSK) = use_regs(5); 99 100# Aliases for readability 101my $K0 = $loopcntr; 102my $K1 = $KEYP; 103 104################################################################################ 105# Table lookup utility functions for AES_encrypt and AES_decrypt 106################################################################################ 107 108# do_lookup([destination regs], [state regs], [temporary regs], shamt) 109# do_lookup loads four entries from an AES encryption/decryption table 110# and stores the result in the specified destination register set 111# Ds->[0] = Table[Qs->[0] >> shamt] 112# Ds->[1] = Table[Qs->[1] >> shamt] 113# Ds->[2] = Table[Qs->[2] >> shamt] 114# Ds->[3] = Table[Qs->[3] >> shamt] 115# Four temporary regs are used to generate these lookups. The temporary regs 116# can be equal to the destination regs, but only if they appear in the same 117# order. I.e. do_lookup([A,B,C,D],[...],[A,B,C,D],...) is OK 118sub do_lookup { 119 # (destination regs, state regs, temporary regs, shift amount) 120 my ($Ds, $Qs, $Ts, $shamt) = @_; 121 122 my $ret = ''; 123 124 # AES encryption/decryption table entries have word-sized (4-byte) entries. 125 # To convert the table index into a byte offset, we compute 126 # ((Qs->[i] >> shamt) & 0xFF) << 2 127 # However, to save work, we compute the equivalent expression 128 # (Qs->[i] >> (shamt-2)) & 0x3FC 129 if ($shamt < 2) { 130$ret .= <<___; 131 132 slli $Ts->[0],$Qs->[0],$shamt+2 133 slli $Ts->[1],$Qs->[1],$shamt+2 134 slli $Ts->[2],$Qs->[2],$shamt+2 135 slli $Ts->[3],$Qs->[3],$shamt+2 136___ 137 } else { 138$ret .= <<___; 139 140 srli $Ts->[0],$Qs->[0],$shamt-2 141 srli $Ts->[1],$Qs->[1],$shamt-2 142 srli $Ts->[2],$Qs->[2],$shamt-2 143 srli $Ts->[3],$Qs->[3],$shamt-2 144___ 145 } 146 147$ret .= <<___; 148 149 andi $Ts->[0],$Ts->[0],0x3FC 150 andi $Ts->[1],$Ts->[1],0x3FC 151 andi $Ts->[2],$Ts->[2],0x3FC 152 andi $Ts->[3],$Ts->[3],0x3FC 153 154 # Index into table. 155 add $I0,$TBL,$Ts->[0] 156 lwu $Ds->[0],0($I0) 157 add $I0,$TBL,$Ts->[1] 158 lwu $Ds->[1],0($I0) 159 add $I0,$TBL,$Ts->[2] 160 lwu $Ds->[2],0($I0) 161 add $I0,$TBL,$Ts->[3] 162 lwu $Ds->[3],0($I0) 163 164___ 165 166 return $ret; 167} 168 169# Identical to do_lookup(), but loads only a single byte into each destination 170# register (replaces lwu with lbu). Used in the final round of AES_encrypt. 171sub do_lookup_byte { 172 my $ret = do_lookup(@_); 173 $ret =~ s/lwu/lbu/g; 174 return $ret; 175} 176 177# do_lookup_Td4([destination regs], [state regs], [temporary regs]) 178# Used in final phase of AES_decrypt 179# Ds->[0] = Table[(Qs->[0]) &0xFF] 180# Ds->[1] = Table[(Qs->[1] >> 8 )&0xFF] 181# Ds->[2] = Table[(Qs->[2] >> 16)&0xFF] 182# Ds->[3] = Table[(Qs->[3] >> 24)&0xFF] 183# Four temporary regs are used to generate these lookups. The temporary regs 184# can be equal to the destination regs, but only if they appear in the same 185# order. I.e. do_lookup([A,B,C,D],[...],[A,B,C,D],...) is OK 186sub do_lookup_Td4 { 187 my ($Ds, $Qs, $Ts) = @_; 188 189 my $ret = ''; 190 191$ret .= <<___; 192 srli $Ts->[1],$Qs->[1],8 193 srli $Ts->[2],$Qs->[2],16 194 srli $Ts->[3],$Qs->[3],24 195 196 andi $Ts->[0],$Qs->[0],0xFF 197 andi $Ts->[1],$Ts->[1],0xFF 198 andi $Ts->[2],$Ts->[2],0xFF 199 andi $Ts->[3],$Ts->[3],0xFF 200 201 add $I0,$TBL,$Ts->[0] 202 lbu $Ds->[0],0($I0) 203 add $I0,$TBL,$Ts->[1] 204 lbu $Ds->[1],0($I0) 205 add $I0,$TBL,$Ts->[2] 206 lbu $Ds->[2],0($I0) 207 add $I0,$TBL,$Ts->[3] 208 lbu $Ds->[3],0($I0) 209 210___ 211 212 return $ret; 213} 214 215################################################################################ 216# void AES_encrypt(const unsigned char *in, unsigned char *out, 217# const AES_KEY *key); 218################################################################################ 219my $code .= <<___; 220.text 221.balign 16 222.globl AES_encrypt 223.type AES_encrypt,\@function 224AES_encrypt: 225___ 226 227$code .= save_regs(); 228 229$code .= <<___; 230 231 # Load input to block cipher 232 ld $Q0,0($INP) 233 ld $Q2,8($INP) 234 235 236 # Load key 237 ld $T0,0($KEYP) 238 ld $T2,8($KEYP) 239 240 241 # Load number of rounds 242 lwu $loopcntr,240($KEYP) 243 244 # Load address of substitution table and wrap-around mask 245 la $TBL,AES_Te0 246 li $MSK,~0xFFF 247 248 # y = n xor k, stored in Q0-Q3 249 250 xor $Q0,$Q0,$T0 251 xor $Q2,$Q2,$T2 252 srli $Q1,$Q0,32 253 srli $Q3,$Q2,32 254 255 # The main loop only executes the first N-1 rounds. 256 add $loopcntr,$loopcntr,-1 257 258 # Do Nr - 1 rounds (final round is special) 259 2601: 261___ 262 263# Lookup in table Te0 264$code .= do_lookup( 265 [$T4,$T5,$T6,$T7], # Destination registers 266 [$Q0,$Q1,$Q2,$Q3], # State registers 267 [$T0,$T1,$T2,$T3], # Temporaries 268 0 # Shift amount 269); 270 271$code .= <<___; 272 add $TBL,$TBL,1024 273___ 274 275# Lookup in table Te1 276$code .= do_lookup( 277 [$T8,$T9,$T10,$T11], 278 [$Q1,$Q2,$Q3,$Q0], 279 [$T0,$T1,$T2,$T3], 280 8 281); 282 283$code .= <<___; 284 add $TBL,$TBL,1024 285___ 286 287# Lookup in table Te2 288$code .= do_lookup( 289 [$T12,$T13,$T14,$T15], 290 [$Q2,$Q3,$Q0,$Q1], 291 [$T0,$T1,$T2,$T3], 292 16 293); 294 295$code .= <<___; 296 add $TBL,$TBL,1024 297___ 298 299# Lookup in table Te3 300$code .= do_lookup( 301 [$T0,$T1,$T2,$T3], 302 [$Q3,$Q0,$Q1,$Q2], 303 [$T0,$T1,$T2,$T3], 304 24 305); 306 307$code .= <<___; 308 309 # Combine table lookups 310 xor $T4,$T4,$T8 311 xor $T5,$T5,$T9 312 xor $T6,$T6,$T10 313 xor $T7,$T7,$T11 314 315 xor $T4,$T4,$T12 316 xor $T5,$T5,$T13 317 xor $T6,$T6,$T14 318 xor $T7,$T7,$T15 319 320 xor $T0,$T0,$T4 321 xor $T1,$T1,$T5 322 xor $T2,$T2,$T6 323 xor $T3,$T3,$T7 324 325 # Update key ptr to point to next key in schedule 326 add $KEYP,$KEYP,16 327 328 # Grab next key in schedule 329 ld $T4,0($KEYP) 330 ld $T6,8($KEYP) 331 332 # Round TBL back to 4k boundary 333 and $TBL,$TBL,$MSK 334 335 add $loopcntr,$loopcntr,-1 336 337 xor $Q0,$T0,$T4 338 xor $Q2,$T2,$T6 339 srli $T5,$T4,32 340 xor $Q1,$T1,$T5 341 srli $T7,$T6,32 342 xor $Q3,$T3,$T7 343 344 bgtz $loopcntr,1b 345 346#================================FINAL ROUND==================================== 347 348# In the final round, all lookup table accesses would appear as follows: 349# 350# ... compute index I0 351# add I0,TBL,T0 352# lbu T0,1(I0) 353# 354# Instead of indexing with a 1 offset, we can add 1 to the TBL pointer, and use 355# a 0 offset when indexing in the following code. This enables some instruction 356# fusion opportunities. 357 358 add $TBL,$TBL,1 359 360 ld $K0,16($KEYP) 361 ld $K1,24($KEYP) 362___ 363 364$code .= do_lookup_byte( 365 [$T4,$T5,$T6,$T7], 366 [$Q0,$Q1,$Q2,$Q3], 367 [$T0,$T1,$T2,$T3], 368 0 369); 370 371$code .= do_lookup_byte( 372 [$T8,$T9,$T10,$T11], 373 [$Q1,$Q2,$Q3,$Q0], 374 [$T0,$T1,$T2,$T3], 375 8 376); 377 378$code .= do_lookup_byte( 379 [$T12,$T13,$T14,$T15], 380 [$Q2,$Q3,$Q0,$Q1], 381 [$T0,$T1,$T2,$T3], 382 16 383); 384 385$code .= do_lookup_byte( 386 [$T0,$T1,$T2,$T3], 387 [$Q3,$Q0,$Q1,$Q2], 388 [$T0,$T1,$T2,$T3], 389 24 390); 391 392$code .= <<___; 393 394 # Combine table lookups into T0 and T2 395 396 slli $T5,$T5,32 397 slli $T7,$T7,32 398 slli $T8,$T8,8 399 slli $T9,$T9,8+32 400 slli $T10,$T10,8 401 slli $T11,$T11,8+32 402 slli $T12,$T12,16 403 slli $T13,$T13,16+32 404 slli $T14,$T14,16 405 slli $T15,$T15,16+32 406 407 slli $T0,$T0,24 408 slli $T1,$T1,24+32 409 slli $T2,$T2,24 410 slli $T3,$T3,24+32 411 412 xor $T4,$T4,$T0 413 xor $T5,$T5,$T1 414 xor $T6,$T6,$T2 415 xor $T7,$T7,$T3 416 417 xor $T8,$T8,$T12 418 xor $T9,$T9,$T13 419 xor $T10,$T10,$T14 420 xor $T11,$T11,$T15 421 422 xor $T0,$T4,$T8 423 xor $T1,$T5,$T9 424 xor $T2,$T6,$T10 425 xor $T3,$T7,$T11 426 427 428 xor $T0,$T0,$T1 429 # T0 = [T1 T13 T9 T5 T0 T12 T8 T4] 430 xor $T0,$T0,$K0 # XOR in key 431 432 xor $T2,$T2,$T3 433 # T2 = [T3 T15 T11 T7 T2 T14 T10 T6] 434 xor $T2,$T2,$K1 # XOR in key 435 436 sd $T0,0($OUTP) 437 sd $T2,8($OUTP) 438 439 # Pop registers and return 4402: 441___ 442 443$code .= load_regs(); 444 445$code .= <<___; 446 ret 447___ 448 449################################################################################ 450# void AES_decrypt(const unsigned char *in, unsigned char *out, 451# const AES_KEY *key); 452################################################################################ 453$code .= <<___; 454.text 455.balign 16 456.globl AES_decrypt 457.type AES_decrypt,\@function 458AES_decrypt: 459___ 460 461$code .= save_regs(); 462 463$code .= <<___; 464 465 # Load input to block cipher 466 ld $Q0,0($INP) 467 ld $Q2,8($INP) 468 469 # Load key 470 # Note that key is assumed in BE byte order 471 # (This routine was written against a key scheduling implementation that 472 # placed keys in BE byte order.) 473 ld $T0,0($KEYP) 474 ld $T2,8($KEYP) 475 476 # Load number of rounds 477 lwu $loopcntr,240($KEYP) 478 479 # Load address of substitution table and wrap-around mask 480 la $TBL,AES_Td0 481 li $MSK,~0xFFF 482 483 xor $Q0,$Q0,$T0 484 xor $Q2,$Q2,$T2 485 srli $Q1,$Q0,32 486 srli $Q3,$Q2,32 487 488 # The main loop only executes the first N-1 rounds. 489 add $loopcntr,$loopcntr,-1 490 491 # Do Nr - 1 rounds (final round is special) 4921: 493___ 494 495# Lookup in Td0 496$code .= do_lookup( 497 [$T4,$T5,$T6,$T7], # Destination registers 498 [$Q0,$Q1,$Q2,$Q3], # State registers 499 [$T0,$T1,$T2,$T3], # Temporaries 500 0 # Shift amount 501); 502 503$code .= <<___; 504 add $TBL,$TBL,1024 505___ 506 507# Lookup in Td1 508$code .= do_lookup( 509 [$T8,$T9,$T10,$T11], 510 [$Q3,$Q0,$Q1,$Q2], 511 [$T0,$T1,$T2,$T3], 512 8 513); 514 515$code .= <<___; 516 add $TBL,$TBL,1024 517___ 518 519# Lookup in Td2 520$code .= do_lookup( 521 [$T12,$T13,$T14,$T15], 522 [$Q2,$Q3,$Q0,$Q1], 523 [$T0,$T1,$T2,$T3], 524 16 525); 526 527$code .= <<___; 528 add $TBL,$TBL,1024 529___ 530 531# Lookup in Td3 532$code .= do_lookup( 533 [$T0,$T1,$T2,$T3], 534 [$Q1,$Q2,$Q3,$Q0], 535 [$T0,$T1,$T2,$T3], 536 24 537); 538 539$code .= <<___; 540 xor $T4,$T4,$T8 541 xor $T5,$T5,$T9 542 xor $T6,$T6,$T10 543 xor $T7,$T7,$T11 544 545 xor $T4,$T4,$T12 546 xor $T5,$T5,$T13 547 xor $T6,$T6,$T14 548 xor $T7,$T7,$T15 549 550 xor $T0,$T0,$T4 551 xor $T1,$T1,$T5 552 xor $T2,$T2,$T6 553 xor $T3,$T3,$T7 554 555 # Update key ptr to point to next key in schedule 556 add $KEYP,$KEYP,16 557 558 # Grab next key in schedule 559 ld $T4,0($KEYP) 560 ld $T6,8($KEYP) 561 562 # Round TBL back to 4k boundary 563 and $TBL,$TBL,$MSK 564 565 add $loopcntr,$loopcntr,-1 566 567 xor $Q0,$T0,$T4 568 xor $Q2,$T2,$T6 569 srli $T5,$T4,32 570 xor $Q1,$T1,$T5 571 srli $T7,$T6,32 572 xor $Q3,$T3,$T7 573 574 bgtz $loopcntr,1b 575 576#================================FINAL ROUND==================================== 577 578 la $TBL,AES_Td4 579 580 # K0,K1 are aliases for loopcntr,KEYP 581 # As these registers will no longer be used after these loads, reuse them 582 # to store the final key in the schedule. 583 ld $K0,16($KEYP) 584 ld $K1,24($KEYP) 585___ 586 587$code .= do_lookup_Td4( 588 [$T4,$T5,$T6,$T7], 589 [$Q0,$Q3,$Q2,$Q1], 590 [$T0,$T1,$T2,$T3] 591); 592 593$code .= do_lookup_Td4( 594 [$T8,$T9,$T10,$T11], 595 [$Q1,$Q0,$Q3,$Q2], 596 [$T0,$T1,$T2,$T3] 597); 598 599$code .= do_lookup_Td4( 600 [$T12,$T13,$T14,$T15], 601 [$Q2,$Q1,$Q0,$Q3], 602 [$T0,$T1,$T2,$T3] 603); 604 605$code .= do_lookup_Td4( 606 [$T0,$T1,$T2,$T3], 607 [$Q3,$Q2,$Q1,$Q0], 608 [$T0,$T1,$T2,$T3] 609); 610 611$code .= <<___; 612 613 # T0-T15 now contain the decrypted block, minus xoring with the final round 614 # key. We pack T0-T15 into the two 64-bit registers T0 and T4, then xor 615 # in the key and store. 616 617 slli $T5,$T5,8 618 slli $T6,$T6,16 619 slli $T7,$T7,24 620 slli $T8,$T8,32 621 slli $T9,$T9,8+32 622 slli $T10,$T10,16+32 623 slli $T11,$T11,32+24 624 slli $T13,$T13,8 625 slli $T14,$T14,16 626 slli $T15,$T15,24 627 slli $T0,$T0,32 628 slli $T1,$T1,8+32 629 slli $T2,$T2,16+32 630 slli $T3,$T3,24+32 631 632 xor $T4,$T4,$T5 633 xor $T6,$T6,$T7 634 xor $T8,$T8,$T9 635 xor $T10,$T10,$T11 636 637 xor $T12,$T12,$T13 638 xor $T14,$T14,$T15 639 xor $T0,$T0,$T1 640 xor $T2,$T2,$T3 641 642 xor $T4,$T4,$T6 643 xor $T8,$T8,$T10 644 xor $T12,$T12,$T14 645 xor $T0,$T0,$T2 646 647 xor $T4,$T4,$T8 648 # T4 = [T11 T10 T9 T8 T7 T6 T5 T4] 649 xor $T4,$T4,$K0 # xor in key 650 651 xor $T0,$T0,$T12 652 # T0 = [T3 T2 T1 T0 T15 T14 T13 T12] 653 xor $T0,$T0,$K1 # xor in key 654 655 sd $T4,0($OUTP) 656 sd $T0,8($OUTP) 657 658 # Pop registers and return 659___ 660 661$code .= load_regs(); 662 663$code .= <<___; 664 ret 665___ 666 667clear_regs(); 668 669################################################################################ 670# Register assignment for AES_set_encrypt_key 671################################################################################ 672 673# Function arguments (x10-x12 are a0-a2 in the ABI) 674# Pointer to user key, number of bits in key, key pointer 675my ($UKEY,$BITS,$KEYP) = use_regs(10..12); 676 677# Temporaries 678my ($T0,$T1,$T2,$T3) = use_regs(6..8,13); 679my ($T4,$T5,$T6,$T7,$T8,$T9,$T10,$T11) = use_regs(14..17,28..31); 680 681# Pointer into rcon table 682my ($RCON) = use_regs(9); 683 684# Register to hold table offset and used as a temporary 685my ($I0) = use_regs(18); 686 687# Loop counter 688my ($loopcntr) = use_regs(19); 689 690# Lookup table address register 691my ($TBL) = use_regs(20); 692 693# Calculates dest = [ 694# S[(in>>shifts[3])&0xFF], 695# S[(in>>shifts[2])&0xFF], 696# S[(in>>shifts[1])&0xFF], 697# S[(in>>shifts[0])&0xFF] 698# ] 699# This routine spreads accesses across Te0-Te3 to help bring those tables 700# into cache, in anticipation of running AES_[en/de]crypt. 701sub do_enc_lookup { 702 # (destination reg, input reg, shifts array, temporary regs) 703 my ($dest, $in, $shifts, $Ts) = @_; 704 705 my $ret = ''; 706 707$ret .= <<___; 708 709 # Round TBL back to 4k boundary 710 srli $TBL,$TBL,12 711 slli $TBL,$TBL,12 712 713 # Offset by 1 byte, since Te0[x] = S[x].[03, 01, 01, 02] 714 # So that, later on, a 0-offset lbu yields S[x].01 == S[x] 715 addi $TBL,$TBL,1 716___ 717 718 for ($i = 0; $i < 4; $i++) { 719 if ($shifts->[$i] < 2) { 720 $ret .= " slli $Ts->[$i],$in,2-$shifts->[$i]\n"; 721 } else { 722 $ret .= " srli $Ts->[$i],$in,$shifts->[$i]-2\n"; 723 } 724 } 725 726$ret .= <<___; 727 728 andi $Ts->[0],$Ts->[0],0x3FC 729 andi $Ts->[1],$Ts->[1],0x3FC 730 andi $Ts->[2],$Ts->[2],0x3FC 731 andi $Ts->[3],$Ts->[3],0x3FC 732 733 # Index into tables Te0-Te3 (spread access across tables to help bring 734 # them into cache for later) 735 736 add $I0,$TBL,$Ts->[0] 737 lbu $Ts->[0],0($I0) 738 739 add $TBL,$TBL,1025 # yes, 1025 740 add $I0,$TBL,$Ts->[1] 741 lbu $Ts->[1],0($I0) 742 743 add $TBL,$TBL,1025 744 add $I0,$TBL,$Ts->[2] 745 lbu $Ts->[2],0($I0) 746 747 add $TBL,$TBL,1022 748 add $I0,$TBL,$Ts->[3] 749 lbu $Ts->[3],0($I0) 750 751 slli $Ts->[1],$Ts->[1],8 752 slli $Ts->[2],$Ts->[2],16 753 slli $Ts->[3],$Ts->[3],24 754 755 xor $Ts->[0],$Ts->[0],$Ts->[1] 756 xor $Ts->[2],$Ts->[2],$Ts->[3] 757 xor $dest,$Ts->[0],$Ts->[2] 758___ 759 760 return $ret; 761} 762 763################################################################################ 764# void AES_set_encrypt_key(const unsigned char *userKey, const int bits, 765# AES_KEY *key) 766################################################################################ 767$code .= <<___; 768.text 769.balign 16 770.globl AES_set_encrypt_key 771.type AES_set_encrypt_key,\@function 772AES_set_encrypt_key: 773___ 774$code .= save_regs(); 775$code .= <<___; 776 bnez $UKEY,1f # if (!userKey || !key) return -1; 777 bnez $KEYP,1f 778 li a0,-1 779 ret 7801: 781 la $RCON,AES_rcon 782 la $TBL,AES_Te0 783 li $T8,128 784 li $T9,192 785 li $T10,256 786 787 # Determine number of rounds from key size in bits 788 bne $BITS,$T8,1f 789 li $T3,10 # key->rounds = 10 if bits == 128 790 j 3f 7911: 792 bne $BITS,$T9,2f 793 li $T3,12 # key->rounds = 12 if bits == 192 794 j 3f 7952: 796 li $T3,14 # key->rounds = 14 if bits == 256 797 beq $BITS,$T10,3f 798 li a0,-2 # If bits != 128, 192, or 256, return -2 799 j 5f 8003: 801 ld $T0,0($UKEY) 802 ld $T2,8($UKEY) 803 804 sw $T3,240($KEYP) 805 806 li $loopcntr,0 # == i*4 807 808 srli $T1,$T0,32 809 srli $T3,$T2,32 810 811 sd $T0,0($KEYP) 812 sd $T2,8($KEYP) 813 814 # if bits == 128 815 # jump into loop 816 beq $BITS,$T8,1f 817 818 ld $T4,16($UKEY) 819 srli $T5,$T4,32 820 sd $T4,16($KEYP) 821 822 # if bits == 192 823 # jump into loop 824 beq $BITS,$T9,2f 825 826 ld $T6,24($UKEY) 827 srli $T7,$T6,32 828 sd $T6,24($KEYP) 829 830 # bits == 256 831 j 3f 832___ 833 834$code .= <<___; 8351: 836 addi $KEYP,$KEYP,16 8371: 838___ 839$code .= do_enc_lookup($T4,$T3,[8,16,24,0],[$T4,$T5,$T6,$T7]); 840 841$code .= <<___; 842 add $T5,$RCON,$loopcntr # rcon[i] (i increments by 4 so it can double as 843 # a word offset) 844 lwu $T5,0($T5) 845 846 addi $loopcntr,$loopcntr,4 847 li $I0,10*4 848 849 xor $T0,$T0,$T4 850 xor $T0,$T0,$T5 851 xor $T1,$T1,$T0 852 xor $T2,$T2,$T1 853 xor $T3,$T3,$T2 854 855 sw $T0,0($KEYP) 856 sw $T1,4($KEYP) 857 sw $T2,8($KEYP) 858 sw $T3,12($KEYP) 859 860 addi $KEYP,$KEYP,16 861 862 863 bne $loopcntr,$I0,1b 864 j 4f 865___ 866$code .= <<___; 8672: 868 addi $KEYP,$KEYP,24 8692: 870___ 871$code .= do_enc_lookup($T6,$T5,[8,16,24,0],[$T6,$T7,$T8,$T9]); 872 873$code .= <<___; 874 add $T7,$RCON,$loopcntr # rcon[i] (i increments by 4 so it can double as 875 # a word offset) 876 lwu $T7,0($T7) 877 878 addi $loopcntr,$loopcntr,4 879 li $I0,8*4 880 881 xor $T0,$T0,$T6 882 xor $T0,$T0,$T7 883 xor $T1,$T1,$T0 884 xor $T2,$T2,$T1 885 xor $T3,$T3,$T2 886 887 sw $T0,0($KEYP) 888 sw $T1,4($KEYP) 889 sw $T2,8($KEYP) 890 sw $T3,12($KEYP) 891 892 beq $loopcntr,$I0,4f 893 894 xor $T4,$T4,$T3 895 xor $T5,$T5,$T4 896 sw $T4,16($KEYP) 897 sw $T5,20($KEYP) 898 899 addi $KEYP,$KEYP,24 900 j 2b 901___ 902$code .= <<___; 9033: 904 addi $KEYP,$KEYP,32 9053: 906___ 907$code .= do_enc_lookup($T8,$T7,[8,16,24,0],[$T8,$T9,$T10,$T11]); 908 909$code .= <<___; 910 add $T9,$RCON,$loopcntr # rcon[i] (i increments by 4 so it can double as 911 # a word offset) 912 lwu $T9,0($T9) 913 914 addi $loopcntr,$loopcntr,4 915 li $I0,7*4 916 917 xor $T0,$T0,$T8 918 xor $T0,$T0,$T9 919 xor $T1,$T1,$T0 920 xor $T2,$T2,$T1 921 xor $T3,$T3,$T2 922 923 sw $T0,0($KEYP) 924 sw $T1,4($KEYP) 925 sw $T2,8($KEYP) 926 sw $T3,12($KEYP) 927 928 beq $loopcntr,$I0,4f 929___ 930$code .= do_enc_lookup($T8,$T3,[0,8,16,24],[$T8,$T9,$T10,$T11]); 931$code .= <<___; 932 xor $T4,$T4,$T8 933 xor $T5,$T5,$T4 934 xor $T6,$T6,$T5 935 xor $T7,$T7,$T6 936 sw $T4,16($KEYP) 937 sw $T5,20($KEYP) 938 sw $T6,24($KEYP) 939 sw $T7,28($KEYP) 940 941 addi $KEYP,$KEYP,32 942 j 3b 943 9444: # return 0 945 li a0,0 9465: # return a0 947___ 948$code .= load_regs(); 949$code .= <<___; 950 ret 951___ 952 953clear_regs(); 954 955################################################################################ 956# Register assignment for AES_set_decrypt_key 957################################################################################ 958 959# Function arguments (x10-x12 are a0-a2 in the ABI) 960# Pointer to user key, number of bits in key, key pointer 961my ($UKEY,$BITS,$KEYP) = use_regs(10..12); 962 963# Temporaries 964my ($T0,$T1,$T2,$T3) = use_regs(6..8,9); 965my ($T4,$T5,$T6,$T7,$T8) = use_regs(13..17); 966 967my ($I1) = use_regs(18); 968 969# Register to hold table offset and used as a temporary 970my ($I0) = use_regs(19); 971 972# Loop counter 973my ($loopcntr) = use_regs(20); 974 975# Lookup table address register 976my ($TBL) = use_regs(21); 977 978# Calculates dest = [ 979# Td0[Te1[(in >> 24) & 0xff] & 0xff] ^ 980# Td1[Te1[(in >> 16) & 0xff] & 0xff] ^ 981# Td2[Te1[(in >> 8) & 0xff] & 0xff] ^ 982# Td3[Te1[(in ) & 0xff] & 0xff] 983# ] 984sub do_dec_lookup { 985 # (destination reg, input reg, temporary regs) 986 my ($dest, $in, $Ts) = @_; 987 988 my $ret = ''; 989 990$ret .= <<___; 991 992 la $TBL,AES_Te2 993 994 slli $Ts->[0],$in,2 995 srli $Ts->[1],$in,8-2 996 srli $Ts->[2],$in,16-2 997 srli $Ts->[3],$in,24-2 998 999 andi $Ts->[0],$Ts->[0],0x3FC 1000 andi $Ts->[1],$Ts->[1],0x3FC 1001 andi $Ts->[2],$Ts->[2],0x3FC 1002 andi $Ts->[3],$Ts->[3],0x3FC 1003 1004 # Index into table Te2 1005 1006 add $I0,$TBL,$Ts->[0] 1007 lwu $Ts->[0],0($I0) 1008 1009 add $I0,$TBL,$Ts->[1] 1010 lwu $Ts->[1],0($I0) 1011 1012 add $I0,$TBL,$Ts->[2] 1013 lwu $Ts->[2],0($I0) 1014 1015 add $I0,$TBL,$Ts->[3] 1016 lwu $Ts->[3],0($I0) 1017 1018 andi $Ts->[0],$Ts->[0],0xFF 1019 andi $Ts->[1],$Ts->[1],0xFF 1020 andi $Ts->[2],$Ts->[2],0xFF 1021 andi $Ts->[3],$Ts->[3],0xFF 1022 1023 slli $Ts->[0],$Ts->[0],2 1024 slli $Ts->[1],$Ts->[1],2 1025 slli $Ts->[2],$Ts->[2],2 1026 slli $Ts->[3],$Ts->[3],2 1027 1028 la $TBL,AES_Td0 1029 1030 # Lookup in Td0-Td3 1031 1032 add $I0,$TBL,$Ts->[0] 1033 lwu $Ts->[0],0($I0) 1034 1035 add $TBL,$TBL,1024 1036 add $I0,$TBL,$Ts->[1] 1037 lwu $Ts->[1],0($I0) 1038 1039 add $TBL,$TBL,1024 1040 add $I0,$TBL,$Ts->[2] 1041 lwu $Ts->[2],0($I0) 1042 1043 add $TBL,$TBL,1024 1044 add $I0,$TBL,$Ts->[3] 1045 lwu $Ts->[3],0($I0) 1046 1047 xor $Ts->[0],$Ts->[0],$Ts->[1] 1048 xor $Ts->[2],$Ts->[2],$Ts->[3] 1049 xor $dest,$Ts->[0],$Ts->[2] 1050___ 1051 1052 return $ret; 1053} 1054 1055################################################################################ 1056# void AES_set_decrypt_key(const unsigned char *userKey, const int bits, 1057# AES_KEY *key) 1058################################################################################ 1059$code .= <<___; 1060.text 1061.balign 16 1062.globl AES_set_decrypt_key 1063.type AES_set_decrypt_key,\@function 1064AES_set_decrypt_key: 1065 # Call AES_set_encrypt_key first 1066 addi sp,sp,-16 1067 sd $KEYP,0(sp) # We need to hold onto this! 1068 sd ra,8(sp) 1069 jal ra,AES_set_encrypt_key 1070 ld $KEYP,0(sp) 1071 ld ra,8(sp) 1072 addi sp,sp,16 1073 bgez a0,1f # If error, return error 1074 ret 10751: 1076___ 1077$code .= save_regs(); 1078$code .= <<___; 1079 1080 li $T4,0 1081 lwu $T8,240($KEYP) 1082 slli $T5,$T8,4 1083 # Invert order of round keys 10841: 1085 add $I0,$KEYP,$T4 1086 ld $T0,0($I0) 1087 ld $T1,8($I0) 1088 add $I1,$KEYP,$T5 1089 ld $T2,0($I1) 1090 ld $T3,8($I1) 1091 addi $T4,$T4,16 1092 addi $T5,$T5,-16 1093 sd $T0,0($I1) 1094 sd $T1,8($I1) 1095 sd $T2,0($I0) 1096 sd $T3,8($I0) 1097 blt $T4,$T5,1b 1098 1099 li $loopcntr,1 1100 11011: 1102 addi $KEYP,$KEYP,16 1103 lwu $T0,0($KEYP) 1104 lwu $T1,4($KEYP) 1105 lwu $T2,8($KEYP) 1106 lwu $T3,12($KEYP) 1107___ 1108$code .= do_dec_lookup($T0,$T0,[$T4,$T5,$T6,$T7]); 1109$code .= do_dec_lookup($T1,$T1,[$T4,$T5,$T6,$T7]); 1110$code .= do_dec_lookup($T2,$T2,[$T4,$T5,$T6,$T7]); 1111$code .= do_dec_lookup($T3,$T3,[$T4,$T5,$T6,$T7]); 1112$code .= <<___; 1113 sw $T0,0($KEYP) 1114 sw $T1,4($KEYP) 1115 sw $T2,8($KEYP) 1116 sw $T3,12($KEYP) 1117 addi $loopcntr,$loopcntr,1 1118 blt $loopcntr,$T8,1b 1119___ 1120$code .= load_regs(); 1121$code .= <<___; 1122 li a0,0 1123 ret 1124___ 1125$code .= <<___; 1126 1127.section .rodata 1128.p2align 12 1129.type AES_Te0,\@object 1130AES_Te0: 1131.word 0xa56363c6U, 0x847c7cf8U, 0x997777eeU, 0x8d7b7bf6U 1132.word 0x0df2f2ffU, 0xbd6b6bd6U, 0xb16f6fdeU, 0x54c5c591U 1133.word 0x50303060U, 0x03010102U, 0xa96767ceU, 0x7d2b2b56U 1134.word 0x19fefee7U, 0x62d7d7b5U, 0xe6abab4dU, 0x9a7676ecU 1135.word 0x45caca8fU, 0x9d82821fU, 0x40c9c989U, 0x877d7dfaU 1136.word 0x15fafaefU, 0xeb5959b2U, 0xc947478eU, 0x0bf0f0fbU 1137.word 0xecadad41U, 0x67d4d4b3U, 0xfda2a25fU, 0xeaafaf45U 1138.word 0xbf9c9c23U, 0xf7a4a453U, 0x967272e4U, 0x5bc0c09bU 1139.word 0xc2b7b775U, 0x1cfdfde1U, 0xae93933dU, 0x6a26264cU 1140.word 0x5a36366cU, 0x413f3f7eU, 0x02f7f7f5U, 0x4fcccc83U 1141.word 0x5c343468U, 0xf4a5a551U, 0x34e5e5d1U, 0x08f1f1f9U 1142.word 0x937171e2U, 0x73d8d8abU, 0x53313162U, 0x3f15152aU 1143.word 0x0c040408U, 0x52c7c795U, 0x65232346U, 0x5ec3c39dU 1144.word 0x28181830U, 0xa1969637U, 0x0f05050aU, 0xb59a9a2fU 1145.word 0x0907070eU, 0x36121224U, 0x9b80801bU, 0x3de2e2dfU 1146.word 0x26ebebcdU, 0x6927274eU, 0xcdb2b27fU, 0x9f7575eaU 1147.word 0x1b090912U, 0x9e83831dU, 0x742c2c58U, 0x2e1a1a34U 1148.word 0x2d1b1b36U, 0xb26e6edcU, 0xee5a5ab4U, 0xfba0a05bU 1149.word 0xf65252a4U, 0x4d3b3b76U, 0x61d6d6b7U, 0xceb3b37dU 1150.word 0x7b292952U, 0x3ee3e3ddU, 0x712f2f5eU, 0x97848413U 1151.word 0xf55353a6U, 0x68d1d1b9U, 0x00000000U, 0x2cededc1U 1152.word 0x60202040U, 0x1ffcfce3U, 0xc8b1b179U, 0xed5b5bb6U 1153.word 0xbe6a6ad4U, 0x46cbcb8dU, 0xd9bebe67U, 0x4b393972U 1154.word 0xde4a4a94U, 0xd44c4c98U, 0xe85858b0U, 0x4acfcf85U 1155.word 0x6bd0d0bbU, 0x2aefefc5U, 0xe5aaaa4fU, 0x16fbfbedU 1156.word 0xc5434386U, 0xd74d4d9aU, 0x55333366U, 0x94858511U 1157.word 0xcf45458aU, 0x10f9f9e9U, 0x06020204U, 0x817f7ffeU 1158.word 0xf05050a0U, 0x443c3c78U, 0xba9f9f25U, 0xe3a8a84bU 1159.word 0xf35151a2U, 0xfea3a35dU, 0xc0404080U, 0x8a8f8f05U 1160.word 0xad92923fU, 0xbc9d9d21U, 0x48383870U, 0x04f5f5f1U 1161.word 0xdfbcbc63U, 0xc1b6b677U, 0x75dadaafU, 0x63212142U 1162.word 0x30101020U, 0x1affffe5U, 0x0ef3f3fdU, 0x6dd2d2bfU 1163.word 0x4ccdcd81U, 0x140c0c18U, 0x35131326U, 0x2fececc3U 1164.word 0xe15f5fbeU, 0xa2979735U, 0xcc444488U, 0x3917172eU 1165.word 0x57c4c493U, 0xf2a7a755U, 0x827e7efcU, 0x473d3d7aU 1166.word 0xac6464c8U, 0xe75d5dbaU, 0x2b191932U, 0x957373e6U 1167.word 0xa06060c0U, 0x98818119U, 0xd14f4f9eU, 0x7fdcdca3U 1168.word 0x66222244U, 0x7e2a2a54U, 0xab90903bU, 0x8388880bU 1169.word 0xca46468cU, 0x29eeeec7U, 0xd3b8b86bU, 0x3c141428U 1170.word 0x79dedea7U, 0xe25e5ebcU, 0x1d0b0b16U, 0x76dbdbadU 1171.word 0x3be0e0dbU, 0x56323264U, 0x4e3a3a74U, 0x1e0a0a14U 1172.word 0xdb494992U, 0x0a06060cU, 0x6c242448U, 0xe45c5cb8U 1173.word 0x5dc2c29fU, 0x6ed3d3bdU, 0xefacac43U, 0xa66262c4U 1174.word 0xa8919139U, 0xa4959531U, 0x37e4e4d3U, 0x8b7979f2U 1175.word 0x32e7e7d5U, 0x43c8c88bU, 0x5937376eU, 0xb76d6ddaU 1176.word 0x8c8d8d01U, 0x64d5d5b1U, 0xd24e4e9cU, 0xe0a9a949U 1177.word 0xb46c6cd8U, 0xfa5656acU, 0x07f4f4f3U, 0x25eaeacfU 1178.word 0xaf6565caU, 0x8e7a7af4U, 0xe9aeae47U, 0x18080810U 1179.word 0xd5baba6fU, 0x887878f0U, 0x6f25254aU, 0x722e2e5cU 1180.word 0x241c1c38U, 0xf1a6a657U, 0xc7b4b473U, 0x51c6c697U 1181.word 0x23e8e8cbU, 0x7cdddda1U, 0x9c7474e8U, 0x211f1f3eU 1182.word 0xdd4b4b96U, 0xdcbdbd61U, 0x868b8b0dU, 0x858a8a0fU 1183.word 0x907070e0U, 0x423e3e7cU, 0xc4b5b571U, 0xaa6666ccU 1184.word 0xd8484890U, 0x05030306U, 0x01f6f6f7U, 0x120e0e1cU 1185.word 0xa36161c2U, 0x5f35356aU, 0xf95757aeU, 0xd0b9b969U 1186.word 0x91868617U, 0x58c1c199U, 0x271d1d3aU, 0xb99e9e27U 1187.word 0x38e1e1d9U, 0x13f8f8ebU, 0xb398982bU, 0x33111122U 1188.word 0xbb6969d2U, 0x70d9d9a9U, 0x898e8e07U, 0xa7949433U 1189.word 0xb69b9b2dU, 0x221e1e3cU, 0x92878715U, 0x20e9e9c9U 1190.word 0x49cece87U, 0xff5555aaU, 0x78282850U, 0x7adfdfa5U 1191.word 0x8f8c8c03U, 0xf8a1a159U, 0x80898909U, 0x170d0d1aU 1192.word 0xdabfbf65U, 0x31e6e6d7U, 0xc6424284U, 0xb86868d0U 1193.word 0xc3414182U, 0xb0999929U, 0x772d2d5aU, 0x110f0f1eU 1194.word 0xcbb0b07bU, 0xfc5454a8U, 0xd6bbbb6dU, 0x3a16162cU 1195 1196.type AES_Te1,\@object 1197AES_Te1: 1198.word 0x6363c6a5U, 0x7c7cf884U, 0x7777ee99U, 0x7b7bf68dU 1199.word 0xf2f2ff0dU, 0x6b6bd6bdU, 0x6f6fdeb1U, 0xc5c59154U 1200.word 0x30306050U, 0x01010203U, 0x6767cea9U, 0x2b2b567dU 1201.word 0xfefee719U, 0xd7d7b562U, 0xabab4de6U, 0x7676ec9aU 1202.word 0xcaca8f45U, 0x82821f9dU, 0xc9c98940U, 0x7d7dfa87U 1203.word 0xfafaef15U, 0x5959b2ebU, 0x47478ec9U, 0xf0f0fb0bU 1204.word 0xadad41ecU, 0xd4d4b367U, 0xa2a25ffdU, 0xafaf45eaU 1205.word 0x9c9c23bfU, 0xa4a453f7U, 0x7272e496U, 0xc0c09b5bU 1206.word 0xb7b775c2U, 0xfdfde11cU, 0x93933daeU, 0x26264c6aU 1207.word 0x36366c5aU, 0x3f3f7e41U, 0xf7f7f502U, 0xcccc834fU 1208.word 0x3434685cU, 0xa5a551f4U, 0xe5e5d134U, 0xf1f1f908U 1209.word 0x7171e293U, 0xd8d8ab73U, 0x31316253U, 0x15152a3fU 1210.word 0x0404080cU, 0xc7c79552U, 0x23234665U, 0xc3c39d5eU 1211.word 0x18183028U, 0x969637a1U, 0x05050a0fU, 0x9a9a2fb5U 1212.word 0x07070e09U, 0x12122436U, 0x80801b9bU, 0xe2e2df3dU 1213.word 0xebebcd26U, 0x27274e69U, 0xb2b27fcdU, 0x7575ea9fU 1214.word 0x0909121bU, 0x83831d9eU, 0x2c2c5874U, 0x1a1a342eU 1215.word 0x1b1b362dU, 0x6e6edcb2U, 0x5a5ab4eeU, 0xa0a05bfbU 1216.word 0x5252a4f6U, 0x3b3b764dU, 0xd6d6b761U, 0xb3b37dceU 1217.word 0x2929527bU, 0xe3e3dd3eU, 0x2f2f5e71U, 0x84841397U 1218.word 0x5353a6f5U, 0xd1d1b968U, 0x00000000U, 0xededc12cU 1219.word 0x20204060U, 0xfcfce31fU, 0xb1b179c8U, 0x5b5bb6edU 1220.word 0x6a6ad4beU, 0xcbcb8d46U, 0xbebe67d9U, 0x3939724bU 1221.word 0x4a4a94deU, 0x4c4c98d4U, 0x5858b0e8U, 0xcfcf854aU 1222.word 0xd0d0bb6bU, 0xefefc52aU, 0xaaaa4fe5U, 0xfbfbed16U 1223.word 0x434386c5U, 0x4d4d9ad7U, 0x33336655U, 0x85851194U 1224.word 0x45458acfU, 0xf9f9e910U, 0x02020406U, 0x7f7ffe81U 1225.word 0x5050a0f0U, 0x3c3c7844U, 0x9f9f25baU, 0xa8a84be3U 1226.word 0x5151a2f3U, 0xa3a35dfeU, 0x404080c0U, 0x8f8f058aU 1227.word 0x92923fadU, 0x9d9d21bcU, 0x38387048U, 0xf5f5f104U 1228.word 0xbcbc63dfU, 0xb6b677c1U, 0xdadaaf75U, 0x21214263U 1229.word 0x10102030U, 0xffffe51aU, 0xf3f3fd0eU, 0xd2d2bf6dU 1230.word 0xcdcd814cU, 0x0c0c1814U, 0x13132635U, 0xececc32fU 1231.word 0x5f5fbee1U, 0x979735a2U, 0x444488ccU, 0x17172e39U 1232.word 0xc4c49357U, 0xa7a755f2U, 0x7e7efc82U, 0x3d3d7a47U 1233.word 0x6464c8acU, 0x5d5dbae7U, 0x1919322bU, 0x7373e695U 1234.word 0x6060c0a0U, 0x81811998U, 0x4f4f9ed1U, 0xdcdca37fU 1235.word 0x22224466U, 0x2a2a547eU, 0x90903babU, 0x88880b83U 1236.word 0x46468ccaU, 0xeeeec729U, 0xb8b86bd3U, 0x1414283cU 1237.word 0xdedea779U, 0x5e5ebce2U, 0x0b0b161dU, 0xdbdbad76U 1238.word 0xe0e0db3bU, 0x32326456U, 0x3a3a744eU, 0x0a0a141eU 1239.word 0x494992dbU, 0x06060c0aU, 0x2424486cU, 0x5c5cb8e4U 1240.word 0xc2c29f5dU, 0xd3d3bd6eU, 0xacac43efU, 0x6262c4a6U 1241.word 0x919139a8U, 0x959531a4U, 0xe4e4d337U, 0x7979f28bU 1242.word 0xe7e7d532U, 0xc8c88b43U, 0x37376e59U, 0x6d6ddab7U 1243.word 0x8d8d018cU, 0xd5d5b164U, 0x4e4e9cd2U, 0xa9a949e0U 1244.word 0x6c6cd8b4U, 0x5656acfaU, 0xf4f4f307U, 0xeaeacf25U 1245.word 0x6565caafU, 0x7a7af48eU, 0xaeae47e9U, 0x08081018U 1246.word 0xbaba6fd5U, 0x7878f088U, 0x25254a6fU, 0x2e2e5c72U 1247.word 0x1c1c3824U, 0xa6a657f1U, 0xb4b473c7U, 0xc6c69751U 1248.word 0xe8e8cb23U, 0xdddda17cU, 0x7474e89cU, 0x1f1f3e21U 1249.word 0x4b4b96ddU, 0xbdbd61dcU, 0x8b8b0d86U, 0x8a8a0f85U 1250.word 0x7070e090U, 0x3e3e7c42U, 0xb5b571c4U, 0x6666ccaaU 1251.word 0x484890d8U, 0x03030605U, 0xf6f6f701U, 0x0e0e1c12U 1252.word 0x6161c2a3U, 0x35356a5fU, 0x5757aef9U, 0xb9b969d0U 1253.word 0x86861791U, 0xc1c19958U, 0x1d1d3a27U, 0x9e9e27b9U 1254.word 0xe1e1d938U, 0xf8f8eb13U, 0x98982bb3U, 0x11112233U 1255.word 0x6969d2bbU, 0xd9d9a970U, 0x8e8e0789U, 0x949433a7U 1256.word 0x9b9b2db6U, 0x1e1e3c22U, 0x87871592U, 0xe9e9c920U 1257.word 0xcece8749U, 0x5555aaffU, 0x28285078U, 0xdfdfa57aU 1258.word 0x8c8c038fU, 0xa1a159f8U, 0x89890980U, 0x0d0d1a17U 1259.word 0xbfbf65daU, 0xe6e6d731U, 0x424284c6U, 0x6868d0b8U 1260.word 0x414182c3U, 0x999929b0U, 0x2d2d5a77U, 0x0f0f1e11U 1261.word 0xb0b07bcbU, 0x5454a8fcU, 0xbbbb6dd6U, 0x16162c3aU 1262 1263.type AES_Te2,\@object 1264AES_Te2: 1265.word 0x63c6a563U, 0x7cf8847cU, 0x77ee9977U, 0x7bf68d7bU 1266.word 0xf2ff0df2U, 0x6bd6bd6bU, 0x6fdeb16fU, 0xc59154c5U 1267.word 0x30605030U, 0x01020301U, 0x67cea967U, 0x2b567d2bU 1268.word 0xfee719feU, 0xd7b562d7U, 0xab4de6abU, 0x76ec9a76U 1269.word 0xca8f45caU, 0x821f9d82U, 0xc98940c9U, 0x7dfa877dU 1270.word 0xfaef15faU, 0x59b2eb59U, 0x478ec947U, 0xf0fb0bf0U 1271.word 0xad41ecadU, 0xd4b367d4U, 0xa25ffda2U, 0xaf45eaafU 1272.word 0x9c23bf9cU, 0xa453f7a4U, 0x72e49672U, 0xc09b5bc0U 1273.word 0xb775c2b7U, 0xfde11cfdU, 0x933dae93U, 0x264c6a26U 1274.word 0x366c5a36U, 0x3f7e413fU, 0xf7f502f7U, 0xcc834fccU 1275.word 0x34685c34U, 0xa551f4a5U, 0xe5d134e5U, 0xf1f908f1U 1276.word 0x71e29371U, 0xd8ab73d8U, 0x31625331U, 0x152a3f15U 1277.word 0x04080c04U, 0xc79552c7U, 0x23466523U, 0xc39d5ec3U 1278.word 0x18302818U, 0x9637a196U, 0x050a0f05U, 0x9a2fb59aU 1279.word 0x070e0907U, 0x12243612U, 0x801b9b80U, 0xe2df3de2U 1280.word 0xebcd26ebU, 0x274e6927U, 0xb27fcdb2U, 0x75ea9f75U 1281.word 0x09121b09U, 0x831d9e83U, 0x2c58742cU, 0x1a342e1aU 1282.word 0x1b362d1bU, 0x6edcb26eU, 0x5ab4ee5aU, 0xa05bfba0U 1283.word 0x52a4f652U, 0x3b764d3bU, 0xd6b761d6U, 0xb37dceb3U 1284.word 0x29527b29U, 0xe3dd3ee3U, 0x2f5e712fU, 0x84139784U 1285.word 0x53a6f553U, 0xd1b968d1U, 0x00000000U, 0xedc12cedU 1286.word 0x20406020U, 0xfce31ffcU, 0xb179c8b1U, 0x5bb6ed5bU 1287.word 0x6ad4be6aU, 0xcb8d46cbU, 0xbe67d9beU, 0x39724b39U 1288.word 0x4a94de4aU, 0x4c98d44cU, 0x58b0e858U, 0xcf854acfU 1289.word 0xd0bb6bd0U, 0xefc52aefU, 0xaa4fe5aaU, 0xfbed16fbU 1290.word 0x4386c543U, 0x4d9ad74dU, 0x33665533U, 0x85119485U 1291.word 0x458acf45U, 0xf9e910f9U, 0x02040602U, 0x7ffe817fU 1292.word 0x50a0f050U, 0x3c78443cU, 0x9f25ba9fU, 0xa84be3a8U 1293.word 0x51a2f351U, 0xa35dfea3U, 0x4080c040U, 0x8f058a8fU 1294.word 0x923fad92U, 0x9d21bc9dU, 0x38704838U, 0xf5f104f5U 1295.word 0xbc63dfbcU, 0xb677c1b6U, 0xdaaf75daU, 0x21426321U 1296.word 0x10203010U, 0xffe51affU, 0xf3fd0ef3U, 0xd2bf6dd2U 1297.word 0xcd814ccdU, 0x0c18140cU, 0x13263513U, 0xecc32fecU 1298.word 0x5fbee15fU, 0x9735a297U, 0x4488cc44U, 0x172e3917U 1299.word 0xc49357c4U, 0xa755f2a7U, 0x7efc827eU, 0x3d7a473dU 1300.word 0x64c8ac64U, 0x5dbae75dU, 0x19322b19U, 0x73e69573U 1301.word 0x60c0a060U, 0x81199881U, 0x4f9ed14fU, 0xdca37fdcU 1302.word 0x22446622U, 0x2a547e2aU, 0x903bab90U, 0x880b8388U 1303.word 0x468cca46U, 0xeec729eeU, 0xb86bd3b8U, 0x14283c14U 1304.word 0xdea779deU, 0x5ebce25eU, 0x0b161d0bU, 0xdbad76dbU 1305.word 0xe0db3be0U, 0x32645632U, 0x3a744e3aU, 0x0a141e0aU 1306.word 0x4992db49U, 0x060c0a06U, 0x24486c24U, 0x5cb8e45cU 1307.word 0xc29f5dc2U, 0xd3bd6ed3U, 0xac43efacU, 0x62c4a662U 1308.word 0x9139a891U, 0x9531a495U, 0xe4d337e4U, 0x79f28b79U 1309.word 0xe7d532e7U, 0xc88b43c8U, 0x376e5937U, 0x6ddab76dU 1310.word 0x8d018c8dU, 0xd5b164d5U, 0x4e9cd24eU, 0xa949e0a9U 1311.word 0x6cd8b46cU, 0x56acfa56U, 0xf4f307f4U, 0xeacf25eaU 1312.word 0x65caaf65U, 0x7af48e7aU, 0xae47e9aeU, 0x08101808U 1313.word 0xba6fd5baU, 0x78f08878U, 0x254a6f25U, 0x2e5c722eU 1314.word 0x1c38241cU, 0xa657f1a6U, 0xb473c7b4U, 0xc69751c6U 1315.word 0xe8cb23e8U, 0xdda17cddU, 0x74e89c74U, 0x1f3e211fU 1316.word 0x4b96dd4bU, 0xbd61dcbdU, 0x8b0d868bU, 0x8a0f858aU 1317.word 0x70e09070U, 0x3e7c423eU, 0xb571c4b5U, 0x66ccaa66U 1318.word 0x4890d848U, 0x03060503U, 0xf6f701f6U, 0x0e1c120eU 1319.word 0x61c2a361U, 0x356a5f35U, 0x57aef957U, 0xb969d0b9U 1320.word 0x86179186U, 0xc19958c1U, 0x1d3a271dU, 0x9e27b99eU 1321.word 0xe1d938e1U, 0xf8eb13f8U, 0x982bb398U, 0x11223311U 1322.word 0x69d2bb69U, 0xd9a970d9U, 0x8e07898eU, 0x9433a794U 1323.word 0x9b2db69bU, 0x1e3c221eU, 0x87159287U, 0xe9c920e9U 1324.word 0xce8749ceU, 0x55aaff55U, 0x28507828U, 0xdfa57adfU 1325.word 0x8c038f8cU, 0xa159f8a1U, 0x89098089U, 0x0d1a170dU 1326.word 0xbf65dabfU, 0xe6d731e6U, 0x4284c642U, 0x68d0b868U 1327.word 0x4182c341U, 0x9929b099U, 0x2d5a772dU, 0x0f1e110fU 1328.word 0xb07bcbb0U, 0x54a8fc54U, 0xbb6dd6bbU, 0x162c3a16U 1329 1330.type AES_Te3,\@object 1331AES_Te3: 1332.word 0xc6a56363U, 0xf8847c7cU, 0xee997777U, 0xf68d7b7bU 1333.word 0xff0df2f2U, 0xd6bd6b6bU, 0xdeb16f6fU, 0x9154c5c5U 1334.word 0x60503030U, 0x02030101U, 0xcea96767U, 0x567d2b2bU 1335.word 0xe719fefeU, 0xb562d7d7U, 0x4de6ababU, 0xec9a7676U 1336.word 0x8f45cacaU, 0x1f9d8282U, 0x8940c9c9U, 0xfa877d7dU 1337.word 0xef15fafaU, 0xb2eb5959U, 0x8ec94747U, 0xfb0bf0f0U 1338.word 0x41ecadadU, 0xb367d4d4U, 0x5ffda2a2U, 0x45eaafafU 1339.word 0x23bf9c9cU, 0x53f7a4a4U, 0xe4967272U, 0x9b5bc0c0U 1340.word 0x75c2b7b7U, 0xe11cfdfdU, 0x3dae9393U, 0x4c6a2626U 1341.word 0x6c5a3636U, 0x7e413f3fU, 0xf502f7f7U, 0x834fccccU 1342.word 0x685c3434U, 0x51f4a5a5U, 0xd134e5e5U, 0xf908f1f1U 1343.word 0xe2937171U, 0xab73d8d8U, 0x62533131U, 0x2a3f1515U 1344.word 0x080c0404U, 0x9552c7c7U, 0x46652323U, 0x9d5ec3c3U 1345.word 0x30281818U, 0x37a19696U, 0x0a0f0505U, 0x2fb59a9aU 1346.word 0x0e090707U, 0x24361212U, 0x1b9b8080U, 0xdf3de2e2U 1347.word 0xcd26ebebU, 0x4e692727U, 0x7fcdb2b2U, 0xea9f7575U 1348.word 0x121b0909U, 0x1d9e8383U, 0x58742c2cU, 0x342e1a1aU 1349.word 0x362d1b1bU, 0xdcb26e6eU, 0xb4ee5a5aU, 0x5bfba0a0U 1350.word 0xa4f65252U, 0x764d3b3bU, 0xb761d6d6U, 0x7dceb3b3U 1351.word 0x527b2929U, 0xdd3ee3e3U, 0x5e712f2fU, 0x13978484U 1352.word 0xa6f55353U, 0xb968d1d1U, 0x00000000U, 0xc12cededU 1353.word 0x40602020U, 0xe31ffcfcU, 0x79c8b1b1U, 0xb6ed5b5bU 1354.word 0xd4be6a6aU, 0x8d46cbcbU, 0x67d9bebeU, 0x724b3939U 1355.word 0x94de4a4aU, 0x98d44c4cU, 0xb0e85858U, 0x854acfcfU 1356.word 0xbb6bd0d0U, 0xc52aefefU, 0x4fe5aaaaU, 0xed16fbfbU 1357.word 0x86c54343U, 0x9ad74d4dU, 0x66553333U, 0x11948585U 1358.word 0x8acf4545U, 0xe910f9f9U, 0x04060202U, 0xfe817f7fU 1359.word 0xa0f05050U, 0x78443c3cU, 0x25ba9f9fU, 0x4be3a8a8U 1360.word 0xa2f35151U, 0x5dfea3a3U, 0x80c04040U, 0x058a8f8fU 1361.word 0x3fad9292U, 0x21bc9d9dU, 0x70483838U, 0xf104f5f5U 1362.word 0x63dfbcbcU, 0x77c1b6b6U, 0xaf75dadaU, 0x42632121U 1363.word 0x20301010U, 0xe51affffU, 0xfd0ef3f3U, 0xbf6dd2d2U 1364.word 0x814ccdcdU, 0x18140c0cU, 0x26351313U, 0xc32fececU 1365.word 0xbee15f5fU, 0x35a29797U, 0x88cc4444U, 0x2e391717U 1366.word 0x9357c4c4U, 0x55f2a7a7U, 0xfc827e7eU, 0x7a473d3dU 1367.word 0xc8ac6464U, 0xbae75d5dU, 0x322b1919U, 0xe6957373U 1368.word 0xc0a06060U, 0x19988181U, 0x9ed14f4fU, 0xa37fdcdcU 1369.word 0x44662222U, 0x547e2a2aU, 0x3bab9090U, 0x0b838888U 1370.word 0x8cca4646U, 0xc729eeeeU, 0x6bd3b8b8U, 0x283c1414U 1371.word 0xa779dedeU, 0xbce25e5eU, 0x161d0b0bU, 0xad76dbdbU 1372.word 0xdb3be0e0U, 0x64563232U, 0x744e3a3aU, 0x141e0a0aU 1373.word 0x92db4949U, 0x0c0a0606U, 0x486c2424U, 0xb8e45c5cU 1374.word 0x9f5dc2c2U, 0xbd6ed3d3U, 0x43efacacU, 0xc4a66262U 1375.word 0x39a89191U, 0x31a49595U, 0xd337e4e4U, 0xf28b7979U 1376.word 0xd532e7e7U, 0x8b43c8c8U, 0x6e593737U, 0xdab76d6dU 1377.word 0x018c8d8dU, 0xb164d5d5U, 0x9cd24e4eU, 0x49e0a9a9U 1378.word 0xd8b46c6cU, 0xacfa5656U, 0xf307f4f4U, 0xcf25eaeaU 1379.word 0xcaaf6565U, 0xf48e7a7aU, 0x47e9aeaeU, 0x10180808U 1380.word 0x6fd5babaU, 0xf0887878U, 0x4a6f2525U, 0x5c722e2eU 1381.word 0x38241c1cU, 0x57f1a6a6U, 0x73c7b4b4U, 0x9751c6c6U 1382.word 0xcb23e8e8U, 0xa17cddddU, 0xe89c7474U, 0x3e211f1fU 1383.word 0x96dd4b4bU, 0x61dcbdbdU, 0x0d868b8bU, 0x0f858a8aU 1384.word 0xe0907070U, 0x7c423e3eU, 0x71c4b5b5U, 0xccaa6666U 1385.word 0x90d84848U, 0x06050303U, 0xf701f6f6U, 0x1c120e0eU 1386.word 0xc2a36161U, 0x6a5f3535U, 0xaef95757U, 0x69d0b9b9U 1387.word 0x17918686U, 0x9958c1c1U, 0x3a271d1dU, 0x27b99e9eU 1388.word 0xd938e1e1U, 0xeb13f8f8U, 0x2bb39898U, 0x22331111U 1389.word 0xd2bb6969U, 0xa970d9d9U, 0x07898e8eU, 0x33a79494U 1390.word 0x2db69b9bU, 0x3c221e1eU, 0x15928787U, 0xc920e9e9U 1391.word 0x8749ceceU, 0xaaff5555U, 0x50782828U, 0xa57adfdfU 1392.word 0x038f8c8cU, 0x59f8a1a1U, 0x09808989U, 0x1a170d0dU 1393.word 0x65dabfbfU, 0xd731e6e6U, 0x84c64242U, 0xd0b86868U 1394.word 0x82c34141U, 0x29b09999U, 0x5a772d2dU, 0x1e110f0fU 1395.word 0x7bcbb0b0U, 0xa8fc5454U, 0x6dd6bbbbU, 0x2c3a1616U 1396 1397.p2align 12 1398.type AES_Td0,\@object 1399AES_Td0: 1400.word 0x50a7f451U, 0x5365417eU, 0xc3a4171aU, 0x965e273aU 1401.word 0xcb6bab3bU, 0xf1459d1fU, 0xab58faacU, 0x9303e34bU 1402.word 0x55fa3020U, 0xf66d76adU, 0x9176cc88U, 0x254c02f5U 1403.word 0xfcd7e54fU, 0xd7cb2ac5U, 0x80443526U, 0x8fa362b5U 1404.word 0x495ab1deU, 0x671bba25U, 0x980eea45U, 0xe1c0fe5dU 1405.word 0x02752fc3U, 0x12f04c81U, 0xa397468dU, 0xc6f9d36bU 1406.word 0xe75f8f03U, 0x959c9215U, 0xeb7a6dbfU, 0xda595295U 1407.word 0x2d83bed4U, 0xd3217458U, 0x2969e049U, 0x44c8c98eU 1408.word 0x6a89c275U, 0x78798ef4U, 0x6b3e5899U, 0xdd71b927U 1409.word 0xb64fe1beU, 0x17ad88f0U, 0x66ac20c9U, 0xb43ace7dU 1410.word 0x184adf63U, 0x82311ae5U, 0x60335197U, 0x457f5362U 1411.word 0xe07764b1U, 0x84ae6bbbU, 0x1ca081feU, 0x942b08f9U 1412.word 0x58684870U, 0x19fd458fU, 0x876cde94U, 0xb7f87b52U 1413.word 0x23d373abU, 0xe2024b72U, 0x578f1fe3U, 0x2aab5566U 1414.word 0x0728ebb2U, 0x03c2b52fU, 0x9a7bc586U, 0xa50837d3U 1415.word 0xf2872830U, 0xb2a5bf23U, 0xba6a0302U, 0x5c8216edU 1416.word 0x2b1ccf8aU, 0x92b479a7U, 0xf0f207f3U, 0xa1e2694eU 1417.word 0xcdf4da65U, 0xd5be0506U, 0x1f6234d1U, 0x8afea6c4U 1418.word 0x9d532e34U, 0xa055f3a2U, 0x32e18a05U, 0x75ebf6a4U 1419.word 0x39ec830bU, 0xaaef6040U, 0x069f715eU, 0x51106ebdU 1420.word 0xf98a213eU, 0x3d06dd96U, 0xae053eddU, 0x46bde64dU 1421.word 0xb58d5491U, 0x055dc471U, 0x6fd40604U, 0xff155060U 1422.word 0x24fb9819U, 0x97e9bdd6U, 0xcc434089U, 0x779ed967U 1423.word 0xbd42e8b0U, 0x888b8907U, 0x385b19e7U, 0xdbeec879U 1424.word 0x470a7ca1U, 0xe90f427cU, 0xc91e84f8U, 0x00000000U 1425.word 0x83868009U, 0x48ed2b32U, 0xac70111eU, 0x4e725a6cU 1426.word 0xfbff0efdU, 0x5638850fU, 0x1ed5ae3dU, 0x27392d36U 1427.word 0x64d90f0aU, 0x21a65c68U, 0xd1545b9bU, 0x3a2e3624U 1428.word 0xb1670a0cU, 0x0fe75793U, 0xd296eeb4U, 0x9e919b1bU 1429.word 0x4fc5c080U, 0xa220dc61U, 0x694b775aU, 0x161a121cU 1430.word 0x0aba93e2U, 0xe52aa0c0U, 0x43e0223cU, 0x1d171b12U 1431.word 0x0b0d090eU, 0xadc78bf2U, 0xb9a8b62dU, 0xc8a91e14U 1432.word 0x8519f157U, 0x4c0775afU, 0xbbdd99eeU, 0xfd607fa3U 1433.word 0x9f2601f7U, 0xbcf5725cU, 0xc53b6644U, 0x347efb5bU 1434.word 0x7629438bU, 0xdcc623cbU, 0x68fcedb6U, 0x63f1e4b8U 1435.word 0xcadc31d7U, 0x10856342U, 0x40229713U, 0x2011c684U 1436.word 0x7d244a85U, 0xf83dbbd2U, 0x1132f9aeU, 0x6da129c7U 1437.word 0x4b2f9e1dU, 0xf330b2dcU, 0xec52860dU, 0xd0e3c177U 1438.word 0x6c16b32bU, 0x99b970a9U, 0xfa489411U, 0x2264e947U 1439.word 0xc48cfca8U, 0x1a3ff0a0U, 0xd82c7d56U, 0xef903322U 1440.word 0xc74e4987U, 0xc1d138d9U, 0xfea2ca8cU, 0x360bd498U 1441.word 0xcf81f5a6U, 0x28de7aa5U, 0x268eb7daU, 0xa4bfad3fU 1442.word 0xe49d3a2cU, 0x0d927850U, 0x9bcc5f6aU, 0x62467e54U 1443.word 0xc2138df6U, 0xe8b8d890U, 0x5ef7392eU, 0xf5afc382U 1444.word 0xbe805d9fU, 0x7c93d069U, 0xa92dd56fU, 0xb31225cfU 1445.word 0x3b99acc8U, 0xa77d1810U, 0x6e639ce8U, 0x7bbb3bdbU 1446.word 0x097826cdU, 0xf418596eU, 0x01b79aecU, 0xa89a4f83U 1447.word 0x656e95e6U, 0x7ee6ffaaU, 0x08cfbc21U, 0xe6e815efU 1448.word 0xd99be7baU, 0xce366f4aU, 0xd4099feaU, 0xd67cb029U 1449.word 0xafb2a431U, 0x31233f2aU, 0x3094a5c6U, 0xc066a235U 1450.word 0x37bc4e74U, 0xa6ca82fcU, 0xb0d090e0U, 0x15d8a733U 1451.word 0x4a9804f1U, 0xf7daec41U, 0x0e50cd7fU, 0x2ff69117U 1452.word 0x8dd64d76U, 0x4db0ef43U, 0x544daaccU, 0xdf0496e4U 1453.word 0xe3b5d19eU, 0x1b886a4cU, 0xb81f2cc1U, 0x7f516546U 1454.word 0x04ea5e9dU, 0x5d358c01U, 0x737487faU, 0x2e410bfbU 1455.word 0x5a1d67b3U, 0x52d2db92U, 0x335610e9U, 0x1347d66dU 1456.word 0x8c61d79aU, 0x7a0ca137U, 0x8e14f859U, 0x893c13ebU 1457.word 0xee27a9ceU, 0x35c961b7U, 0xede51ce1U, 0x3cb1477aU 1458.word 0x59dfd29cU, 0x3f73f255U, 0x79ce1418U, 0xbf37c773U 1459.word 0xeacdf753U, 0x5baafd5fU, 0x146f3ddfU, 0x86db4478U 1460.word 0x81f3afcaU, 0x3ec468b9U, 0x2c342438U, 0x5f40a3c2U 1461.word 0x72c31d16U, 0x0c25e2bcU, 0x8b493c28U, 0x41950dffU 1462.word 0x7101a839U, 0xdeb30c08U, 0x9ce4b4d8U, 0x90c15664U 1463.word 0x6184cb7bU, 0x70b632d5U, 0x745c6c48U, 0x4257b8d0U 1464 1465.type AES_Td1,\@object 1466AES_Td1: 1467.word 0xa7f45150U, 0x65417e53U, 0xa4171ac3U, 0x5e273a96U 1468.word 0x6bab3bcbU, 0x459d1ff1U, 0x58faacabU, 0x03e34b93U 1469.word 0xfa302055U, 0x6d76adf6U, 0x76cc8891U, 0x4c02f525U 1470.word 0xd7e54ffcU, 0xcb2ac5d7U, 0x44352680U, 0xa362b58fU 1471.word 0x5ab1de49U, 0x1bba2567U, 0x0eea4598U, 0xc0fe5de1U 1472.word 0x752fc302U, 0xf04c8112U, 0x97468da3U, 0xf9d36bc6U 1473.word 0x5f8f03e7U, 0x9c921595U, 0x7a6dbfebU, 0x595295daU 1474.word 0x83bed42dU, 0x217458d3U, 0x69e04929U, 0xc8c98e44U 1475.word 0x89c2756aU, 0x798ef478U, 0x3e58996bU, 0x71b927ddU 1476.word 0x4fe1beb6U, 0xad88f017U, 0xac20c966U, 0x3ace7db4U 1477.word 0x4adf6318U, 0x311ae582U, 0x33519760U, 0x7f536245U 1478.word 0x7764b1e0U, 0xae6bbb84U, 0xa081fe1cU, 0x2b08f994U 1479.word 0x68487058U, 0xfd458f19U, 0x6cde9487U, 0xf87b52b7U 1480.word 0xd373ab23U, 0x024b72e2U, 0x8f1fe357U, 0xab55662aU 1481.word 0x28ebb207U, 0xc2b52f03U, 0x7bc5869aU, 0x0837d3a5U 1482.word 0x872830f2U, 0xa5bf23b2U, 0x6a0302baU, 0x8216ed5cU 1483.word 0x1ccf8a2bU, 0xb479a792U, 0xf207f3f0U, 0xe2694ea1U 1484.word 0xf4da65cdU, 0xbe0506d5U, 0x6234d11fU, 0xfea6c48aU 1485.word 0x532e349dU, 0x55f3a2a0U, 0xe18a0532U, 0xebf6a475U 1486.word 0xec830b39U, 0xef6040aaU, 0x9f715e06U, 0x106ebd51U 1487.word 0x8a213ef9U, 0x06dd963dU, 0x053eddaeU, 0xbde64d46U 1488.word 0x8d5491b5U, 0x5dc47105U, 0xd406046fU, 0x155060ffU 1489.word 0xfb981924U, 0xe9bdd697U, 0x434089ccU, 0x9ed96777U 1490.word 0x42e8b0bdU, 0x8b890788U, 0x5b19e738U, 0xeec879dbU 1491.word 0x0a7ca147U, 0x0f427ce9U, 0x1e84f8c9U, 0x00000000U 1492.word 0x86800983U, 0xed2b3248U, 0x70111eacU, 0x725a6c4eU 1493.word 0xff0efdfbU, 0x38850f56U, 0xd5ae3d1eU, 0x392d3627U 1494.word 0xd90f0a64U, 0xa65c6821U, 0x545b9bd1U, 0x2e36243aU 1495.word 0x670a0cb1U, 0xe757930fU, 0x96eeb4d2U, 0x919b1b9eU 1496.word 0xc5c0804fU, 0x20dc61a2U, 0x4b775a69U, 0x1a121c16U 1497.word 0xba93e20aU, 0x2aa0c0e5U, 0xe0223c43U, 0x171b121dU 1498.word 0x0d090e0bU, 0xc78bf2adU, 0xa8b62db9U, 0xa91e14c8U 1499.word 0x19f15785U, 0x0775af4cU, 0xdd99eebbU, 0x607fa3fdU 1500.word 0x2601f79fU, 0xf5725cbcU, 0x3b6644c5U, 0x7efb5b34U 1501.word 0x29438b76U, 0xc623cbdcU, 0xfcedb668U, 0xf1e4b863U 1502.word 0xdc31d7caU, 0x85634210U, 0x22971340U, 0x11c68420U 1503.word 0x244a857dU, 0x3dbbd2f8U, 0x32f9ae11U, 0xa129c76dU 1504.word 0x2f9e1d4bU, 0x30b2dcf3U, 0x52860decU, 0xe3c177d0U 1505.word 0x16b32b6cU, 0xb970a999U, 0x489411faU, 0x64e94722U 1506.word 0x8cfca8c4U, 0x3ff0a01aU, 0x2c7d56d8U, 0x903322efU 1507.word 0x4e4987c7U, 0xd138d9c1U, 0xa2ca8cfeU, 0x0bd49836U 1508.word 0x81f5a6cfU, 0xde7aa528U, 0x8eb7da26U, 0xbfad3fa4U 1509.word 0x9d3a2ce4U, 0x9278500dU, 0xcc5f6a9bU, 0x467e5462U 1510.word 0x138df6c2U, 0xb8d890e8U, 0xf7392e5eU, 0xafc382f5U 1511.word 0x805d9fbeU, 0x93d0697cU, 0x2dd56fa9U, 0x1225cfb3U 1512.word 0x99acc83bU, 0x7d1810a7U, 0x639ce86eU, 0xbb3bdb7bU 1513.word 0x7826cd09U, 0x18596ef4U, 0xb79aec01U, 0x9a4f83a8U 1514.word 0x6e95e665U, 0xe6ffaa7eU, 0xcfbc2108U, 0xe815efe6U 1515.word 0x9be7bad9U, 0x366f4aceU, 0x099fead4U, 0x7cb029d6U 1516.word 0xb2a431afU, 0x233f2a31U, 0x94a5c630U, 0x66a235c0U 1517.word 0xbc4e7437U, 0xca82fca6U, 0xd090e0b0U, 0xd8a73315U 1518.word 0x9804f14aU, 0xdaec41f7U, 0x50cd7f0eU, 0xf691172fU 1519.word 0xd64d768dU, 0xb0ef434dU, 0x4daacc54U, 0x0496e4dfU 1520.word 0xb5d19ee3U, 0x886a4c1bU, 0x1f2cc1b8U, 0x5165467fU 1521.word 0xea5e9d04U, 0x358c015dU, 0x7487fa73U, 0x410bfb2eU 1522.word 0x1d67b35aU, 0xd2db9252U, 0x5610e933U, 0x47d66d13U 1523.word 0x61d79a8cU, 0x0ca1377aU, 0x14f8598eU, 0x3c13eb89U 1524.word 0x27a9ceeeU, 0xc961b735U, 0xe51ce1edU, 0xb1477a3cU 1525.word 0xdfd29c59U, 0x73f2553fU, 0xce141879U, 0x37c773bfU 1526.word 0xcdf753eaU, 0xaafd5f5bU, 0x6f3ddf14U, 0xdb447886U 1527.word 0xf3afca81U, 0xc468b93eU, 0x3424382cU, 0x40a3c25fU 1528.word 0xc31d1672U, 0x25e2bc0cU, 0x493c288bU, 0x950dff41U 1529.word 0x01a83971U, 0xb30c08deU, 0xe4b4d89cU, 0xc1566490U 1530.word 0x84cb7b61U, 0xb632d570U, 0x5c6c4874U, 0x57b8d042U 1531 1532.type AES_Td2,\@object 1533AES_Td2: 1534.word 0xf45150a7U, 0x417e5365U, 0x171ac3a4U, 0x273a965eU 1535.word 0xab3bcb6bU, 0x9d1ff145U, 0xfaacab58U, 0xe34b9303U 1536.word 0x302055faU, 0x76adf66dU, 0xcc889176U, 0x02f5254cU 1537.word 0xe54ffcd7U, 0x2ac5d7cbU, 0x35268044U, 0x62b58fa3U 1538.word 0xb1de495aU, 0xba25671bU, 0xea45980eU, 0xfe5de1c0U 1539.word 0x2fc30275U, 0x4c8112f0U, 0x468da397U, 0xd36bc6f9U 1540.word 0x8f03e75fU, 0x9215959cU, 0x6dbfeb7aU, 0x5295da59U 1541.word 0xbed42d83U, 0x7458d321U, 0xe0492969U, 0xc98e44c8U 1542.word 0xc2756a89U, 0x8ef47879U, 0x58996b3eU, 0xb927dd71U 1543.word 0xe1beb64fU, 0x88f017adU, 0x20c966acU, 0xce7db43aU 1544.word 0xdf63184aU, 0x1ae58231U, 0x51976033U, 0x5362457fU 1545.word 0x64b1e077U, 0x6bbb84aeU, 0x81fe1ca0U, 0x08f9942bU 1546.word 0x48705868U, 0x458f19fdU, 0xde94876cU, 0x7b52b7f8U 1547.word 0x73ab23d3U, 0x4b72e202U, 0x1fe3578fU, 0x55662aabU 1548.word 0xebb20728U, 0xb52f03c2U, 0xc5869a7bU, 0x37d3a508U 1549.word 0x2830f287U, 0xbf23b2a5U, 0x0302ba6aU, 0x16ed5c82U 1550.word 0xcf8a2b1cU, 0x79a792b4U, 0x07f3f0f2U, 0x694ea1e2U 1551.word 0xda65cdf4U, 0x0506d5beU, 0x34d11f62U, 0xa6c48afeU 1552.word 0x2e349d53U, 0xf3a2a055U, 0x8a0532e1U, 0xf6a475ebU 1553.word 0x830b39ecU, 0x6040aaefU, 0x715e069fU, 0x6ebd5110U 1554.word 0x213ef98aU, 0xdd963d06U, 0x3eddae05U, 0xe64d46bdU 1555.word 0x5491b58dU, 0xc471055dU, 0x06046fd4U, 0x5060ff15U 1556.word 0x981924fbU, 0xbdd697e9U, 0x4089cc43U, 0xd967779eU 1557.word 0xe8b0bd42U, 0x8907888bU, 0x19e7385bU, 0xc879dbeeU 1558.word 0x7ca1470aU, 0x427ce90fU, 0x84f8c91eU, 0x00000000U 1559.word 0x80098386U, 0x2b3248edU, 0x111eac70U, 0x5a6c4e72U 1560.word 0x0efdfbffU, 0x850f5638U, 0xae3d1ed5U, 0x2d362739U 1561.word 0x0f0a64d9U, 0x5c6821a6U, 0x5b9bd154U, 0x36243a2eU 1562.word 0x0a0cb167U, 0x57930fe7U, 0xeeb4d296U, 0x9b1b9e91U 1563.word 0xc0804fc5U, 0xdc61a220U, 0x775a694bU, 0x121c161aU 1564.word 0x93e20abaU, 0xa0c0e52aU, 0x223c43e0U, 0x1b121d17U 1565.word 0x090e0b0dU, 0x8bf2adc7U, 0xb62db9a8U, 0x1e14c8a9U 1566.word 0xf1578519U, 0x75af4c07U, 0x99eebbddU, 0x7fa3fd60U 1567.word 0x01f79f26U, 0x725cbcf5U, 0x6644c53bU, 0xfb5b347eU 1568.word 0x438b7629U, 0x23cbdcc6U, 0xedb668fcU, 0xe4b863f1U 1569.word 0x31d7cadcU, 0x63421085U, 0x97134022U, 0xc6842011U 1570.word 0x4a857d24U, 0xbbd2f83dU, 0xf9ae1132U, 0x29c76da1U 1571.word 0x9e1d4b2fU, 0xb2dcf330U, 0x860dec52U, 0xc177d0e3U 1572.word 0xb32b6c16U, 0x70a999b9U, 0x9411fa48U, 0xe9472264U 1573.word 0xfca8c48cU, 0xf0a01a3fU, 0x7d56d82cU, 0x3322ef90U 1574.word 0x4987c74eU, 0x38d9c1d1U, 0xca8cfea2U, 0xd498360bU 1575.word 0xf5a6cf81U, 0x7aa528deU, 0xb7da268eU, 0xad3fa4bfU 1576.word 0x3a2ce49dU, 0x78500d92U, 0x5f6a9bccU, 0x7e546246U 1577.word 0x8df6c213U, 0xd890e8b8U, 0x392e5ef7U, 0xc382f5afU 1578.word 0x5d9fbe80U, 0xd0697c93U, 0xd56fa92dU, 0x25cfb312U 1579.word 0xacc83b99U, 0x1810a77dU, 0x9ce86e63U, 0x3bdb7bbbU 1580.word 0x26cd0978U, 0x596ef418U, 0x9aec01b7U, 0x4f83a89aU 1581.word 0x95e6656eU, 0xffaa7ee6U, 0xbc2108cfU, 0x15efe6e8U 1582.word 0xe7bad99bU, 0x6f4ace36U, 0x9fead409U, 0xb029d67cU 1583.word 0xa431afb2U, 0x3f2a3123U, 0xa5c63094U, 0xa235c066U 1584.word 0x4e7437bcU, 0x82fca6caU, 0x90e0b0d0U, 0xa73315d8U 1585.word 0x04f14a98U, 0xec41f7daU, 0xcd7f0e50U, 0x91172ff6U 1586.word 0x4d768dd6U, 0xef434db0U, 0xaacc544dU, 0x96e4df04U 1587.word 0xd19ee3b5U, 0x6a4c1b88U, 0x2cc1b81fU, 0x65467f51U 1588.word 0x5e9d04eaU, 0x8c015d35U, 0x87fa7374U, 0x0bfb2e41U 1589.word 0x67b35a1dU, 0xdb9252d2U, 0x10e93356U, 0xd66d1347U 1590.word 0xd79a8c61U, 0xa1377a0cU, 0xf8598e14U, 0x13eb893cU 1591.word 0xa9ceee27U, 0x61b735c9U, 0x1ce1ede5U, 0x477a3cb1U 1592.word 0xd29c59dfU, 0xf2553f73U, 0x141879ceU, 0xc773bf37U 1593.word 0xf753eacdU, 0xfd5f5baaU, 0x3ddf146fU, 0x447886dbU 1594.word 0xafca81f3U, 0x68b93ec4U, 0x24382c34U, 0xa3c25f40U 1595.word 0x1d1672c3U, 0xe2bc0c25U, 0x3c288b49U, 0x0dff4195U 1596.word 0xa8397101U, 0x0c08deb3U, 0xb4d89ce4U, 0x566490c1U 1597.word 0xcb7b6184U, 0x32d570b6U, 0x6c48745cU, 0xb8d04257U 1598 1599.type AES_Td3,\@object 1600AES_Td3: 1601.word 0x5150a7f4U, 0x7e536541U, 0x1ac3a417U, 0x3a965e27U 1602.word 0x3bcb6babU, 0x1ff1459dU, 0xacab58faU, 0x4b9303e3U 1603.word 0x2055fa30U, 0xadf66d76U, 0x889176ccU, 0xf5254c02U 1604.word 0x4ffcd7e5U, 0xc5d7cb2aU, 0x26804435U, 0xb58fa362U 1605.word 0xde495ab1U, 0x25671bbaU, 0x45980eeaU, 0x5de1c0feU 1606.word 0xc302752fU, 0x8112f04cU, 0x8da39746U, 0x6bc6f9d3U 1607.word 0x03e75f8fU, 0x15959c92U, 0xbfeb7a6dU, 0x95da5952U 1608.word 0xd42d83beU, 0x58d32174U, 0x492969e0U, 0x8e44c8c9U 1609.word 0x756a89c2U, 0xf478798eU, 0x996b3e58U, 0x27dd71b9U 1610.word 0xbeb64fe1U, 0xf017ad88U, 0xc966ac20U, 0x7db43aceU 1611.word 0x63184adfU, 0xe582311aU, 0x97603351U, 0x62457f53U 1612.word 0xb1e07764U, 0xbb84ae6bU, 0xfe1ca081U, 0xf9942b08U 1613.word 0x70586848U, 0x8f19fd45U, 0x94876cdeU, 0x52b7f87bU 1614.word 0xab23d373U, 0x72e2024bU, 0xe3578f1fU, 0x662aab55U 1615.word 0xb20728ebU, 0x2f03c2b5U, 0x869a7bc5U, 0xd3a50837U 1616.word 0x30f28728U, 0x23b2a5bfU, 0x02ba6a03U, 0xed5c8216U 1617.word 0x8a2b1ccfU, 0xa792b479U, 0xf3f0f207U, 0x4ea1e269U 1618.word 0x65cdf4daU, 0x06d5be05U, 0xd11f6234U, 0xc48afea6U 1619.word 0x349d532eU, 0xa2a055f3U, 0x0532e18aU, 0xa475ebf6U 1620.word 0x0b39ec83U, 0x40aaef60U, 0x5e069f71U, 0xbd51106eU 1621.word 0x3ef98a21U, 0x963d06ddU, 0xddae053eU, 0x4d46bde6U 1622.word 0x91b58d54U, 0x71055dc4U, 0x046fd406U, 0x60ff1550U 1623.word 0x1924fb98U, 0xd697e9bdU, 0x89cc4340U, 0x67779ed9U 1624.word 0xb0bd42e8U, 0x07888b89U, 0xe7385b19U, 0x79dbeec8U 1625.word 0xa1470a7cU, 0x7ce90f42U, 0xf8c91e84U, 0x00000000U 1626.word 0x09838680U, 0x3248ed2bU, 0x1eac7011U, 0x6c4e725aU 1627.word 0xfdfbff0eU, 0x0f563885U, 0x3d1ed5aeU, 0x3627392dU 1628.word 0x0a64d90fU, 0x6821a65cU, 0x9bd1545bU, 0x243a2e36U 1629.word 0x0cb1670aU, 0x930fe757U, 0xb4d296eeU, 0x1b9e919bU 1630.word 0x804fc5c0U, 0x61a220dcU, 0x5a694b77U, 0x1c161a12U 1631.word 0xe20aba93U, 0xc0e52aa0U, 0x3c43e022U, 0x121d171bU 1632.word 0x0e0b0d09U, 0xf2adc78bU, 0x2db9a8b6U, 0x14c8a91eU 1633.word 0x578519f1U, 0xaf4c0775U, 0xeebbdd99U, 0xa3fd607fU 1634.word 0xf79f2601U, 0x5cbcf572U, 0x44c53b66U, 0x5b347efbU 1635.word 0x8b762943U, 0xcbdcc623U, 0xb668fcedU, 0xb863f1e4U 1636.word 0xd7cadc31U, 0x42108563U, 0x13402297U, 0x842011c6U 1637.word 0x857d244aU, 0xd2f83dbbU, 0xae1132f9U, 0xc76da129U 1638.word 0x1d4b2f9eU, 0xdcf330b2U, 0x0dec5286U, 0x77d0e3c1U 1639.word 0x2b6c16b3U, 0xa999b970U, 0x11fa4894U, 0x472264e9U 1640.word 0xa8c48cfcU, 0xa01a3ff0U, 0x56d82c7dU, 0x22ef9033U 1641.word 0x87c74e49U, 0xd9c1d138U, 0x8cfea2caU, 0x98360bd4U 1642.word 0xa6cf81f5U, 0xa528de7aU, 0xda268eb7U, 0x3fa4bfadU 1643.word 0x2ce49d3aU, 0x500d9278U, 0x6a9bcc5fU, 0x5462467eU 1644.word 0xf6c2138dU, 0x90e8b8d8U, 0x2e5ef739U, 0x82f5afc3U 1645.word 0x9fbe805dU, 0x697c93d0U, 0x6fa92dd5U, 0xcfb31225U 1646.word 0xc83b99acU, 0x10a77d18U, 0xe86e639cU, 0xdb7bbb3bU 1647.word 0xcd097826U, 0x6ef41859U, 0xec01b79aU, 0x83a89a4fU 1648.word 0xe6656e95U, 0xaa7ee6ffU, 0x2108cfbcU, 0xefe6e815U 1649.word 0xbad99be7U, 0x4ace366fU, 0xead4099fU, 0x29d67cb0U 1650.word 0x31afb2a4U, 0x2a31233fU, 0xc63094a5U, 0x35c066a2U 1651.word 0x7437bc4eU, 0xfca6ca82U, 0xe0b0d090U, 0x3315d8a7U 1652.word 0xf14a9804U, 0x41f7daecU, 0x7f0e50cdU, 0x172ff691U 1653.word 0x768dd64dU, 0x434db0efU, 0xcc544daaU, 0xe4df0496U 1654.word 0x9ee3b5d1U, 0x4c1b886aU, 0xc1b81f2cU, 0x467f5165U 1655.word 0x9d04ea5eU, 0x015d358cU, 0xfa737487U, 0xfb2e410bU 1656.word 0xb35a1d67U, 0x9252d2dbU, 0xe9335610U, 0x6d1347d6U 1657.word 0x9a8c61d7U, 0x377a0ca1U, 0x598e14f8U, 0xeb893c13U 1658.word 0xceee27a9U, 0xb735c961U, 0xe1ede51cU, 0x7a3cb147U 1659.word 0x9c59dfd2U, 0x553f73f2U, 0x1879ce14U, 0x73bf37c7U 1660.word 0x53eacdf7U, 0x5f5baafdU, 0xdf146f3dU, 0x7886db44U 1661.word 0xca81f3afU, 0xb93ec468U, 0x382c3424U, 0xc25f40a3U 1662.word 0x1672c31dU, 0xbc0c25e2U, 0x288b493cU, 0xff41950dU 1663.word 0x397101a8U, 0x08deb30cU, 0xd89ce4b4U, 0x6490c156U 1664.word 0x7b6184cbU, 0xd570b632U, 0x48745c6cU, 0xd04257b8U 1665 1666.type AES_Td4,\@object 1667AES_Td4: 1668.byte 0x52U, 0x09U, 0x6aU, 0xd5U, 0x30U, 0x36U, 0xa5U, 0x38U 1669.byte 0xbfU, 0x40U, 0xa3U, 0x9eU, 0x81U, 0xf3U, 0xd7U, 0xfbU 1670.byte 0x7cU, 0xe3U, 0x39U, 0x82U, 0x9bU, 0x2fU, 0xffU, 0x87U 1671.byte 0x34U, 0x8eU, 0x43U, 0x44U, 0xc4U, 0xdeU, 0xe9U, 0xcbU 1672.byte 0x54U, 0x7bU, 0x94U, 0x32U, 0xa6U, 0xc2U, 0x23U, 0x3dU 1673.byte 0xeeU, 0x4cU, 0x95U, 0x0bU, 0x42U, 0xfaU, 0xc3U, 0x4eU 1674.byte 0x08U, 0x2eU, 0xa1U, 0x66U, 0x28U, 0xd9U, 0x24U, 0xb2U 1675.byte 0x76U, 0x5bU, 0xa2U, 0x49U, 0x6dU, 0x8bU, 0xd1U, 0x25U 1676.byte 0x72U, 0xf8U, 0xf6U, 0x64U, 0x86U, 0x68U, 0x98U, 0x16U 1677.byte 0xd4U, 0xa4U, 0x5cU, 0xccU, 0x5dU, 0x65U, 0xb6U, 0x92U 1678.byte 0x6cU, 0x70U, 0x48U, 0x50U, 0xfdU, 0xedU, 0xb9U, 0xdaU 1679.byte 0x5eU, 0x15U, 0x46U, 0x57U, 0xa7U, 0x8dU, 0x9dU, 0x84U 1680.byte 0x90U, 0xd8U, 0xabU, 0x00U, 0x8cU, 0xbcU, 0xd3U, 0x0aU 1681.byte 0xf7U, 0xe4U, 0x58U, 0x05U, 0xb8U, 0xb3U, 0x45U, 0x06U 1682.byte 0xd0U, 0x2cU, 0x1eU, 0x8fU, 0xcaU, 0x3fU, 0x0fU, 0x02U 1683.byte 0xc1U, 0xafU, 0xbdU, 0x03U, 0x01U, 0x13U, 0x8aU, 0x6bU 1684.byte 0x3aU, 0x91U, 0x11U, 0x41U, 0x4fU, 0x67U, 0xdcU, 0xeaU 1685.byte 0x97U, 0xf2U, 0xcfU, 0xceU, 0xf0U, 0xb4U, 0xe6U, 0x73U 1686.byte 0x96U, 0xacU, 0x74U, 0x22U, 0xe7U, 0xadU, 0x35U, 0x85U 1687.byte 0xe2U, 0xf9U, 0x37U, 0xe8U, 0x1cU, 0x75U, 0xdfU, 0x6eU 1688.byte 0x47U, 0xf1U, 0x1aU, 0x71U, 0x1dU, 0x29U, 0xc5U, 0x89U 1689.byte 0x6fU, 0xb7U, 0x62U, 0x0eU, 0xaaU, 0x18U, 0xbeU, 0x1bU 1690.byte 0xfcU, 0x56U, 0x3eU, 0x4bU, 0xc6U, 0xd2U, 0x79U, 0x20U 1691.byte 0x9aU, 0xdbU, 0xc0U, 0xfeU, 0x78U, 0xcdU, 0x5aU, 0xf4U 1692.byte 0x1fU, 0xddU, 0xa8U, 0x33U, 0x88U, 0x07U, 0xc7U, 0x31U 1693.byte 0xb1U, 0x12U, 0x10U, 0x59U, 0x27U, 0x80U, 0xecU, 0x5fU 1694.byte 0x60U, 0x51U, 0x7fU, 0xa9U, 0x19U, 0xb5U, 0x4aU, 0x0dU 1695.byte 0x2dU, 0xe5U, 0x7aU, 0x9fU, 0x93U, 0xc9U, 0x9cU, 0xefU 1696.byte 0xa0U, 0xe0U, 0x3bU, 0x4dU, 0xaeU, 0x2aU, 0xf5U, 0xb0U 1697.byte 0xc8U, 0xebU, 0xbbU, 0x3cU, 0x83U, 0x53U, 0x99U, 0x61U 1698.byte 0x17U, 0x2bU, 0x04U, 0x7eU, 0xbaU, 0x77U, 0xd6U, 0x26U 1699.byte 0xe1U, 0x69U, 0x14U, 0x63U, 0x55U, 0x21U, 0x0cU, 0x7dU 1700 1701.type AES_rcon,\@object 1702AES_rcon: 1703.word 0x00000001U, 0x00000002U, 0x00000004U, 0x00000008U 1704.word 0x00000010U, 0x00000020U, 0x00000040U, 0x00000080U 1705.word 0x0000001BU, 0x00000036U 1706___ 1707 1708print $code; 1709close STDOUT or die "error closing STDOUT: $!"; 1710