1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22/* 23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27#pragma ident "%Z%%M% %I% %E% SMI" 28 29/* 30 * Unified version for both position independent and non position independent 31 * for both v8plus and v9 32 * compile with: 33 * 34 * cc -c -xarch=v8plus des_crypt_asm.s or 35 * cc -c -arch=v9 des_crypt_asm.s 36 * for kernel use (no -KPIC) 37 * 38 * and with 39 * 40 * cc -c -xarch=v8plus -KPIC -DPIC des_crypt_asm.s or 41 * cc -c -arch=v9 -KPIC -DPIC des_crypt_asm.s 42 * for .so use 43 * 44 * EXPORT DELETE START 45 * 46 * The tables were generated by a C program, compiled into the C version 47 * of this function, from which a .s was generated by the C compiler and 48 * that .s was used as a starting point for this one, in particular for 49 * the data definitions. It is important, though that the tables and 50 * the code both remain in the text section and in this order, otherwise, 51 * at least on UltraSparc-II processors, collisions in the E-cache are 52 * highly probable between the code and the data it is using which can 53 * result in up to 40% performance loss 54 * 55 * For a description of the DES algithm, see NIST publication FIPS PUB 46-3 56 * 57 * In this implementation, the 16 rounds of DES are carried out by unrolling 58 * a loop that computes two rounds. For those 2 rounds, the two parts of 59 * the intermediate variable (L and R in the FIPS pub) are kept in their 60 * extended forms (i.e. in the one after applying the transformation E), 61 * with the appropriate bits repeated so that bits needed for the S-box 62 * lookups are in consecutive positions. So the bits of the L (or R) 63 * variable appear in the following order (X represents a bit that is not 64 * from L (R), these bits are always 0): 65 * 32 1 2 3 4 5 X X X X X X X X 4 5 66 * 6 7 8 9 8 9 10 11 12 13 12 13 14 15 16 17 67 * 16 17 18 19 20 21 X X X X X 20 21 22 23 24 68 * 25 24 25 26 27 28 29 28 29 30 31 32 1 X X X 69 * This arrangement makes it possible that 3 of the 8 S-box indices 70 * can be extracted by a single instruction: srlx by 55 for the S1 index, 71 * srl by 23 for the S5 index and and by 0x1f80 for the S8 index. The rest 72 * of the indices requires two operations, a shift and an and. 73 * The tables for the S-boxes are computed in such a way that when or-ed 74 * together, they give the result of the S-box, P and E computations. 75 * Also, the key schedule bits are computed to follow this bit-scheme. 76 * The initial permutation tables are also computed to produce this 77 * bit distribution and the final permutation works from these, too. 78 * 79 * The end of each round is overlapped with the beginning of the next 80 * one since after the first 6 S-box lookups all the bits necessary 81 * for one S-box lookup in the next round can be computed (by xor-ing 82 * the next key schedule item to the partially computed next R). 83 * 84 * EXPORT DELETE END 85 */ 86 87#if defined(lint) || defined(__lint) 88 /* LINTED */ 89 /* Nothing to be linted in this file, its pure assembly source */ 90#else /* lint || __lint */ 91 92 .register %g2,#scratch 93 .register %g3,#scratch 94 95 .file "encrypt_asm.S" 96 97 .section ".text",#alloc 98 .align 32 99 100/* EXPORT DELETE START */ 101 102! 103! CONSTANT POOL 104! 105 106des_sbox_table: 107 .word 5121 108 .word 1073872896 109 .word 0 110 .word 0 111 .word 1 112 .word 1073741824 113 .word 5121 114 .word 1073872928 115 .word 5121 116 .word 1073741856 117 .word 1 118 .word 1073872928 119 .word 0 120 .word 32 121 .word 1 122 .word 1073741824 123 .word 0 124 .word 131072 125 .word 5121 126 .word 1073872896 127 .word 5121 128 .word 1073872928 129 .word 0 130 .word 131072 131 .word 5120 132 .word 131104 133 .word 5121 134 .word 1073741856 135 .word 5120 136 .word 0 137 .word 0 138 .word 32 139 .word 0 140 .word 131104 141 .word 5120 142 .word 131072 143 .word 5120 144 .word 131072 145 .word 1 146 .word 1073872896 147 .word 1 148 .word 1073872896 149 .word 5121 150 .word 1073741824 151 .word 5121 152 .word 1073741824 153 .word 5120 154 .word 131104 155 .word 1 156 .word 1073741856 157 .word 5120 158 .word 32 159 .word 5120 160 .word 32 161 .word 1 162 .word 1073741856 163 .word 0 164 .word 0 165 .word 0 166 .word 131104 167 .word 1 168 .word 1073872928 169 .word 5120 170 .word 0 171 .word 1 172 .word 1073741824 173 .word 5121 174 .word 1073872928 175 .word 0 176 .word 32 177 .word 5121 178 .word 1073741824 179 .word 5121 180 .word 1073872896 181 .word 5120 182 .word 0 183 .word 5120 184 .word 0 185 .word 0 186 .word 131072 187 .word 5121 188 .word 1073741856 189 .word 1 190 .word 1073741824 191 .word 1 192 .word 1073872896 193 .word 5120 194 .word 32 195 .word 0 196 .word 131072 197 .word 0 198 .word 32 199 .word 5120 200 .word 131104 201 .word 1 202 .word 1073872928 203 .word 5121 204 .word 1073872928 205 .word 1 206 .word 1073741856 207 .word 5121 208 .word 1073741824 209 .word 5120 210 .word 131104 211 .word 5120 212 .word 32 213 .word 0 214 .word 131104 215 .word 1 216 .word 1073872928 217 .word 5121 218 .word 1073872896 219 .word 0 220 .word 131104 221 .word 5120 222 .word 131072 223 .word 5120 224 .word 131072 225 .word 0 226 .word 0 227 .word 1 228 .word 1073741856 229 .word 1 230 .word 1073872896 231 .word 0 232 .word 0 233 .word 5121 234 .word 1073741856 235 .word 536870992 236 .word 536872192 237 .word 536870912 238 .word 536870912 239 .word 0 240 .word 536870912 241 .word 80 242 .word 536872192 243 .word 80 244 .word 0 245 .word 0 246 .word 1280 247 .word 536870992 248 .word 1280 249 .word 536870912 250 .word 536872192 251 .word 536870912 252 .word 1280 253 .word 536870992 254 .word 536872192 255 .word 536870992 256 .word 536870912 257 .word 536870912 258 .word 0 259 .word 536870912 260 .word 536870912 261 .word 80 262 .word 0 263 .word 0 264 .word 1280 265 .word 536870992 266 .word 1280 267 .word 80 268 .word 536870912 269 .word 80 270 .word 1280 271 .word 536870912 272 .word 536872192 273 .word 0 274 .word 0 275 .word 536870912 276 .word 0 277 .word 0 278 .word 536870912 279 .word 80 280 .word 536872192 281 .word 536870992 282 .word 0 283 .word 80 284 .word 1280 285 .word 536870912 286 .word 1280 287 .word 0 288 .word 0 289 .word 80 290 .word 536870912 291 .word 0 292 .word 536872192 293 .word 536870992 294 .word 536870912 295 .word 536870992 296 .word 0 297 .word 0 298 .word 536872192 299 .word 0 300 .word 0 301 .word 80 302 .word 536872192 303 .word 536870992 304 .word 1280 305 .word 80 306 .word 0 307 .word 536870912 308 .word 536872192 309 .word 536870992 310 .word 0 311 .word 536870992 312 .word 536870912 313 .word 0 314 .word 536870912 315 .word 536870992 316 .word 0 317 .word 536870912 318 .word 536870912 319 .word 0 320 .word 1280 321 .word 536870992 322 .word 536872192 323 .word 80 324 .word 536872192 325 .word 0 326 .word 1280 327 .word 0 328 .word 536870912 329 .word 536870912 330 .word 0 331 .word 0 332 .word 536872192 333 .word 536870992 334 .word 536870912 335 .word 80 336 .word 0 337 .word 536870912 338 .word 1280 339 .word 80 340 .word 1280 341 .word 536870912 342 .word 536872192 343 .word 536870912 344 .word 1280 345 .word 80 346 .word 1280 347 .word 80 348 .word 536870912 349 .word 0 350 .word 0 351 .word 536870912 352 .word 536870912 353 .word 0 354 .word 536872192 355 .word 536870912 356 .word 0 357 .word 536870992 358 .word 1280 359 .word 536870992 360 .word 536872192 361 .word 80 362 .word 536870912 363 .word 0 364 .word 81984 365 .word 32770 366 .word -2147401728 367 .word 0 368 .word 0 369 .word 32770 370 .word -2147483584 371 .word 32768 372 .word 81920 373 .word 0 374 .word 0 375 .word 2 376 .word -2147401664 377 .word 32768 378 .word 81920 379 .word 2 380 .word -2147483584 381 .word 32768 382 .word 64 383 .word 32768 384 .word 64 385 .word 2 386 .word -2147483648 387 .word 32770 388 .word -2147401664 389 .word 2 390 .word -2147483584 391 .word 32770 392 .word -2147483648 393 .word 0 394 .word 81984 395 .word 32768 396 .word 0 397 .word 0 398 .word 64 399 .word 32770 400 .word -2147401728 401 .word 0 402 .word 81920 403 .word 2 404 .word -2147401728 405 .word 32770 406 .word -2147483648 407 .word 32770 408 .word -2147483584 409 .word 2 410 .word -2147401664 411 .word 32768 412 .word 81984 413 .word 2 414 .word -2147401728 415 .word 2 416 .word -2147483648 417 .word 32768 418 .word 81984 419 .word 0 420 .word 64 421 .word 32770 422 .word -2147401664 423 .word 0 424 .word 81920 425 .word 32768 426 .word 0 427 .word 32770 428 .word -2147401728 429 .word 32768 430 .word 0 431 .word 2 432 .word -2147483584 433 .word 0 434 .word 81984 435 .word 2 436 .word -2147483648 437 .word 32770 438 .word -2147401728 439 .word 32768 440 .word 81920 441 .word 0 442 .word 0 443 .word 0 444 .word 81920 445 .word 2 446 .word -2147483584 447 .word 32770 448 .word -2147401664 449 .word 32768 450 .word 81920 451 .word 32768 452 .word 64 453 .word 0 454 .word 81920 455 .word 0 456 .word 0 457 .word 32770 458 .word -2147483584 459 .word 32768 460 .word 81984 461 .word 2 462 .word -2147483648 463 .word 32768 464 .word 0 465 .word 32770 466 .word -2147401664 467 .word 0 468 .word 64 469 .word 2 470 .word -2147401664 471 .word 2 472 .word -2147401728 473 .word 32768 474 .word 64 475 .word 32770 476 .word -2147483648 477 .word 32768 478 .word 81984 479 .word 0 480 .word 81984 481 .word 32770 482 .word -2147483648 483 .word 2 484 .word -2147401664 485 .word 0 486 .word 64 487 .word 32770 488 .word -2147483584 489 .word 2 490 .word -2147401728 491 .word 1073742336 492 .word 135266312 493 .word 1073741824 494 .word 135270408 495 .word 1073741824 496 .word 135270408 497 .word 0 498 .word 4096 499 .word 512 500 .word 135270400 501 .word 1073742336 502 .word 4104 503 .word 1073742336 504 .word 8 505 .word 1073741824 506 .word 135266312 507 .word 0 508 .word 0 509 .word 512 510 .word 135266304 511 .word 512 512 .word 135266304 513 .word 1073742336 514 .word 135270408 515 .word 1073741824 516 .word 4104 517 .word 0 518 .word 0 519 .word 512 520 .word 4096 521 .word 1073742336 522 .word 8 523 .word 1073741824 524 .word 8 525 .word 0 526 .word 135266304 527 .word 512 528 .word 0 529 .word 1073742336 530 .word 135266312 531 .word 0 532 .word 4096 533 .word 512 534 .word 0 535 .word 1073741824 536 .word 135266312 537 .word 0 538 .word 135270400 539 .word 1073742336 540 .word 4104 541 .word 1073741824 542 .word 8 543 .word 0 544 .word 135270400 545 .word 512 546 .word 4096 547 .word 0 548 .word 135266304 549 .word 512 550 .word 135270400 551 .word 1073742336 552 .word 135270408 553 .word 1073741824 554 .word 4104 555 .word 512 556 .word 4096 557 .word 1073742336 558 .word 8 559 .word 512 560 .word 135266304 561 .word 1073742336 562 .word 135270408 563 .word 1073741824 564 .word 4104 565 .word 0 566 .word 0 567 .word 0 568 .word 0 569 .word 512 570 .word 135266304 571 .word 0 572 .word 135270400 573 .word 512 574 .word 4096 575 .word 1073742336 576 .word 4104 577 .word 1073741824 578 .word 8 579 .word 1073742336 580 .word 135266312 581 .word 1073741824 582 .word 135270408 583 .word 1073741824 584 .word 135270408 585 .word 0 586 .word 4096 587 .word 1073742336 588 .word 135270408 589 .word 1073741824 590 .word 4104 591 .word 1073741824 592 .word 8 593 .word 0 594 .word 135266304 595 .word 1073742336 596 .word 8 597 .word 1073741824 598 .word 135266312 599 .word 512 600 .word 135270400 601 .word 1073742336 602 .word 4104 603 .word 1073741824 604 .word 135266312 605 .word 0 606 .word 135270400 607 .word 512 608 .word 0 609 .word 1073742336 610 .word 135266312 611 .word 0 612 .word 4096 613 .word 512 614 .word 0 615 .word 0 616 .word 135266304 617 .word 512 618 .word 135270400 619 .word 0 620 .word 40960 621 .word 10248 622 .word 40960 623 .word 10248 624 .word 0 625 .word 268445696 626 .word 40960 627 .word 8 628 .word 0 629 .word 0 630 .word 40960 631 .word 268435456 632 .word 0 633 .word 10248 634 .word 0 635 .word 268435464 636 .word 40960 637 .word 8 638 .word 0 639 .word 10240 640 .word 40960 641 .word 268435464 642 .word 40960 643 .word 268445696 644 .word 40960 645 .word 268445704 646 .word 0 647 .word 8 648 .word 40960 649 .word 268435456 650 .word 0 651 .word 10240 652 .word 0 653 .word 268435464 654 .word 0 655 .word 268435464 656 .word 0 657 .word 0 658 .word 0 659 .word 268435456 660 .word 40960 661 .word 268445704 662 .word 40960 663 .word 268445704 664 .word 40960 665 .word 10240 666 .word 40960 667 .word 268445704 668 .word 0 669 .word 268435456 670 .word 40960 671 .word 0 672 .word 0 673 .word 268445696 674 .word 0 675 .word 10248 676 .word 40960 677 .word 10240 678 .word 0 679 .word 268445696 680 .word 0 681 .word 8 682 .word 40960 683 .word 8 684 .word 0 685 .word 268445696 686 .word 40960 687 .word 0 688 .word 40960 689 .word 10240 690 .word 0 691 .word 268435456 692 .word 0 693 .word 10248 694 .word 0 695 .word 268445696 696 .word 40960 697 .word 268435464 698 .word 40960 699 .word 10240 700 .word 40960 701 .word 268435456 702 .word 0 703 .word 268445704 704 .word 0 705 .word 10248 706 .word 40960 707 .word 268435464 708 .word 40960 709 .word 0 710 .word 40960 711 .word 10240 712 .word 0 713 .word 268445704 714 .word 0 715 .word 268445704 716 .word 40960 717 .word 8 718 .word 40960 719 .word 268445696 720 .word 0 721 .word 268445704 722 .word 40960 723 .word 10248 724 .word 0 725 .word 0 726 .word 0 727 .word 268435464 728 .word 0 729 .word 268445696 730 .word 0 731 .word 8 732 .word 40960 733 .word 10240 734 .word 40960 735 .word 268435456 736 .word 40960 737 .word 8 738 .word 0 739 .word 0 740 .word 0 741 .word 268435464 742 .word 0 743 .word 10248 744 .word 40960 745 .word 268435456 746 .word 40960 747 .word 134348800 748 .word 640 749 .word 134349056 750 .word 0 751 .word 0 752 .word 268435456 753 .word 134349056 754 .word 268436096 755 .word 134349056 756 .word 0 757 .word 0 758 .word 640 759 .word 134349056 760 .word 268436096 761 .word 256 762 .word 0 763 .word 134348800 764 .word 268435456 765 .word 256 766 .word 268436096 767 .word 256 768 .word 0 769 .word 134348800 770 .word 640 771 .word 256 772 .word 640 773 .word 134348800 774 .word 268435456 775 .word 134348800 776 .word 0 777 .word 0 778 .word 268436096 779 .word 0 780 .word 0 781 .word 256 782 .word 640 783 .word 134348800 784 .word 268436096 785 .word 0 786 .word 268435456 787 .word 256 788 .word 268435456 789 .word 134348800 790 .word 268436096 791 .word 0 792 .word 640 793 .word 134349056 794 .word 640 795 .word 134349056 796 .word 640 797 .word 0 798 .word 0 799 .word 256 800 .word 268436096 801 .word 134349056 802 .word 268435456 803 .word 0 804 .word 268436096 805 .word 256 806 .word 268435456 807 .word 134349056 808 .word 268435456 809 .word 134348800 810 .word 0 811 .word 134348800 812 .word 268435456 813 .word 0 814 .word 640 815 .word 134349056 816 .word 640 817 .word 256 818 .word 268435456 819 .word 134349056 820 .word 268436096 821 .word 256 822 .word 0 823 .word 0 824 .word 268436096 825 .word 134348800 826 .word 640 827 .word 256 828 .word 0 829 .word 134348800 830 .word 268435456 831 .word 134348800 832 .word 0 833 .word 0 834 .word 268436096 835 .word 134348800 836 .word 640 837 .word 134349056 838 .word 268436096 839 .word 256 840 .word 268435456 841 .word 134349056 842 .word 0 843 .word 256 844 .word 268436096 845 .word 134349056 846 .word 268435456 847 .word 0 848 .word 0 849 .word 134349056 850 .word 640 851 .word 0 852 .word 640 853 .word 0 854 .word 268435456 855 .word 134349056 856 .word 0 857 .word 256 858 .word 268436096 859 .word 0 860 .word 268435456 861 .word 256 862 .word 640 863 .word 134348800 864 .word 268436096 865 .word 0 866 .word 0 867 .word 134349056 868 .word 268435456 869 .word 134348800 870 .word 0 871 .word 256 872 .word 640 873 .word 134348800 874 .word 268436096 875 .word 160 876 .word 0 877 .word -2147467104 878 .word 16 879 .word -2147467264 880 .word 262160 881 .word 0 882 .word 0 883 .word 0 884 .word 262144 885 .word -2147467264 886 .word 262160 887 .word -2147483488 888 .word 262160 889 .word 16544 890 .word 262144 891 .word -2147467104 892 .word 262160 893 .word 160 894 .word 0 895 .word 0 896 .word 0 897 .word -2147467264 898 .word 16 899 .word -2147483648 900 .word 16 901 .word 16384 902 .word 0 903 .word -2147467104 904 .word 16 905 .word -2147483648 906 .word 262160 907 .word 16384 908 .word 262144 909 .word -2147483488 910 .word 262160 911 .word -2147483488 912 .word 16 913 .word 16384 914 .word 262144 915 .word -2147467264 916 .word 16 917 .word 16544 918 .word 0 919 .word 16544 920 .word 262144 921 .word -2147483488 922 .word 16 923 .word 16544 924 .word 0 925 .word 0 926 .word 262144 927 .word -2147483648 928 .word 262160 929 .word -2147467104 930 .word 262160 931 .word 160 932 .word 262144 933 .word -2147483648 934 .word 16 935 .word 16384 936 .word 0 937 .word 160 938 .word 262144 939 .word 16384 940 .word 0 941 .word 160 942 .word 262144 943 .word 160 944 .word 0 945 .word -2147467264 946 .word 262160 947 .word -2147467264 948 .word 262160 949 .word -2147467104 950 .word 16 951 .word -2147467104 952 .word 16 953 .word -2147483648 954 .word 16 955 .word -2147483488 956 .word 16 957 .word 16384 958 .word 0 959 .word 16384 960 .word 262144 961 .word 160 962 .word 0 963 .word 16544 964 .word 262144 965 .word -2147483648 966 .word 262160 967 .word -2147483488 968 .word 262160 969 .word 16544 970 .word 262144 971 .word -2147483648 972 .word 262160 973 .word -2147467264 974 .word 16 975 .word -2147467104 976 .word 262160 977 .word 16544 978 .word 0 979 .word 160 980 .word 262144 981 .word 0 982 .word 0 983 .word -2147483648 984 .word 16 985 .word -2147467104 986 .word 262160 987 .word 0 988 .word 0 989 .word -2147483488 990 .word 262160 991 .word 16544 992 .word 0 993 .word 0 994 .word 262144 995 .word -2147467264 996 .word 16 997 .word 16384 998 .word 262144 999 .word 0 1000 .word 262144 1001 .word -2147483488 1002 .word 16 1003 .word 67174400 1004 .word 67635200 1005 .word 0 1006 .word 67633152 1007 .word 4 1008 .word 0 1009 .word 67174404 1010 .word 67635200 1011 .word 67174400 1012 .word 0 1013 .word 67174400 1014 .word 67635200 1015 .word 0 1016 .word 2048 1017 .word 67174400 1018 .word 0 1019 .word 4 1020 .word 2048 1021 .word 67174404 1022 .word 0 1023 .word 67174404 1024 .word 67635200 1025 .word 4 1026 .word 67633152 1027 .word 67174404 1028 .word 67633152 1029 .word 4 1030 .word 67635200 1031 .word 0 1032 .word 67633152 1033 .word 0 1034 .word 2048 1035 .word 67174404 1036 .word 0 1037 .word 67174400 1038 .word 2048 1039 .word 67174400 1040 .word 67633152 1041 .word 0 1042 .word 67635200 1043 .word 4 1044 .word 67633152 1045 .word 4 1046 .word 2048 1047 .word 67174404 1048 .word 2048 1049 .word 67174404 1050 .word 67633152 1051 .word 0 1052 .word 67635200 1053 .word 0 1054 .word 0 1055 .word 0 1056 .word 0 1057 .word 67174404 1058 .word 2048 1059 .word 67174400 1060 .word 2048 1061 .word 67174400 1062 .word 67633152 1063 .word 4 1064 .word 67635200 1065 .word 4 1066 .word 0 1067 .word 4 1068 .word 67635200 1069 .word 4 1070 .word 0 1071 .word 67174404 1072 .word 67633152 1073 .word 0 1074 .word 67633152 1075 .word 0 1076 .word 2048 1077 .word 67174404 1078 .word 2048 1079 .word 0 1080 .word 67633152 1081 .word 4 1082 .word 67635200 1083 .word 67174400 1084 .word 67633152 1085 .word 0 1086 .word 2048 1087 .word 67174400 1088 .word 2048 1089 .word 67174404 1090 .word 0 1091 .word 67174404 1092 .word 2048 1093 .word 67174400 1094 .word 0 1095 .word 4 1096 .word 0 1097 .word 67174400 1098 .word 67635200 1099 .word 0 1100 .word 0 1101 .word 67174404 1102 .word 67635200 1103 .word 4 1104 .word 2048 1105 .word 67174400 1106 .word 2048 1107 .word 67174404 1108 .word 0 1109 .word 67174400 1110 .word 67633152 1111 .word 67174400 1112 .word 67635200 1113 .word 0 1114 .word 0 1115 .word 67174404 1116 .word 67635200 1117 .word 4 1118 .word 67633152 1119 .word 4 1120 .word 67633152 1121 .word 0 1122 .word 67635200 1123 .word 0 1124 .word 67635200 1125 .word 4 1126 .word 2048 1127 .word 67174400 1128 .word 0 1129 .word 67174404 1130 .word 67633152 1131 .type des_sbox_table,#object 1132 .size des_sbox_table,4096 1133 1134 .align 32 1135! 1136! CONSTANT POOL 1137! 1138 .section ".text",#alloc,#execinstr 1139 1140des_ip_table: 1141 .word 0 1142 .word 0 1143 .word 0 1144 .word 1024 1145 .word 8388608 1146 .word 640 1147 .word 8388608 1148 .word 1664 1149 .word 0 1150 .word 4194304 1151 .word 0 1152 .word 4195328 1153 .word 8388608 1154 .word 4194944 1155 .word 8388608 1156 .word 4195968 1157 .word 0 1158 .word 2621440 1159 .word 0 1160 .word 2622464 1161 .word 8388608 1162 .word 2622080 1163 .word 8388608 1164 .word 2623104 1165 .word 0 1166 .word 6815744 1167 .word 0 1168 .word 6816768 1169 .word 8388608 1170 .word 6816384 1171 .word 8388608 1172 .word 6817408 1173 .word 4 1174 .word 0 1175 .word 4 1176 .word 1024 1177 .word 8388612 1178 .word 640 1179 .word 8388612 1180 .word 1664 1181 .word 4 1182 .word 4194304 1183 .word 4 1184 .word 4195328 1185 .word 8388612 1186 .word 4194944 1187 .word 8388612 1188 .word 4195968 1189 .word 4 1190 .word 2621440 1191 .word 4 1192 .word 2622464 1193 .word 8388612 1194 .word 2622080 1195 .word 8388612 1196 .word 2623104 1197 .word 4 1198 .word 6815744 1199 .word 4 1200 .word 6816768 1201 .word 8388612 1202 .word 6816384 1203 .word 8388612 1204 .word 6817408 1205 .word 2 1206 .word -2147483648 1207 .word 2 1208 .word -2147482624 1209 .word 8388610 1210 .word -2147483008 1211 .word 8388610 1212 .word -2147481984 1213 .word 2 1214 .word -2143289344 1215 .word 2 1216 .word -2143288320 1217 .word 8388610 1218 .word -2143288704 1219 .word 8388610 1220 .word -2143287680 1221 .word 2 1222 .word -2144862208 1223 .word 2 1224 .word -2144861184 1225 .word 8388610 1226 .word -2144861568 1227 .word 8388610 1228 .word -2144860544 1229 .word 2 1230 .word -2140667904 1231 .word 2 1232 .word -2140666880 1233 .word 8388610 1234 .word -2140667264 1235 .word 8388610 1236 .word -2140666240 1237 .word 6 1238 .word -2147483648 1239 .word 6 1240 .word -2147482624 1241 .word 8388614 1242 .word -2147483008 1243 .word 8388614 1244 .word -2147481984 1245 .word 6 1246 .word -2143289344 1247 .word 6 1248 .word -2143288320 1249 .word 8388614 1250 .word -2143288704 1251 .word 8388614 1252 .word -2143287680 1253 .word 6 1254 .word -2144862208 1255 .word 6 1256 .word -2144861184 1257 .word 8388614 1258 .word -2144861568 1259 .word 8388614 1260 .word -2144860544 1261 .word 6 1262 .word -2140667904 1263 .word 6 1264 .word -2140666880 1265 .word 8388614 1266 .word -2140667264 1267 .word 8388614 1268 .word -2140666240 1269 .word 16384 1270 .word 0 1271 .word 16384 1272 .word 1024 1273 .word 8404992 1274 .word 640 1275 .word 8404992 1276 .word 1664 1277 .word 16384 1278 .word 4194304 1279 .word 16384 1280 .word 4195328 1281 .word 8404992 1282 .word 4194944 1283 .word 8404992 1284 .word 4195968 1285 .word 16384 1286 .word 2621440 1287 .word 16384 1288 .word 2622464 1289 .word 8404992 1290 .word 2622080 1291 .word 8404992 1292 .word 2623104 1293 .word 16384 1294 .word 6815744 1295 .word 16384 1296 .word 6816768 1297 .word 8404992 1298 .word 6816384 1299 .word 8404992 1300 .word 6817408 1301 .word 16388 1302 .word 0 1303 .word 16388 1304 .word 1024 1305 .word 8404996 1306 .word 640 1307 .word 8404996 1308 .word 1664 1309 .word 16388 1310 .word 4194304 1311 .word 16388 1312 .word 4195328 1313 .word 8404996 1314 .word 4194944 1315 .word 8404996 1316 .word 4195968 1317 .word 16388 1318 .word 2621440 1319 .word 16388 1320 .word 2622464 1321 .word 8404996 1322 .word 2622080 1323 .word 8404996 1324 .word 2623104 1325 .word 16388 1326 .word 6815744 1327 .word 16388 1328 .word 6816768 1329 .word 8404996 1330 .word 6816384 1331 .word 8404996 1332 .word 6817408 1333 .word 16386 1334 .word -2147483648 1335 .word 16386 1336 .word -2147482624 1337 .word 8404994 1338 .word -2147483008 1339 .word 8404994 1340 .word -2147481984 1341 .word 16386 1342 .word -2143289344 1343 .word 16386 1344 .word -2143288320 1345 .word 8404994 1346 .word -2143288704 1347 .word 8404994 1348 .word -2143287680 1349 .word 16386 1350 .word -2144862208 1351 .word 16386 1352 .word -2144861184 1353 .word 8404994 1354 .word -2144861568 1355 .word 8404994 1356 .word -2144860544 1357 .word 16386 1358 .word -2140667904 1359 .word 16386 1360 .word -2140666880 1361 .word 8404994 1362 .word -2140667264 1363 .word 8404994 1364 .word -2140666240 1365 .word 16390 1366 .word -2147483648 1367 .word 16390 1368 .word -2147482624 1369 .word 8404998 1370 .word -2147483008 1371 .word 8404998 1372 .word -2147481984 1373 .word 16390 1374 .word -2143289344 1375 .word 16390 1376 .word -2143288320 1377 .word 8404998 1378 .word -2143288704 1379 .word 8404998 1380 .word -2143287680 1381 .word 16390 1382 .word -2144862208 1383 .word 16390 1384 .word -2144861184 1385 .word 8404998 1386 .word -2144861568 1387 .word 8404998 1388 .word -2144860544 1389 .word 16390 1390 .word -2140667904 1391 .word 16390 1392 .word -2140666880 1393 .word 8404998 1394 .word -2140667264 1395 .word 8404998 1396 .word -2140666240 1397 .word 10240 1398 .word 0 1399 .word 10240 1400 .word 1024 1401 .word 8398848 1402 .word 640 1403 .word 8398848 1404 .word 1664 1405 .word 10240 1406 .word 4194304 1407 .word 10240 1408 .word 4195328 1409 .word 8398848 1410 .word 4194944 1411 .word 8398848 1412 .word 4195968 1413 .word 10240 1414 .word 2621440 1415 .word 10240 1416 .word 2622464 1417 .word 8398848 1418 .word 2622080 1419 .word 8398848 1420 .word 2623104 1421 .word 10240 1422 .word 6815744 1423 .word 10240 1424 .word 6816768 1425 .word 8398848 1426 .word 6816384 1427 .word 8398848 1428 .word 6817408 1429 .word 10244 1430 .word 0 1431 .word 10244 1432 .word 1024 1433 .word 8398852 1434 .word 640 1435 .word 8398852 1436 .word 1664 1437 .word 10244 1438 .word 4194304 1439 .word 10244 1440 .word 4195328 1441 .word 8398852 1442 .word 4194944 1443 .word 8398852 1444 .word 4195968 1445 .word 10244 1446 .word 2621440 1447 .word 10244 1448 .word 2622464 1449 .word 8398852 1450 .word 2622080 1451 .word 8398852 1452 .word 2623104 1453 .word 10244 1454 .word 6815744 1455 .word 10244 1456 .word 6816768 1457 .word 8398852 1458 .word 6816384 1459 .word 8398852 1460 .word 6817408 1461 .word 10242 1462 .word -2147483648 1463 .word 10242 1464 .word -2147482624 1465 .word 8398850 1466 .word -2147483008 1467 .word 8398850 1468 .word -2147481984 1469 .word 10242 1470 .word -2143289344 1471 .word 10242 1472 .word -2143288320 1473 .word 8398850 1474 .word -2143288704 1475 .word 8398850 1476 .word -2143287680 1477 .word 10242 1478 .word -2144862208 1479 .word 10242 1480 .word -2144861184 1481 .word 8398850 1482 .word -2144861568 1483 .word 8398850 1484 .word -2144860544 1485 .word 10242 1486 .word -2140667904 1487 .word 10242 1488 .word -2140666880 1489 .word 8398850 1490 .word -2140667264 1491 .word 8398850 1492 .word -2140666240 1493 .word 10246 1494 .word -2147483648 1495 .word 10246 1496 .word -2147482624 1497 .word 8398854 1498 .word -2147483008 1499 .word 8398854 1500 .word -2147481984 1501 .word 10246 1502 .word -2143289344 1503 .word 10246 1504 .word -2143288320 1505 .word 8398854 1506 .word -2143288704 1507 .word 8398854 1508 .word -2143287680 1509 .word 10246 1510 .word -2144862208 1511 .word 10246 1512 .word -2144861184 1513 .word 8398854 1514 .word -2144861568 1515 .word 8398854 1516 .word -2144860544 1517 .word 10246 1518 .word -2140667904 1519 .word 10246 1520 .word -2140666880 1521 .word 8398854 1522 .word -2140667264 1523 .word 8398854 1524 .word -2140666240 1525 .word 26624 1526 .word 0 1527 .word 26624 1528 .word 1024 1529 .word 8415232 1530 .word 640 1531 .word 8415232 1532 .word 1664 1533 .word 26624 1534 .word 4194304 1535 .word 26624 1536 .word 4195328 1537 .word 8415232 1538 .word 4194944 1539 .word 8415232 1540 .word 4195968 1541 .word 26624 1542 .word 2621440 1543 .word 26624 1544 .word 2622464 1545 .word 8415232 1546 .word 2622080 1547 .word 8415232 1548 .word 2623104 1549 .word 26624 1550 .word 6815744 1551 .word 26624 1552 .word 6816768 1553 .word 8415232 1554 .word 6816384 1555 .word 8415232 1556 .word 6817408 1557 .word 26628 1558 .word 0 1559 .word 26628 1560 .word 1024 1561 .word 8415236 1562 .word 640 1563 .word 8415236 1564 .word 1664 1565 .word 26628 1566 .word 4194304 1567 .word 26628 1568 .word 4195328 1569 .word 8415236 1570 .word 4194944 1571 .word 8415236 1572 .word 4195968 1573 .word 26628 1574 .word 2621440 1575 .word 26628 1576 .word 2622464 1577 .word 8415236 1578 .word 2622080 1579 .word 8415236 1580 .word 2623104 1581 .word 26628 1582 .word 6815744 1583 .word 26628 1584 .word 6816768 1585 .word 8415236 1586 .word 6816384 1587 .word 8415236 1588 .word 6817408 1589 .word 26626 1590 .word -2147483648 1591 .word 26626 1592 .word -2147482624 1593 .word 8415234 1594 .word -2147483008 1595 .word 8415234 1596 .word -2147481984 1597 .word 26626 1598 .word -2143289344 1599 .word 26626 1600 .word -2143288320 1601 .word 8415234 1602 .word -2143288704 1603 .word 8415234 1604 .word -2143287680 1605 .word 26626 1606 .word -2144862208 1607 .word 26626 1608 .word -2144861184 1609 .word 8415234 1610 .word -2144861568 1611 .word 8415234 1612 .word -2144860544 1613 .word 26626 1614 .word -2140667904 1615 .word 26626 1616 .word -2140666880 1617 .word 8415234 1618 .word -2140667264 1619 .word 8415234 1620 .word -2140666240 1621 .word 26630 1622 .word -2147483648 1623 .word 26630 1624 .word -2147482624 1625 .word 8415238 1626 .word -2147483008 1627 .word 8415238 1628 .word -2147481984 1629 .word 26630 1630 .word -2143289344 1631 .word 26630 1632 .word -2143288320 1633 .word 8415238 1634 .word -2143288704 1635 .word 8415238 1636 .word -2143287680 1637 .word 26630 1638 .word -2144862208 1639 .word 26630 1640 .word -2144861184 1641 .word 8415238 1642 .word -2144861568 1643 .word 8415238 1644 .word -2144860544 1645 .word 26630 1646 .word -2140667904 1647 .word 26630 1648 .word -2140666880 1649 .word 8415238 1650 .word -2140667264 1651 .word 8415238 1652 .word -2140666240 1653 .word 0 1654 .word 0 1655 .word 0 1656 .word 20480 1657 .word 0 1658 .word 2048 1659 .word 0 1660 .word 22528 1661 .word 0 1662 .word 83886080 1663 .word 0 1664 .word 83906560 1665 .word 0 1666 .word 83888128 1667 .word 0 1668 .word 83908608 1669 .word 0 1670 .word 8388608 1671 .word 0 1672 .word 8409088 1673 .word 0 1674 .word 8390656 1675 .word 0 1676 .word 8411136 1677 .word 0 1678 .word 92274688 1679 .word 0 1680 .word 92295168 1681 .word 0 1682 .word 92276736 1683 .word 0 1684 .word 92297216 1685 .word 80 1686 .word 0 1687 .word 80 1688 .word 20480 1689 .word 80 1690 .word 2048 1691 .word 80 1692 .word 22528 1693 .word 80 1694 .word 83886080 1695 .word 80 1696 .word 83906560 1697 .word 80 1698 .word 83888128 1699 .word 80 1700 .word 83908608 1701 .word 80 1702 .word 8388608 1703 .word 80 1704 .word 8409088 1705 .word 80 1706 .word 8390656 1707 .word 80 1708 .word 8411136 1709 .word 80 1710 .word 92274688 1711 .word 80 1712 .word 92295168 1713 .word 80 1714 .word 92276736 1715 .word 80 1716 .word 92297216 1717 .word 8 1718 .word 0 1719 .word 8 1720 .word 20480 1721 .word 8 1722 .word 2048 1723 .word 8 1724 .word 22528 1725 .word 8 1726 .word 83886080 1727 .word 8 1728 .word 83906560 1729 .word 8 1730 .word 83888128 1731 .word 8 1732 .word 83908608 1733 .word 8 1734 .word 8388608 1735 .word 8 1736 .word 8409088 1737 .word 8 1738 .word 8390656 1739 .word 8 1740 .word 8411136 1741 .word 8 1742 .word 92274688 1743 .word 8 1744 .word 92295168 1745 .word 8 1746 .word 92276736 1747 .word 8 1748 .word 92297216 1749 .word 88 1750 .word 0 1751 .word 88 1752 .word 20480 1753 .word 88 1754 .word 2048 1755 .word 88 1756 .word 22528 1757 .word 88 1758 .word 83886080 1759 .word 88 1760 .word 83906560 1761 .word 88 1762 .word 83888128 1763 .word 88 1764 .word 83908608 1765 .word 88 1766 .word 8388608 1767 .word 88 1768 .word 8409088 1769 .word 88 1770 .word 8390656 1771 .word 88 1772 .word 8411136 1773 .word 88 1774 .word 92274688 1775 .word 88 1776 .word 92295168 1777 .word 88 1778 .word 92276736 1779 .word 88 1780 .word 92297216 1781 .word 327680 1782 .word 4 1783 .word 327680 1784 .word 20484 1785 .word 327680 1786 .word 2052 1787 .word 327680 1788 .word 22532 1789 .word 327680 1790 .word 83886084 1791 .word 327680 1792 .word 83906564 1793 .word 327680 1794 .word 83888132 1795 .word 327680 1796 .word 83908612 1797 .word 327680 1798 .word 8388612 1799 .word 327680 1800 .word 8409092 1801 .word 327680 1802 .word 8390660 1803 .word 327680 1804 .word 8411140 1805 .word 327680 1806 .word 92274692 1807 .word 327680 1808 .word 92295172 1809 .word 327680 1810 .word 92276740 1811 .word 327680 1812 .word 92297220 1813 .word 327760 1814 .word 4 1815 .word 327760 1816 .word 20484 1817 .word 327760 1818 .word 2052 1819 .word 327760 1820 .word 22532 1821 .word 327760 1822 .word 83886084 1823 .word 327760 1824 .word 83906564 1825 .word 327760 1826 .word 83888132 1827 .word 327760 1828 .word 83908612 1829 .word 327760 1830 .word 8388612 1831 .word 327760 1832 .word 8409092 1833 .word 327760 1834 .word 8390660 1835 .word 327760 1836 .word 8411140 1837 .word 327760 1838 .word 92274692 1839 .word 327760 1840 .word 92295172 1841 .word 327760 1842 .word 92276740 1843 .word 327760 1844 .word 92297220 1845 .word 327688 1846 .word 4 1847 .word 327688 1848 .word 20484 1849 .word 327688 1850 .word 2052 1851 .word 327688 1852 .word 22532 1853 .word 327688 1854 .word 83886084 1855 .word 327688 1856 .word 83906564 1857 .word 327688 1858 .word 83888132 1859 .word 327688 1860 .word 83908612 1861 .word 327688 1862 .word 8388612 1863 .word 327688 1864 .word 8409092 1865 .word 327688 1866 .word 8390660 1867 .word 327688 1868 .word 8411140 1869 .word 327688 1870 .word 92274692 1871 .word 327688 1872 .word 92295172 1873 .word 327688 1874 .word 92276740 1875 .word 327688 1876 .word 92297220 1877 .word 327768 1878 .word 4 1879 .word 327768 1880 .word 20484 1881 .word 327768 1882 .word 2052 1883 .word 327768 1884 .word 22532 1885 .word 327768 1886 .word 83886084 1887 .word 327768 1888 .word 83906564 1889 .word 327768 1890 .word 83888132 1891 .word 327768 1892 .word 83908612 1893 .word 327768 1894 .word 8388612 1895 .word 327768 1896 .word 8409092 1897 .word 327768 1898 .word 8390660 1899 .word 327768 1900 .word 8411140 1901 .word 327768 1902 .word 92274692 1903 .word 327768 1904 .word 92295172 1905 .word 327768 1906 .word 92276740 1907 .word 327768 1908 .word 92297220 1909 .word 32768 1910 .word 0 1911 .word 32768 1912 .word 20480 1913 .word 32768 1914 .word 2048 1915 .word 32768 1916 .word 22528 1917 .word 32768 1918 .word 83886080 1919 .word 32768 1920 .word 83906560 1921 .word 32768 1922 .word 83888128 1923 .word 32768 1924 .word 83908608 1925 .word 32768 1926 .word 8388608 1927 .word 32768 1928 .word 8409088 1929 .word 32768 1930 .word 8390656 1931 .word 32768 1932 .word 8411136 1933 .word 32768 1934 .word 92274688 1935 .word 32768 1936 .word 92295168 1937 .word 32768 1938 .word 92276736 1939 .word 32768 1940 .word 92297216 1941 .word 32848 1942 .word 0 1943 .word 32848 1944 .word 20480 1945 .word 32848 1946 .word 2048 1947 .word 32848 1948 .word 22528 1949 .word 32848 1950 .word 83886080 1951 .word 32848 1952 .word 83906560 1953 .word 32848 1954 .word 83888128 1955 .word 32848 1956 .word 83908608 1957 .word 32848 1958 .word 8388608 1959 .word 32848 1960 .word 8409088 1961 .word 32848 1962 .word 8390656 1963 .word 32848 1964 .word 8411136 1965 .word 32848 1966 .word 92274688 1967 .word 32848 1968 .word 92295168 1969 .word 32848 1970 .word 92276736 1971 .word 32848 1972 .word 92297216 1973 .word 32776 1974 .word 0 1975 .word 32776 1976 .word 20480 1977 .word 32776 1978 .word 2048 1979 .word 32776 1980 .word 22528 1981 .word 32776 1982 .word 83886080 1983 .word 32776 1984 .word 83906560 1985 .word 32776 1986 .word 83888128 1987 .word 32776 1988 .word 83908608 1989 .word 32776 1990 .word 8388608 1991 .word 32776 1992 .word 8409088 1993 .word 32776 1994 .word 8390656 1995 .word 32776 1996 .word 8411136 1997 .word 32776 1998 .word 92274688 1999 .word 32776 2000 .word 92295168 2001 .word 32776 2002 .word 92276736 2003 .word 32776 2004 .word 92297216 2005 .word 32856 2006 .word 0 2007 .word 32856 2008 .word 20480 2009 .word 32856 2010 .word 2048 2011 .word 32856 2012 .word 22528 2013 .word 32856 2014 .word 83886080 2015 .word 32856 2016 .word 83906560 2017 .word 32856 2018 .word 83888128 2019 .word 32856 2020 .word 83908608 2021 .word 32856 2022 .word 8388608 2023 .word 32856 2024 .word 8409088 2025 .word 32856 2026 .word 8390656 2027 .word 32856 2028 .word 8411136 2029 .word 32856 2030 .word 92274688 2031 .word 32856 2032 .word 92295168 2033 .word 32856 2034 .word 92276736 2035 .word 32856 2036 .word 92297216 2037 .word 360448 2038 .word 4 2039 .word 360448 2040 .word 20484 2041 .word 360448 2042 .word 2052 2043 .word 360448 2044 .word 22532 2045 .word 360448 2046 .word 83886084 2047 .word 360448 2048 .word 83906564 2049 .word 360448 2050 .word 83888132 2051 .word 360448 2052 .word 83908612 2053 .word 360448 2054 .word 8388612 2055 .word 360448 2056 .word 8409092 2057 .word 360448 2058 .word 8390660 2059 .word 360448 2060 .word 8411140 2061 .word 360448 2062 .word 92274692 2063 .word 360448 2064 .word 92295172 2065 .word 360448 2066 .word 92276740 2067 .word 360448 2068 .word 92297220 2069 .word 360528 2070 .word 4 2071 .word 360528 2072 .word 20484 2073 .word 360528 2074 .word 2052 2075 .word 360528 2076 .word 22532 2077 .word 360528 2078 .word 83886084 2079 .word 360528 2080 .word 83906564 2081 .word 360528 2082 .word 83888132 2083 .word 360528 2084 .word 83908612 2085 .word 360528 2086 .word 8388612 2087 .word 360528 2088 .word 8409092 2089 .word 360528 2090 .word 8390660 2091 .word 360528 2092 .word 8411140 2093 .word 360528 2094 .word 92274692 2095 .word 360528 2096 .word 92295172 2097 .word 360528 2098 .word 92276740 2099 .word 360528 2100 .word 92297220 2101 .word 360456 2102 .word 4 2103 .word 360456 2104 .word 20484 2105 .word 360456 2106 .word 2052 2107 .word 360456 2108 .word 22532 2109 .word 360456 2110 .word 83886084 2111 .word 360456 2112 .word 83906564 2113 .word 360456 2114 .word 83888132 2115 .word 360456 2116 .word 83908612 2117 .word 360456 2118 .word 8388612 2119 .word 360456 2120 .word 8409092 2121 .word 360456 2122 .word 8390660 2123 .word 360456 2124 .word 8411140 2125 .word 360456 2126 .word 92274692 2127 .word 360456 2128 .word 92295172 2129 .word 360456 2130 .word 92276740 2131 .word 360456 2132 .word 92297220 2133 .word 360536 2134 .word 4 2135 .word 360536 2136 .word 20484 2137 .word 360536 2138 .word 2052 2139 .word 360536 2140 .word 22532 2141 .word 360536 2142 .word 83886084 2143 .word 360536 2144 .word 83906564 2145 .word 360536 2146 .word 83888132 2147 .word 360536 2148 .word 83908612 2149 .word 360536 2150 .word 8388612 2151 .word 360536 2152 .word 8409092 2153 .word 360536 2154 .word 8390660 2155 .word 360536 2156 .word 8411140 2157 .word 360536 2158 .word 92274692 2159 .word 360536 2160 .word 92295172 2161 .word 360536 2162 .word 92276740 2163 .word 360536 2164 .word 92297220 2165 .type des_ip_table,#object 2166 .size des_ip_table,4096 2167 2168 2169 .section ".data",#alloc 2170 .align 32 2171 2172 2173des_enc_const: 2174 2175#ifdef __sparcv9 2176 2177! 2178! For v9, the addresses ar 64-bit long, so we should use .xword 2179! instead of .word, this makes the constant table bigger 2180! 2181 .xword (des_ip_table+0x0) ! initial permutation table 2182 .xword (des_ip_table+0x800) 2183 2184 .xword (des_fp_table+0x0) ! final permutation table 2185 2186 .xword (des_sbox_table+0x0) ! sboxes table 2187 .xword (des_sbox_table+0x200) 2188 .xword (des_sbox_table+0x400) 2189 .xword (des_sbox_table+0x600) 2190 .xword (des_sbox_table+0x800) 2191 .xword (des_sbox_table+0xa00) 2192 .xword (des_sbox_table+0xc00) 2193 .xword (des_sbox_table+0xe00) 2194 2195 .word 0 ! for alignment 2196 .word 7 ! counter for encrypt loop 2197 2198 .word 16515072 ! top_1 2199 .word 0 ! 2200 2201 .word 262143 ! mid_4 2202 .word -67108864 ! 2203 2204 .word 0 ! low_3 2205 .word 67108608 ! 2206 2207 .word -1431655766 ! 0xaaaaaaaaaaaaaaaa 2208 .word -1431655766 ! 2209 2210 .word 1431655765 ! 0x5555555555555555 2211 .word 1431655765 ! 2212#else 2213 2214! 2215! For v8, the addresses are 32-bit long 2216! 2217 2218 .word (des_ip_table+0x0) ! initial permutation table 2219 .word (des_ip_table+0x800) 2220 2221 .word (des_fp_table+0x0) ! final permutation table 2222 2223 .word (des_sbox_table+0x0) ! sboxes table 2224 .word (des_sbox_table+0x200) 2225 .word (des_sbox_table+0x400) 2226 .word (des_sbox_table+0x600) 2227 .word (des_sbox_table+0x800) 2228 .word (des_sbox_table+0xa00) 2229 .word (des_sbox_table+0xc00) 2230 .word (des_sbox_table+0xe00) 2231 2232 .word 7 ! counter for encrypt loop 2233 2234 .word 16515072 ! top_1 2235 .word 0 ! 2236 2237 .word 262143 ! mid_4 2238 .word -67108864 ! 2239 2240 .word 0 ! low_3 2241 .word 67108608 ! 2242 2243 .word -1431655766 ! 0xaaaaaaaaaaaaaaaa 2244 .word -1431655766 ! 2245 2246 .word 1431655765 ! 0x5555555555555555 2247 .word 1431655765 ! 2248#endif 2249 .type des_enc_const,#object 2250 .size des_enc_const,(.-des_enc_const) 2251 2252 2253 .section ".text",#alloc,#execinstr 2254/* 000000 0 */ .align 32 2255/* 000000 */ .skip 32 2256! 2257! SUBROUTINE des_crypt_impl 2258! 2259! OFFSET SOURCE LINE LABEL INSTRUCTION 2260 2261.global des_crypt_impl 2262 2263! uint64_t des_crypt_impl(uint64_t *ks, uint64_t block, int one_or_three); 2264! 2265! ks is the key schedule, en/decryption is differentiated by computing 2266! an encryption key schedule for encryption and the reverse of it 2267! for decryption (for DES, 16 entries, for triple-DES, 48 entries) 2268! block is the 64-bit block to en/decrypt 2269! one_or_three is 1 for DES and 3 for triple-DES 2270 2271 des_crypt_impl: 2272 2273#ifdef __sparcv9 2274 save %sp,-192,%sp 2275#ifdef PIC 2276.L0: 2277 call . + 8 2278 sethi %hi(_GLOBAL_OFFSET_TABLE_ - (.L0 - .)), %o1 2279 sethi %hi(des_enc_const), %g1 2280 2281 or %o1, %lo(_GLOBAL_OFFSET_TABLE_ - (.L0 - .)), %o1 2282 or %g1, %lo(des_enc_const),%g1 2283 2284 add %o1, %o7, %o1 2285#else 2286 sethi %hh(des_enc_const),%o1 2287 sethi %lm(des_enc_const),%g1 2288 2289 or %o1,%hm(des_enc_const),%o1 2290 or %g1,%lo(des_enc_const),%g1 2291 2292 sllx %o1,32,%o1 2293#endif 2294 sethi %hi(0xaaaaaaaa), %g3 2295 2296#ifdef PIC 2297 ldx [%o1 + %g1], %i5 2298#else 2299 or %o1,%g1,%i5 ! &des_enc_const 2300#endif 2301 or %g3, %lo(0xaaaaaaaa), %g3 2302 2303 sllx %g3, 32, %o0 2304 2305 or %g3, %o0, %g3 ! 0xaaaaaaaaaaaaaaaa 2306 2307 srlx %g3, 1, %g2 ! 0x5555555555555555 2308 and %i1, %g3, %g1 2309 2310 sllx %g1, 7, %g3 2311 ldx [%i5 + 0], %l7 ! &(des_ip_table[0][0]) 2312 and %i1, %g2, %g2 2313 2314 srlx %g2, 7, %g4 2315 ldx [%i5 + 8], %l6 ! &(des_ip_table[1][0]) 2316 or %g1, %g3, %g1 2317 2318 srlx %g1, 21, %o0 2319 ld [%i5 + 92], %i4 ! 7 (for iteration counter) 2320 or %g2, %g4, %g2 2321 2322 srlx %g1, 5, %o1 2323 ldx [%i5 + 24], %l0 ! &(des_sbox_table[0][0]) 2324 and %o0, 0x7f8, %o0 2325 2326 srlx %g2, 13, %o2 2327 ldx [%l7 + %o0], %o0 2328 and %o1, 0x7f8, %o1 2329 2330 sllx %g2, 3, %o3 2331 ldx [%l6 + %o1], %o1 2332 and %o2, 0x7f8, %o2 2333 2334 srlx %g1, 53, %o4 2335 ldx [%l7 + %o2], %o2 2336 and %o3, 0x7f8, %o3 2337 2338 srlx %g1, 37, %o5 2339 ldx [%l6 + %o3], %o3 2340 and %o4, 0x7f8, %o4 2341 2342 srlx %g2, 45, %g1 2343 ldx [%l7 + %o4], %o4 2344 and %o5, 0x7f8, %o5 2345 2346 srlx %g2, 29, %g2 2347 ldx [%l6 + %o5], %o5 2348 and %g1, 0x7f8, %g1 2349 2350 sllx %o0, 6, %o0 2351 ldx [%l7 + %g1], %g1 2352 and %g2, 0x7f8, %g2 2353 2354 sllx %o1, 6, %o1 2355 ldx [%l6 + %g2], %g2 2356 or %o4, %o5, %o4 2357 2358 sllx %o2, 6, %o2 2359 ldx [%i5 + 32], %l1 ! &(des_sbox_table[1][0]) 2360 or %o0, %o1, %o0 2361 2362 sllx %o3, 6, %o3 2363 ldx [%i5 + 96], %g3 ! top_1 2364 or %o0, %o4, %o0 2365 2366 or %g1, %g2, %g1 2367 ldx [%i5 + 104], %g4 ! mid_4 2368 or %o2, %o3, %o2 2369 2370 and %o0, %g3, %o4 2371 ldx [%i5 + 112], %g2 ! low_3 2372 or %o2, %g1, %o1 2373 2374 sllx %o4, 8, %o4 2375 ldx [%i5 + 40], %l2 ! &(des_sbox_table[2][0]) 2376 and %o1, %g3, %o5 2377 2378 sllx %o5, 8, %o5 2379 ldx [%i5 + 48], %l3 ! &(des_sbox_table[3][0]) 2380 and %o0, %g2, %o2 2381 2382 srlx %o2, 5, %o2 2383 ldx [%i5 + 56], %l4 ! &(des_sbox_table[4][0]) 2384 and %o1, %g2, %o3 2385 2386 srlx %o3, 5, %o3 2387 ldx [%i0], %g2 ! ks[0] 2388 and %o0, %g4, %o0 2389 2390 or %o0, %o2, %o0 2391 ldx [%i5 + 64], %l5 ! &(des_sbox_table[5][0]) 2392 and %o1, %g4, %o1 2393 2394 or %o0, %o4, %o0 2395 ldx [%i5 + 72], %l6 ! &(des_sbox_table[6][0]) 2396 or %o1, %o3, %o1 2397 2398 xor %o0, %g2, %g1 2399 ldx [%i5 + 80], %l7 ! &(des_sbox_table[7][0]) 2400 or %o1, %o5, %o1 2401#else 2402 2403! v8 version 2404 2405 save %sp,-144,%sp 2406 sethi %hi(des_enc_const), %g2 2407 2408#ifdef PIC 2409.L1: 2410 call .+8 2411 2412 sethi %hi(_GLOBAL_OFFSET_TABLE_ - (.L1 - .)), %g1 2413 2414 or %g1, %lo(_GLOBAL_OFFSET_TABLE_ - (.L1 - .)), %g1 2415 or %g2, %lo(des_enc_const), %g2 2416#else 2417 or %g2, %lo(des_enc_const), %i5 2418#endif 2419 srl %i2, 0, %g4 2420 sethi %hi(0xaaaaaaaa), %g3 2421 2422 sllx %i1, 32, %g5 2423 or %g3, %lo(0xaaaaaaaa), %g3 2424 2425 sllx %g3, 32, %o0 2426 add %o7, %g1, %g1 2427 2428 or %g3, %o0, %g3 ! 0xaaaaaaaaaaaaaaaa 2429#ifdef PIC 2430 ld [%g1 + %g2], %i5 2431#endif 2432 or %g4, %g5, %g4 2433 2434 srlx %g3, 1, %g2 ! 0x5555555555555555 2435 and %g4, %g3, %g1 2436 2437 sllx %g1, 7, %g3 2438 ld [%i5 + 0], %l7 ! &(des_ip_table[0][0]) 2439 and %g4, %g2, %g2 2440 2441 srlx %g2, 7, %g4 2442 ld [%i5 + 4], %l6 ! &(des_ip_table[1][0]) 2443 or %g1, %g3, %g1 2444 2445 srlx %g1, 21, %o0 2446 ld [%i5 + 44], %i4 ! 7 (for iteration counter) 2447 or %g2, %g4, %g2 2448 2449 srlx %g1, 5, %o1 2450 ld [%i5 + 12], %l0 ! &(des_sbox_table[0][0]) 2451 and %o0, 0x7f8, %o0 2452 2453 srlx %g2, 13, %o2 2454 ldx [%l7 + %o0], %o0 2455 and %o1, 0x7f8, %o1 2456 2457 sllx %g2, 3, %o3 2458 ldx [%l6 + %o1], %o1 2459 and %o2, 0x7f8, %o2 2460 2461 srlx %g1, 53, %o4 2462 ldx [%l7 + %o2], %o2 2463 and %o3, 0x7f8, %o3 2464 2465 srlx %g1, 37, %o5 2466 ldx [%l6 + %o3], %o3 2467 and %o4, 0x7f8, %o4 2468 2469 srlx %g2, 45, %g1 2470 ldx [%l7 + %o4], %o4 2471 and %o5, 0x7f8, %o5 2472 2473 srlx %g2, 29, %g2 2474 ldx [%l6 + %o5], %o5 2475 and %g1, 0x7f8, %g1 2476 2477 sllx %o0, 6, %o0 2478 ldx [%l7 + %g1], %g1 2479 and %g2, 0x7f8, %g2 2480 2481 sllx %o1, 6, %o1 2482 ldx [%l6 + %g2], %g2 2483 or %o4, %o5, %o4 2484 2485 sllx %o2, 6, %o2 2486 ld [%i5 + 16], %l1 ! &(des_sbox_table[1][0]) 2487 or %o0, %o1, %o0 2488 2489 sllx %o3, 6, %o3 2490 ldx [%i5 + 48], %g3 ! top_1 2491 or %o0, %o4, %o0 2492 2493 or %g1, %g2, %g1 2494 ldx [%i5 + 56], %g4 ! mid_4 2495 or %o2, %o3, %o2 2496 2497 and %o0, %g3, %o4 2498 ldx [%i5 + 64], %g2 ! low_3 2499 or %o2, %g1, %o1 2500 2501 sllx %o4, 8, %o4 2502 ld [%i5 + 20], %l2 ! &(des_sbox_table[2][0]) 2503 and %o1, %g3, %o5 2504 2505 sllx %o5, 8, %o5 2506 ld [%i5 + 24], %l3 ! &(des_sbox_table[3][0]) 2507 and %o0, %g2, %o2 2508 2509 srlx %o2, 5, %o2 2510 ld [%i5 + 28], %l4 ! &(des_sbox_table[4][0]) 2511 and %o1, %g2, %o3 2512 2513 srlx %o3, 5, %o3 2514 ldx [%i0], %g2 ! ks[0] 2515 and %o0, %g4, %o0 2516 2517 or %o0, %o2, %o0 2518 ld [%i5 + 32], %l5 ! &(des_sbox_table[5][0]) 2519 and %o1, %g4, %o1 2520 2521 or %o0, %o4, %o0 2522 ld [%i5 + 36], %l6 ! &(des_sbox_table[6][0]) 2523 or %o1, %o3, %o1 2524 2525 xor %o0, %g2, %g1 2526 ld [%i5 + 40], %l7 ! &(des_sbox_table[7][0]) 2527 or %o1, %o5, %o1 2528 2529#endif 2530.L2: 2531 srlx %g1, 55, %g1 2532 xor %o0, %g2, %o5 2533.L3: 2534 srlx %o5, 41, %g3 2535 ldx [%l0 + %g1], %g1 2536 and %o5, 0x1f8, %g2 2537 2538 srlx %o5, 29, %g4 2539 ldx [%l7 + %g2], %g2 2540 and %g3, 0x1f8, %g3 2541 2542 srlx %o5, 12, %o2 2543 ldx [%l1 + %g3], %g3 2544 and %g4, 0x1f8, %g4 2545 2546 srlx %o5, 35, %o3 2547 ldx [%l3 + %g4], %g4 2548 and %o2, 0x1f8, %o2 2549 2550 srlx %o5, 6, %o4 2551 ldx [%l5 + %o2], %o2 2552 and %o3, 0x1f8, %o3 2553 2554 or %g1, %g2, %g2 2555 ldx [%l2 + %o3], %o3 2556 and %o4, 0x1f8, %o4 2557 2558 srl %o5, 23, %o5 2559 ldx [%l6 + %o4], %o4 2560 or %g3, %g4, %g4 2561 2562 or %g2, %g4, %g4 2563 ldx [%l4 + %o5], %o5 2564 or %o2, %o3, %o3 2565 2566 or %g4, %o3, %o3 2567 ldx [%i0 + 8], %g2 2568 add %i0, 16, %i0 2569 2570 xor %o1, %o3, %o1 2571 or %o4, %o5, %o5 2572 2573 xor %o1, %g2, %g1 2574 xor %o1, %o5, %o1 2575 2576 srl %g1, 23, %g1 2577 xor %o1, %g2, %o5 2578 2579 srlx %o5, 41, %g3 2580 ldx [%l4 + %g1], %g1 2581 and %o5, 0x1f8, %g2 2582 2583 srlx %o5, 29, %g4 2584 ldx [%l7 + %g2], %g2 2585 and %g3, 0x1f8, %g3 2586 2587 srlx %o5, 12, %o2 2588 ldx [%l1 + %g3], %g3 2589 and %g4, 0x1f8, %g4 2590 2591 srlx %o5, 6, %o3 2592 ldx [%l3 + %g4], %g4 2593 and %o2, 0x1f8, %o2 2594 2595 srlx %o5, 35, %o4 2596 ldx [%l5 + %o2], %o2 2597 and %o3, 0x1f8, %o3 2598 2599 or %g1, %g2, %g2 2600 ldx [%l6 + %o3], %o3 2601 and %o4, 0x1f8, %o4 2602 2603 srlx %o5, 55, %o5 2604 ldx [%l2 + %o4], %o4 2605 or %g3, %g4, %g4 2606 2607 or %g2, %g4, %g4 2608 ldx [%l0 + %o5], %o5 2609 or %o2, %o3, %o3 2610 2611 or %g4, %o3, %o3 2612 ldx [%i0], %g2 2613 subcc %i4,1,%i4 2614 2615 xor %o0, %o3, %o0 2616 or %o4, %o5, %o5 2617 2618 xor %o0, %g2, %g1 2619! bnz %icc, .L2 2620 xor %o0, %o5, %o0 2621 2622 srlx %g1, 55, %g1 2623 xor %o0, %g2, %o5 2624 2625 srlx %o5, 41, %g3 2626 ldx [%l0 + %g1], %g1 2627 and %o5, 0x1f8, %g2 2628 2629 srlx %o5, 29, %g4 2630 ldx [%l7 + %g2], %g2 2631 and %g3, 0x1f8, %g3 2632 2633 srlx %o5, 12, %o2 2634 ldx [%l1 + %g3], %g3 2635 and %g4, 0x1f8, %g4 2636 2637 srlx %o5, 35, %o3 2638 ldx [%l3 + %g4], %g4 2639 and %o2, 0x1f8, %o2 2640 2641 srlx %o5, 6, %o4 2642 ldx [%l5 + %o2], %o2 2643 and %o3, 0x1f8, %o3 2644 2645 or %g1, %g2, %g2 2646 ldx [%l2 + %o3], %o3 2647 and %o4, 0x1f8, %o4 2648 2649 srl %o5, 23, %o5 2650 ldx [%l6 + %o4], %o4 2651 or %g3, %g4, %g4 2652 2653 or %g2, %g4, %g4 2654 ldx [%l4 + %o5], %o5 2655 or %o2, %o3, %o3 2656 2657 or %g4, %o3, %o3 2658 ldx [%i0 + 8], %g2 2659 add %i0, 16, %i0 2660 2661 xor %o1, %o3, %o1 2662 or %o4, %o5, %o5 2663 2664 xor %o1, %g2, %g1 2665 xor %o1, %o5, %o1 2666 2667 srl %g1, 23, %g1 2668 xor %o1, %g2, %o5 2669 2670 srlx %o5, 41, %g3 2671 ldx [%l4 + %g1], %g1 2672 and %o5, 0x1f8, %g2 2673 2674 srlx %o5, 29, %g4 2675 ldx [%l7 + %g2], %g2 2676 and %g3, 0x1f8, %g3 2677 2678 srlx %o5, 12, %o2 2679 ldx [%l1 + %g3], %g3 2680 and %g4, 0x1f8, %g4 2681 2682 srlx %o5, 6, %o3 2683 ldx [%l3 + %g4], %g4 2684 and %o2, 0x1f8, %o2 2685 2686 srlx %o5, 35, %o4 2687 ldx [%l5 + %o2], %o2 2688 and %o3, 0x1f8, %o3 2689 2690 or %g1, %g2, %g2 2691 ldx [%l6 + %o3], %o3 2692 and %o4, 0x1f8, %o4 2693 2694 srlx %o5, 55, %o5 2695 ldx [%l2 + %o4], %o4 2696 or %g3, %g4, %g4 2697 2698 or %g2, %g4, %g4 2699 ldx [%l0 + %o5], %o5 2700 or %o2, %o3, %o3 2701 2702 or %g4, %o3, %o3 2703 ldx [%i0], %g2 2704 subcc %i4,1,%i4 2705 2706 xor %o0, %o3, %o0 2707 or %o4, %o5, %o5 2708 2709 xor %o0, %g2, %g1 2710! bnz %icc, .L2 2711 xor %o0, %o5, %o0 2712 2713 srlx %g1, 55, %g1 2714 xor %o0, %g2, %o5 2715 2716 srlx %o5, 41, %g3 2717 ldx [%l0 + %g1], %g1 2718 and %o5, 0x1f8, %g2 2719 2720 srlx %o5, 29, %g4 2721 ldx [%l7 + %g2], %g2 2722 and %g3, 0x1f8, %g3 2723 2724 srlx %o5, 12, %o2 2725 ldx [%l1 + %g3], %g3 2726 and %g4, 0x1f8, %g4 2727 2728 srlx %o5, 35, %o3 2729 ldx [%l3 + %g4], %g4 2730 and %o2, 0x1f8, %o2 2731 2732 srlx %o5, 6, %o4 2733 ldx [%l5 + %o2], %o2 2734 and %o3, 0x1f8, %o3 2735 2736 or %g1, %g2, %g2 2737 ldx [%l2 + %o3], %o3 2738 and %o4, 0x1f8, %o4 2739 2740 srl %o5, 23, %o5 2741 ldx [%l6 + %o4], %o4 2742 or %g3, %g4, %g4 2743 2744 or %g2, %g4, %g4 2745 ldx [%l4 + %o5], %o5 2746 or %o2, %o3, %o3 2747 2748 or %g4, %o3, %o3 2749 ldx [%i0 + 8], %g2 2750 add %i0, 16, %i0 2751 2752 xor %o1, %o3, %o1 2753 or %o4, %o5, %o5 2754 2755 xor %o1, %g2, %g1 2756 xor %o1, %o5, %o1 2757 2758 srl %g1, 23, %g1 2759 xor %o1, %g2, %o5 2760 2761 srlx %o5, 41, %g3 2762 ldx [%l4 + %g1], %g1 2763 and %o5, 0x1f8, %g2 2764 2765 srlx %o5, 29, %g4 2766 ldx [%l7 + %g2], %g2 2767 and %g3, 0x1f8, %g3 2768 2769 srlx %o5, 12, %o2 2770 ldx [%l1 + %g3], %g3 2771 and %g4, 0x1f8, %g4 2772 2773 srlx %o5, 6, %o3 2774 ldx [%l3 + %g4], %g4 2775 and %o2, 0x1f8, %o2 2776 2777 srlx %o5, 35, %o4 2778 ldx [%l5 + %o2], %o2 2779 and %o3, 0x1f8, %o3 2780 2781 or %g1, %g2, %g2 2782 ldx [%l6 + %o3], %o3 2783 and %o4, 0x1f8, %o4 2784 2785 srlx %o5, 55, %o5 2786 ldx [%l2 + %o4], %o4 2787 or %g3, %g4, %g4 2788 2789 or %g2, %g4, %g4 2790 ldx [%l0 + %o5], %o5 2791 or %o2, %o3, %o3 2792 2793 or %g4, %o3, %o3 2794 ldx [%i0], %g2 2795 subcc %i4,1,%i4 2796 2797 xor %o0, %o3, %o0 2798 or %o4, %o5, %o5 2799 2800 xor %o0, %g2, %g1 2801! bnz %icc, .L2 2802 xor %o0, %o5, %o0 2803 2804 srlx %g1, 55, %g1 2805 xor %o0, %g2, %o5 2806 2807 srlx %o5, 41, %g3 2808 ldx [%l0 + %g1], %g1 2809 and %o5, 0x1f8, %g2 2810 2811 srlx %o5, 29, %g4 2812 ldx [%l7 + %g2], %g2 2813 and %g3, 0x1f8, %g3 2814 2815 srlx %o5, 12, %o2 2816 ldx [%l1 + %g3], %g3 2817 and %g4, 0x1f8, %g4 2818 2819 srlx %o5, 35, %o3 2820 ldx [%l3 + %g4], %g4 2821 and %o2, 0x1f8, %o2 2822 2823 srlx %o5, 6, %o4 2824 ldx [%l5 + %o2], %o2 2825 and %o3, 0x1f8, %o3 2826 2827 or %g1, %g2, %g2 2828 ldx [%l2 + %o3], %o3 2829 and %o4, 0x1f8, %o4 2830 2831 srl %o5, 23, %o5 2832 ldx [%l6 + %o4], %o4 2833 or %g3, %g4, %g4 2834 2835 or %g2, %g4, %g4 2836 ldx [%l4 + %o5], %o5 2837 or %o2, %o3, %o3 2838 2839 or %g4, %o3, %o3 2840 ldx [%i0 + 8], %g2 2841 add %i0, 16, %i0 2842 2843 xor %o1, %o3, %o1 2844 or %o4, %o5, %o5 2845 2846 xor %o1, %g2, %g1 2847 xor %o1, %o5, %o1 2848 2849 srl %g1, 23, %g1 2850 xor %o1, %g2, %o5 2851 2852 srlx %o5, 41, %g3 2853 ldx [%l4 + %g1], %g1 2854 and %o5, 0x1f8, %g2 2855 2856 srlx %o5, 29, %g4 2857 ldx [%l7 + %g2], %g2 2858 and %g3, 0x1f8, %g3 2859 2860 srlx %o5, 12, %o2 2861 ldx [%l1 + %g3], %g3 2862 and %g4, 0x1f8, %g4 2863 2864 srlx %o5, 6, %o3 2865 ldx [%l3 + %g4], %g4 2866 and %o2, 0x1f8, %o2 2867 2868 srlx %o5, 35, %o4 2869 ldx [%l5 + %o2], %o2 2870 and %o3, 0x1f8, %o3 2871 2872 or %g1, %g2, %g2 2873 ldx [%l6 + %o3], %o3 2874 and %o4, 0x1f8, %o4 2875 2876 srlx %o5, 55, %o5 2877 ldx [%l2 + %o4], %o4 2878 or %g3, %g4, %g4 2879 2880 or %g2, %g4, %g4 2881 ldx [%l0 + %o5], %o5 2882 or %o2, %o3, %o3 2883 2884 or %g4, %o3, %o3 2885 ldx [%i0], %g2 2886 subcc %i4,1,%i4 2887 2888 xor %o0, %o3, %o0 2889 or %o4, %o5, %o5 2890 2891 xor %o0, %g2, %g1 2892! bnz %icc, .L2 2893 xor %o0, %o5, %o0 2894 2895 srlx %g1, 55, %g1 2896 xor %o0, %g2, %o5 2897 2898 srlx %o5, 41, %g3 2899 ldx [%l0 + %g1], %g1 2900 and %o5, 0x1f8, %g2 2901 2902 srlx %o5, 29, %g4 2903 ldx [%l7 + %g2], %g2 2904 and %g3, 0x1f8, %g3 2905 2906 srlx %o5, 12, %o2 2907 ldx [%l1 + %g3], %g3 2908 and %g4, 0x1f8, %g4 2909 2910 srlx %o5, 35, %o3 2911 ldx [%l3 + %g4], %g4 2912 and %o2, 0x1f8, %o2 2913 2914 srlx %o5, 6, %o4 2915 ldx [%l5 + %o2], %o2 2916 and %o3, 0x1f8, %o3 2917 2918 or %g1, %g2, %g2 2919 ldx [%l2 + %o3], %o3 2920 and %o4, 0x1f8, %o4 2921 2922 srl %o5, 23, %o5 2923 ldx [%l6 + %o4], %o4 2924 or %g3, %g4, %g4 2925 2926 or %g2, %g4, %g4 2927 ldx [%l4 + %o5], %o5 2928 or %o2, %o3, %o3 2929 2930 or %g4, %o3, %o3 2931 ldx [%i0 + 8], %g2 2932 add %i0, 16, %i0 2933 2934 xor %o1, %o3, %o1 2935 or %o4, %o5, %o5 2936 2937 xor %o1, %g2, %g1 2938 xor %o1, %o5, %o1 2939 2940 srl %g1, 23, %g1 2941 xor %o1, %g2, %o5 2942 2943 srlx %o5, 41, %g3 2944 ldx [%l4 + %g1], %g1 2945 and %o5, 0x1f8, %g2 2946 2947 srlx %o5, 29, %g4 2948 ldx [%l7 + %g2], %g2 2949 and %g3, 0x1f8, %g3 2950 2951 srlx %o5, 12, %o2 2952 ldx [%l1 + %g3], %g3 2953 and %g4, 0x1f8, %g4 2954 2955 srlx %o5, 6, %o3 2956 ldx [%l3 + %g4], %g4 2957 and %o2, 0x1f8, %o2 2958 2959 srlx %o5, 35, %o4 2960 ldx [%l5 + %o2], %o2 2961 and %o3, 0x1f8, %o3 2962 2963 or %g1, %g2, %g2 2964 ldx [%l6 + %o3], %o3 2965 and %o4, 0x1f8, %o4 2966 2967 srlx %o5, 55, %o5 2968 ldx [%l2 + %o4], %o4 2969 or %g3, %g4, %g4 2970 2971 or %g2, %g4, %g4 2972 ldx [%l0 + %o5], %o5 2973 or %o2, %o3, %o3 2974 2975 or %g4, %o3, %o3 2976 ldx [%i0], %g2 2977 subcc %i4,1,%i4 2978 2979 xor %o0, %o3, %o0 2980 or %o4, %o5, %o5 2981 2982 xor %o0, %g2, %g1 2983! bnz %icc, .L2 2984 xor %o0, %o5, %o0 2985 2986 srlx %g1, 55, %g1 2987 xor %o0, %g2, %o5 2988 2989 srlx %o5, 41, %g3 2990 ldx [%l0 + %g1], %g1 2991 and %o5, 0x1f8, %g2 2992 2993 srlx %o5, 29, %g4 2994 ldx [%l7 + %g2], %g2 2995 and %g3, 0x1f8, %g3 2996 2997 srlx %o5, 12, %o2 2998 ldx [%l1 + %g3], %g3 2999 and %g4, 0x1f8, %g4 3000 3001 srlx %o5, 35, %o3 3002 ldx [%l3 + %g4], %g4 3003 and %o2, 0x1f8, %o2 3004 3005 srlx %o5, 6, %o4 3006 ldx [%l5 + %o2], %o2 3007 and %o3, 0x1f8, %o3 3008 3009 or %g1, %g2, %g2 3010 ldx [%l2 + %o3], %o3 3011 and %o4, 0x1f8, %o4 3012 3013 srl %o5, 23, %o5 3014 ldx [%l6 + %o4], %o4 3015 or %g3, %g4, %g4 3016 3017 or %g2, %g4, %g4 3018 ldx [%l4 + %o5], %o5 3019 or %o2, %o3, %o3 3020 3021 or %g4, %o3, %o3 3022 ldx [%i0 + 8], %g2 3023 add %i0, 16, %i0 3024 3025 xor %o1, %o3, %o1 3026 or %o4, %o5, %o5 3027 3028 xor %o1, %g2, %g1 3029 xor %o1, %o5, %o1 3030 3031 srl %g1, 23, %g1 3032 xor %o1, %g2, %o5 3033 3034 srlx %o5, 41, %g3 3035 ldx [%l4 + %g1], %g1 3036 and %o5, 0x1f8, %g2 3037 3038 srlx %o5, 29, %g4 3039 ldx [%l7 + %g2], %g2 3040 and %g3, 0x1f8, %g3 3041 3042 srlx %o5, 12, %o2 3043 ldx [%l1 + %g3], %g3 3044 and %g4, 0x1f8, %g4 3045 3046 srlx %o5, 6, %o3 3047 ldx [%l3 + %g4], %g4 3048 and %o2, 0x1f8, %o2 3049 3050 srlx %o5, 35, %o4 3051 ldx [%l5 + %o2], %o2 3052 and %o3, 0x1f8, %o3 3053 3054 or %g1, %g2, %g2 3055 ldx [%l6 + %o3], %o3 3056 and %o4, 0x1f8, %o4 3057 3058 srlx %o5, 55, %o5 3059 ldx [%l2 + %o4], %o4 3060 or %g3, %g4, %g4 3061 3062 or %g2, %g4, %g4 3063 ldx [%l0 + %o5], %o5 3064 or %o2, %o3, %o3 3065 3066 or %g4, %o3, %o3 3067 ldx [%i0], %g2 3068 subcc %i4,1,%i4 3069 3070 xor %o0, %o3, %o0 3071 or %o4, %o5, %o5 3072 3073 xor %o0, %g2, %g1 3074! bnz %icc, .L2 3075 xor %o0, %o5, %o0 3076 3077 srlx %g1, 55, %g1 3078 xor %o0, %g2, %o5 3079 3080 srlx %o5, 41, %g3 3081 ldx [%l0 + %g1], %g1 3082 and %o5, 0x1f8, %g2 3083 3084 srlx %o5, 29, %g4 3085 ldx [%l7 + %g2], %g2 3086 and %g3, 0x1f8, %g3 3087 3088 srlx %o5, 12, %o2 3089 ldx [%l1 + %g3], %g3 3090 and %g4, 0x1f8, %g4 3091 3092 srlx %o5, 35, %o3 3093 ldx [%l3 + %g4], %g4 3094 and %o2, 0x1f8, %o2 3095 3096 srlx %o5, 6, %o4 3097 ldx [%l5 + %o2], %o2 3098 and %o3, 0x1f8, %o3 3099 3100 or %g1, %g2, %g2 3101 ldx [%l2 + %o3], %o3 3102 and %o4, 0x1f8, %o4 3103 3104 srl %o5, 23, %o5 3105 ldx [%l6 + %o4], %o4 3106 or %g3, %g4, %g4 3107 3108 or %g2, %g4, %g4 3109 ldx [%l4 + %o5], %o5 3110 or %o2, %o3, %o3 3111 3112 or %g4, %o3, %o3 3113 ldx [%i0 + 8], %g2 3114 add %i0, 16, %i0 3115 3116 xor %o1, %o3, %o1 3117 or %o4, %o5, %o5 3118 3119 xor %o1, %g2, %g1 3120 xor %o1, %o5, %o1 3121 3122 srl %g1, 23, %g1 3123 xor %o1, %g2, %o5 3124 3125 srlx %o5, 41, %g3 3126 ldx [%l4 + %g1], %g1 3127 and %o5, 0x1f8, %g2 3128 3129 srlx %o5, 29, %g4 3130 ldx [%l7 + %g2], %g2 3131 and %g3, 0x1f8, %g3 3132 3133 srlx %o5, 12, %o2 3134 ldx [%l1 + %g3], %g3 3135 and %g4, 0x1f8, %g4 3136 3137 srlx %o5, 6, %o3 3138 ldx [%l3 + %g4], %g4 3139 and %o2, 0x1f8, %o2 3140 3141 srlx %o5, 35, %o4 3142 ldx [%l5 + %o2], %o2 3143 and %o3, 0x1f8, %o3 3144 3145 or %g1, %g2, %g2 3146 ldx [%l6 + %o3], %o3 3147 and %o4, 0x1f8, %o4 3148 3149 srlx %o5, 55, %o5 3150 ldx [%l2 + %o4], %o4 3151 or %g3, %g4, %g4 3152 3153 or %g2, %g4, %g4 3154 ldx [%l0 + %o5], %o5 3155 or %o2, %o3, %o3 3156 3157 or %g4, %o3, %o3 3158 ldx [%i0], %g2 3159 subcc %i4,1,%i4 3160 3161 xor %o0, %o3, %o0 3162 or %o4, %o5, %o5 3163 3164 xor %o0, %g2, %g1 3165! bnz %icc, .L2 3166 xor %o0, %o5, %o0 3167 3168 srlx %g1, 55, %g1 3169 xor %o0, %g2, %o5 3170 3171 srlx %o5, 41, %g3 3172 ldx [%l0 + %g1], %g1 3173 and %o5, 0x1f8, %g2 3174 3175 srlx %o5, 29, %g4 3176 ldx [%l7 + %g2], %g2 3177 and %g3, 0x1f8, %g3 3178 3179 srlx %o5, 12, %o2 3180 ldx [%l1 + %g3], %g3 3181 and %g4, 0x1f8, %g4 3182 3183 srlx %o5, 35, %o3 3184 ldx [%l3 + %g4], %g4 3185 and %o2, 0x1f8, %o2 3186 3187 srlx %o5, 6, %o4 3188 ldx [%l5 + %o2], %o2 3189 and %o3, 0x1f8, %o3 3190 3191 or %g1, %g2, %g2 3192 ldx [%l2 + %o3], %o3 3193 and %o4, 0x1f8, %o4 3194 3195 srl %o5, 23, %o5 3196 ldx [%l6 + %o4], %o4 3197 or %g3, %g4, %g4 3198 3199 or %g2, %g4, %g4 3200 ldx [%l4 + %o5], %o5 3201 or %o2, %o3, %o3 3202 3203 or %g4, %o3, %o3 3204 ldx [%i0 + 8], %g2 3205#ifdef __sparcv9 3206 subcc %i2, 1, %i2 ! one_or_three for v9 3207#else 3208 subcc %i3, 1, %i3 ! one_or_three for v8 3209#endif 3210 3211 xor %o1, %o3, %o1 3212 or %o4, %o5, %o5 3213 3214 xor %o1, %g2, %g1 3215 xor %o1, %o5, %g5 3216 3217 srl %g1, 23, %g1 3218 xor %g5, %g2, %o5 3219 3220 srlx %o5, 41, %g3 3221 ldx [%l4 + %g1], %g1 3222 and %o5, 0x1f8, %g2 3223 3224 srlx %o5, 29, %g4 3225 ldx [%l7 + %g2], %g2 3226 and %g3, 0x1f8, %g3 3227 3228 srlx %o5, 12, %o2 3229 ldx [%l1 + %g3], %g3 3230 and %g4, 0x1f8, %g4 3231 3232 srlx %o5, 6, %o3 3233 ldx [%l3 + %g4], %g4 3234 and %o2, 0x1f8, %o2 3235 3236 srlx %o5, 35, %o4 3237 ldx [%l5 + %o2], %o2 3238 and %o3, 0x1f8, %o3 3239 3240 or %g1, %g2, %g2 3241 ldx [%l6 + %o3], %o3 3242 and %o4, 0x1f8, %o4 3243 3244 srlx %o5, 55, %o5 3245 ldx [%l2 + %o4], %o4 3246 or %g3, %g4, %g4 3247 3248 or %g2, %g4, %g4 3249 ldx [%l0 + %o5], %o5 3250 bz,pn %icc, .L4 ! if finished (one or three iterations 3251 or %o2, %o3, %o3 ! of the 16 rounds), go to final perm. 3252 3253 or %g4, %o3, %o3 3254 ldx [%i0 + 16], %g2 3255 add %i0, 16, %i0 3256 3257 xor %o0, %o3, %o0 3258 or %o4, %o5, %o4 3259 3260 xor %g5, %g2, %o5 3261 xor %o0, %o4, %o1 3262 3263 srlx %o5, 55, %g1 3264 ba .L3 3265 or %g5, %g0, %o0 3266 3267 3268.L4: 3269 or %g4, %o3, %o3 3270#ifdef __sparcv9 3271 ldx [%i5 + 16], %i5 ! &(dec_fp_table[0]) 3272#else 3273 ld [%i5 + 8], %i5 ! &(dec_fp_table[0]) 3274#endif 3275 or %g0, 0xf, %g4 3276 3277 xor %o0, %o3, %o0 3278 or %o4, %o5, %o5 3279 3280 sllx %g4, 59, %g4 ! mask for bits 1-4 3281 xor %o0, %o5, %o0 3282 3283! fp starts here 3284 3285 srlx %o0, 33, %g1 3286 and %o0, %g4, %g2 3287 3288 srlx %g5, 37, %l0 3289 and %g5, %g4, %g3 3290 3291 srlx %g2, 53, %g2 3292 and %g1, 0x3c0, %g1 3293 3294 srlx %g3, 57, %l1 3295 and %l0, 0x3c, %l0 3296 3297 srlx %o0, 21, %g3 3298 or %g1, %l0, %l0 3299 3300 srlx %g5, 25, %l2 3301 ld [%i5 + %l0], %l0 3302 or %l1, %g2, %l1 3303 3304 srlx %o0, 4, %g4 3305 ld [%i5 + %l1], %l1 3306 and %g3, 0x3c0, %g3 3307 3308 srlx %g5, 8, %l3 3309 and %l2, 0x3c, %l2 3310 3311 srlx %o0, 27, %g1 3312 or %l2, %g3, %l2 3313 3314 srlx %g5, 31, %l4 3315 ld [%i5 + %l2], %l2 3316 and %g4, 0x3c0, %g4 3317 3318 and %l3, 0x3c, %l3 3319 and %g1, 0x3c0, %g1 3320 3321 srlx %o0, 10, %g2 3322 or %l3, %g4, %l3 3323 3324 srlx %g5, 14, %l5 3325 ld [%i5 + %l3], %l3 3326 and %l4, 0x3c, %l4 3327 3328 sllx %o0, 2, %g3 3329 or %l4, %g1, %l4 3330 3331 srlx %g5, 2, %l6 3332 ld [%i5 + %l4], %l4 3333 and %g2, 0x3c0, %g2 3334 3335 srlx %o0, 39, %g4 3336 and %l5, 0x3c, %l5 3337 3338 and %g3, 0x3c0, %g3 3339 or %l5, %g2, %l5 3340 3341 srlx %g5, 43, %l7 3342 ld [%i5 + %l5], %l5 3343 and %l6, 0x3c, %l6 3344 3345 and %g4, 0x3c0, %g4 3346 or %l6, %g3, %l6 3347 3348 srl %l0, 2, %l0 3349 ld [%i5 + %l6], %l6 3350 and %l7, 0x3c, %l7 3351 3352 srl %l2, 4, %l2 3353 or %l7, %g4, %l7 3354 3355 srl %l4, 2, %l4 3356 ld [%i5 + %l7], %l7 3357 or %l0, %l1, %l1 3358 3359 srl %l5, 4, %l5 3360 or %l1, %l2, %l2 3361 3362 srl %l6, 6, %l6 3363 or %l4, %l5, %l5 3364 3365 srl %l3, 6, %l3 3366 or %l6, %l7, %l7 3367 3368 or %l2, %l3, %i1 3369 or %l5, %l7, %i0 3370 3371! 3372! result at this point is in i0-i1, just as it should for v8 3373! 3374#ifdef __sparcv9 3375 srl %i1, 0, %i1 3376 3377 sllx %i0, 32, %i0 3378 3379 or %i0, %i1, %i0 3380#endif 3381 3382 3383 ret 3384 restore %g0,%g0,%g0 3385 .type des_crypt_impl,2 3386 .size des_crypt_impl,(.-des_crypt_impl) 3387 3388 .align 32 3389! 3390! CONSTANT POOL 3391! 3392des_fp_table: 3393 .word 0 3394 .word -2147483648 3395 .word 8388608 3396 .word -2139095040 3397 .word 32768 3398 .word -2147450880 3399 .word 8421376 3400 .word -2139062272 3401 .word 128 3402 .word -2147483520 3403 .word 8388736 3404 .word -2139094912 3405 .word 32896 3406 .word -2147450752 3407 .word 8421504 3408 .word -2139062144 3409 .word 1073741824 3410 .word -1073741824 3411 .word 1082130432 3412 .word -1065353216 3413 .word 1073774592 3414 .word -1073709056 3415 .word 1082163200 3416 .word -1065320448 3417 .word 1073741952 3418 .word -1073741696 3419 .word 1082130560 3420 .word -1065353088 3421 .word 1073774720 3422 .word -1073708928 3423 .word 1082163328 3424 .word -1065320320 3425 .word 4194304 3426 .word -2143289344 3427 .word 12582912 3428 .word -2134900736 3429 .word 4227072 3430 .word -2143256576 3431 .word 12615680 3432 .word -2134867968 3433 .word 4194432 3434 .word -2143289216 3435 .word 12583040 3436 .word -2134900608 3437 .word 4227200 3438 .word -2143256448 3439 .word 12615808 3440 .word -2134867840 3441 .word 1077936128 3442 .word -1069547520 3443 .word 1086324736 3444 .word -1061158912 3445 .word 1077968896 3446 .word -1069514752 3447 .word 1086357504 3448 .word -1061126144 3449 .word 1077936256 3450 .word -1069547392 3451 .word 1086324864 3452 .word -1061158784 3453 .word 1077969024 3454 .word -1069514624 3455 .word 1086357632 3456 .word -1061126016 3457 .word 16384 3458 .word -2147467264 3459 .word 8404992 3460 .word -2139078656 3461 .word 49152 3462 .word -2147434496 3463 .word 8437760 3464 .word -2139045888 3465 .word 16512 3466 .word -2147467136 3467 .word 8405120 3468 .word -2139078528 3469 .word 49280 3470 .word -2147434368 3471 .word 8437888 3472 .word -2139045760 3473 .word 1073758208 3474 .word -1073725440 3475 .word 1082146816 3476 .word -1065336832 3477 .word 1073790976 3478 .word -1073692672 3479 .word 1082179584 3480 .word -1065304064 3481 .word 1073758336 3482 .word -1073725312 3483 .word 1082146944 3484 .word -1065336704 3485 .word 1073791104 3486 .word -1073692544 3487 .word 1082179712 3488 .word -1065303936 3489 .word 4210688 3490 .word -2143272960 3491 .word 12599296 3492 .word -2134884352 3493 .word 4243456 3494 .word -2143240192 3495 .word 12632064 3496 .word -2134851584 3497 .word 4210816 3498 .word -2143272832 3499 .word 12599424 3500 .word -2134884224 3501 .word 4243584 3502 .word -2143240064 3503 .word 12632192 3504 .word -2134851456 3505 .word 1077952512 3506 .word -1069531136 3507 .word 1086341120 3508 .word -1061142528 3509 .word 1077985280 3510 .word -1069498368 3511 .word 1086373888 3512 .word -1061109760 3513 .word 1077952640 3514 .word -1069531008 3515 .word 1086341248 3516 .word -1061142400 3517 .word 1077985408 3518 .word -1069498240 3519 .word 1086374016 3520 .word -1061109632 3521 .word 64 3522 .word -2147483584 3523 .word 8388672 3524 .word -2139094976 3525 .word 32832 3526 .word -2147450816 3527 .word 8421440 3528 .word -2139062208 3529 .word 192 3530 .word -2147483456 3531 .word 8388800 3532 .word -2139094848 3533 .word 32960 3534 .word -2147450688 3535 .word 8421568 3536 .word -2139062080 3537 .word 1073741888 3538 .word -1073741760 3539 .word 1082130496 3540 .word -1065353152 3541 .word 1073774656 3542 .word -1073708992 3543 .word 1082163264 3544 .word -1065320384 3545 .word 1073742016 3546 .word -1073741632 3547 .word 1082130624 3548 .word -1065353024 3549 .word 1073774784 3550 .word -1073708864 3551 .word 1082163392 3552 .word -1065320256 3553 .word 4194368 3554 .word -2143289280 3555 .word 12582976 3556 .word -2134900672 3557 .word 4227136 3558 .word -2143256512 3559 .word 12615744 3560 .word -2134867904 3561 .word 4194496 3562 .word -2143289152 3563 .word 12583104 3564 .word -2134900544 3565 .word 4227264 3566 .word -2143256384 3567 .word 12615872 3568 .word -2134867776 3569 .word 1077936192 3570 .word -1069547456 3571 .word 1086324800 3572 .word -1061158848 3573 .word 1077968960 3574 .word -1069514688 3575 .word 1086357568 3576 .word -1061126080 3577 .word 1077936320 3578 .word -1069547328 3579 .word 1086324928 3580 .word -1061158720 3581 .word 1077969088 3582 .word -1069514560 3583 .word 1086357696 3584 .word -1061125952 3585 .word 16448 3586 .word -2147467200 3587 .word 8405056 3588 .word -2139078592 3589 .word 49216 3590 .word -2147434432 3591 .word 8437824 3592 .word -2139045824 3593 .word 16576 3594 .word -2147467072 3595 .word 8405184 3596 .word -2139078464 3597 .word 49344 3598 .word -2147434304 3599 .word 8437952 3600 .word -2139045696 3601 .word 1073758272 3602 .word -1073725376 3603 .word 1082146880 3604 .word -1065336768 3605 .word 1073791040 3606 .word -1073692608 3607 .word 1082179648 3608 .word -1065304000 3609 .word 1073758400 3610 .word -1073725248 3611 .word 1082147008 3612 .word -1065336640 3613 .word 1073791168 3614 .word -1073692480 3615 .word 1082179776 3616 .word -1065303872 3617 .word 4210752 3618 .word -2143272896 3619 .word 12599360 3620 .word -2134884288 3621 .word 4243520 3622 .word -2143240128 3623 .word 12632128 3624 .word -2134851520 3625 .word 4210880 3626 .word -2143272768 3627 .word 12599488 3628 .word -2134884160 3629 .word 4243648 3630 .word -2143240000 3631 .word 12632256 3632 .word -2134851392 3633 .word 1077952576 3634 .word -1069531072 3635 .word 1086341184 3636 .word -1061142464 3637 .word 1077985344 3638 .word -1069498304 3639 .word 1086373952 3640 .word -1061109696 3641 .word 1077952704 3642 .word -1069530944 3643 .word 1086341312 3644 .word -1061142336 3645 .word 1077985472 3646 .word -1069498176 3647 .word 1086374080 3648 .word -1061109568 3649 .type des_fp_table,#object 3650 .size des_fp_table,1024 3651 3652/* EXPORT DELETE END */ 3653 3654#endif /* lint || __lint */ 3655