1424
1437
.DES_decrypt3.end:
1425
1438
.size DES_decrypt3,.DES_decrypt3.end-DES_decrypt3
1428
.type .des_and,#object
1433
! This table is used for AND 0xFC when it is known that register
1434
! bits 8-31 are zero. Makes it possible to do three arithmetic
1435
! operations in one cycle.
1437
.byte 0, 0, 0, 0, 4, 4, 4, 4
1438
.byte 8, 8, 8, 8, 12, 12, 12, 12
1439
.byte 16, 16, 16, 16, 20, 20, 20, 20
1440
.byte 24, 24, 24, 24, 28, 28, 28, 28
1441
.byte 32, 32, 32, 32, 36, 36, 36, 36
1442
.byte 40, 40, 40, 40, 44, 44, 44, 44
1443
.byte 48, 48, 48, 48, 52, 52, 52, 52
1444
.byte 56, 56, 56, 56, 60, 60, 60, 60
1445
.byte 64, 64, 64, 64, 68, 68, 68, 68
1446
.byte 72, 72, 72, 72, 76, 76, 76, 76
1447
.byte 80, 80, 80, 80, 84, 84, 84, 84
1448
.byte 88, 88, 88, 88, 92, 92, 92, 92
1449
.byte 96, 96, 96, 96, 100, 100, 100, 100
1450
.byte 104, 104, 104, 104, 108, 108, 108, 108
1451
.byte 112, 112, 112, 112, 116, 116, 116, 116
1452
.byte 120, 120, 120, 120, 124, 124, 124, 124
1453
.byte 128, 128, 128, 128, 132, 132, 132, 132
1454
.byte 136, 136, 136, 136, 140, 140, 140, 140
1455
.byte 144, 144, 144, 144, 148, 148, 148, 148
1456
.byte 152, 152, 152, 152, 156, 156, 156, 156
1457
.byte 160, 160, 160, 160, 164, 164, 164, 164
1458
.byte 168, 168, 168, 168, 172, 172, 172, 172
1459
.byte 176, 176, 176, 176, 180, 180, 180, 180
1460
.byte 184, 184, 184, 184, 188, 188, 188, 188
1461
.byte 192, 192, 192, 192, 196, 196, 196, 196
1462
.byte 200, 200, 200, 200, 204, 204, 204, 204
1463
.byte 208, 208, 208, 208, 212, 212, 212, 212
1464
.byte 216, 216, 216, 216, 220, 220, 220, 220
1465
.byte 224, 224, 224, 224, 228, 228, 228, 228
1466
.byte 232, 232, 232, 232, 236, 236, 236, 236
1467
.byte 240, 240, 240, 240, 244, 244, 244, 244
1468
.byte 248, 248, 248, 248, 252, 252, 252, 252
1470
! 5 numbers for initil/final permutation
1472
.word 0x0f0f0f0f ! offset 256
1473
.word 0x0000ffff ! 260
1474
.word 0x33333333 ! 264
1475
.word 0x00ff00ff ! 268
1476
.word 0x55555555 ! 272
1480
.word 0x0000FC00 ! 284
1482
.word %r_disp32(DES_SPtrans)
1484
! input: out0 offset between .PIC.me.up and caller
1485
! output: out0 pointer to .PIC.me.up
1486
! out2 pointer to .des_and
1487
! global1 pointer to DES_SPtrans
1490
add out0,%o7,out0 ! pointer to .PIC.me.up
1492
ld [out0+(.PIC.DES_SPtrans-.PIC.me.up)],global1
1493
add global1,(.PIC.DES_SPtrans-.PIC.me.up),global1
1494
add global1,out0,global1
1497
! In case anybody wonders why this code is same for both ABI.
1498
! To start with it is not. Do note LDPTR below. But of course
1499
! you must be wondering why the rest of it does not contain
1500
! things like %hh, %hm and %lm. Well, those are needed only
1501
! if OpenSSL library *itself* will become larger than 4GB,
1502
! which is not going to happen any time soon.
1503
sethi %hi(DES_SPtrans),global1
1504
or global1,%lo(DES_SPtrans),global1
1505
sethi %hi(_GLOBAL_OFFSET_TABLE_-(.PIC.me.up-.)),out2
1506
add global1,out0,global1
1507
add out2,%lo(_GLOBAL_OFFSET_TABLE_-(.PIC.me.up-.)),out2
1508
LDPTR [out2+global1],global1
1510
setn DES_SPtrans,out2,global1 ! synthetic instruction !
1511
# elif defined(ABI64)
1512
sethi %hh(DES_SPtrans),out2
1513
or out2,%hm(DES_SPtrans),out2
1514
sethi %lm(DES_SPtrans),global1
1515
or global1,%lo(DES_SPtrans),global1
1517
or out2,global1,global1
1519
sethi %hi(DES_SPtrans),global1
1520
or global1,%lo(DES_SPtrans),global1
1524
add out0,.des_and-.PIC.me.up,out2
1526
1440
! void DES_ncbc_encrypt(input, output, length, schedule, ivec, enc)
1527
1441
! *****************************************************************
1979
1899
.DES_ede3_cbc_encrypt.end:
1980
1900
.size DES_ede3_cbc_encrypt,.DES_ede3_cbc_encrypt.end-DES_ede3_cbc_encrypt
1903
.type .des_and,#object
1908
! This table is used for AND 0xFC when it is known that register
1909
! bits 8-31 are zero. Makes it possible to do three arithmetic
1910
! operations in one cycle.
1912
.byte 0, 0, 0, 0, 4, 4, 4, 4
1913
.byte 8, 8, 8, 8, 12, 12, 12, 12
1914
.byte 16, 16, 16, 16, 20, 20, 20, 20
1915
.byte 24, 24, 24, 24, 28, 28, 28, 28
1916
.byte 32, 32, 32, 32, 36, 36, 36, 36
1917
.byte 40, 40, 40, 40, 44, 44, 44, 44
1918
.byte 48, 48, 48, 48, 52, 52, 52, 52
1919
.byte 56, 56, 56, 56, 60, 60, 60, 60
1920
.byte 64, 64, 64, 64, 68, 68, 68, 68
1921
.byte 72, 72, 72, 72, 76, 76, 76, 76
1922
.byte 80, 80, 80, 80, 84, 84, 84, 84
1923
.byte 88, 88, 88, 88, 92, 92, 92, 92
1924
.byte 96, 96, 96, 96, 100, 100, 100, 100
1925
.byte 104, 104, 104, 104, 108, 108, 108, 108
1926
.byte 112, 112, 112, 112, 116, 116, 116, 116
1927
.byte 120, 120, 120, 120, 124, 124, 124, 124
1928
.byte 128, 128, 128, 128, 132, 132, 132, 132
1929
.byte 136, 136, 136, 136, 140, 140, 140, 140
1930
.byte 144, 144, 144, 144, 148, 148, 148, 148
1931
.byte 152, 152, 152, 152, 156, 156, 156, 156
1932
.byte 160, 160, 160, 160, 164, 164, 164, 164
1933
.byte 168, 168, 168, 168, 172, 172, 172, 172
1934
.byte 176, 176, 176, 176, 180, 180, 180, 180
1935
.byte 184, 184, 184, 184, 188, 188, 188, 188
1936
.byte 192, 192, 192, 192, 196, 196, 196, 196
1937
.byte 200, 200, 200, 200, 204, 204, 204, 204
1938
.byte 208, 208, 208, 208, 212, 212, 212, 212
1939
.byte 216, 216, 216, 216, 220, 220, 220, 220
1940
.byte 224, 224, 224, 224, 228, 228, 228, 228
1941
.byte 232, 232, 232, 232, 236, 236, 236, 236
1942
.byte 240, 240, 240, 240, 244, 244, 244, 244
1943
.byte 248, 248, 248, 248, 252, 252, 252, 252
1945
! 5 numbers for initil/final permutation
1947
.word 0x0f0f0f0f ! offset 256
1948
.word 0x0000ffff ! 260
1949
.word 0x33333333 ! 264
1950
.word 0x00ff00ff ! 268
1951
.word 0x55555555 ! 272
1955
.word 0x0000FC00 ! 284
1957
.type .PIC.DES_SPtrans,#object
1958
.size .PIC.DES_SPtrans,2048
1962
.word 0x02080800, 0x00080000, 0x02000002, 0x02080802
1963
.word 0x02000000, 0x00080802, 0x00080002, 0x02000002
1964
.word 0x00080802, 0x02080800, 0x02080000, 0x00000802
1965
.word 0x02000802, 0x02000000, 0x00000000, 0x00080002
1966
.word 0x00080000, 0x00000002, 0x02000800, 0x00080800
1967
.word 0x02080802, 0x02080000, 0x00000802, 0x02000800
1968
.word 0x00000002, 0x00000800, 0x00080800, 0x02080002
1969
.word 0x00000800, 0x02000802, 0x02080002, 0x00000000
1970
.word 0x00000000, 0x02080802, 0x02000800, 0x00080002
1971
.word 0x02080800, 0x00080000, 0x00000802, 0x02000800
1972
.word 0x02080002, 0x00000800, 0x00080800, 0x02000002
1973
.word 0x00080802, 0x00000002, 0x02000002, 0x02080000
1974
.word 0x02080802, 0x00080800, 0x02080000, 0x02000802
1975
.word 0x02000000, 0x00000802, 0x00080002, 0x00000000
1976
.word 0x00080000, 0x02000000, 0x02000802, 0x02080800
1977
.word 0x00000002, 0x02080002, 0x00000800, 0x00080802
1979
.word 0x40108010, 0x00000000, 0x00108000, 0x40100000
1980
.word 0x40000010, 0x00008010, 0x40008000, 0x00108000
1981
.word 0x00008000, 0x40100010, 0x00000010, 0x40008000
1982
.word 0x00100010, 0x40108000, 0x40100000, 0x00000010
1983
.word 0x00100000, 0x40008010, 0x40100010, 0x00008000
1984
.word 0x00108010, 0x40000000, 0x00000000, 0x00100010
1985
.word 0x40008010, 0x00108010, 0x40108000, 0x40000010
1986
.word 0x40000000, 0x00100000, 0x00008010, 0x40108010
1987
.word 0x00100010, 0x40108000, 0x40008000, 0x00108010
1988
.word 0x40108010, 0x00100010, 0x40000010, 0x00000000
1989
.word 0x40000000, 0x00008010, 0x00100000, 0x40100010
1990
.word 0x00008000, 0x40000000, 0x00108010, 0x40008010
1991
.word 0x40108000, 0x00008000, 0x00000000, 0x40000010
1992
.word 0x00000010, 0x40108010, 0x00108000, 0x40100000
1993
.word 0x40100010, 0x00100000, 0x00008010, 0x40008000
1994
.word 0x40008010, 0x00000010, 0x40100000, 0x00108000
1996
.word 0x04000001, 0x04040100, 0x00000100, 0x04000101
1997
.word 0x00040001, 0x04000000, 0x04000101, 0x00040100
1998
.word 0x04000100, 0x00040000, 0x04040000, 0x00000001
1999
.word 0x04040101, 0x00000101, 0x00000001, 0x04040001
2000
.word 0x00000000, 0x00040001, 0x04040100, 0x00000100
2001
.word 0x00000101, 0x04040101, 0x00040000, 0x04000001
2002
.word 0x04040001, 0x04000100, 0x00040101, 0x04040000
2003
.word 0x00040100, 0x00000000, 0x04000000, 0x00040101
2004
.word 0x04040100, 0x00000100, 0x00000001, 0x00040000
2005
.word 0x00000101, 0x00040001, 0x04040000, 0x04000101
2006
.word 0x00000000, 0x04040100, 0x00040100, 0x04040001
2007
.word 0x00040001, 0x04000000, 0x04040101, 0x00000001
2008
.word 0x00040101, 0x04000001, 0x04000000, 0x04040101
2009
.word 0x00040000, 0x04000100, 0x04000101, 0x00040100
2010
.word 0x04000100, 0x00000000, 0x04040001, 0x00000101
2011
.word 0x04000001, 0x00040101, 0x00000100, 0x04040000
2013
.word 0x00401008, 0x10001000, 0x00000008, 0x10401008
2014
.word 0x00000000, 0x10400000, 0x10001008, 0x00400008
2015
.word 0x10401000, 0x10000008, 0x10000000, 0x00001008
2016
.word 0x10000008, 0x00401008, 0x00400000, 0x10000000
2017
.word 0x10400008, 0x00401000, 0x00001000, 0x00000008
2018
.word 0x00401000, 0x10001008, 0x10400000, 0x00001000
2019
.word 0x00001008, 0x00000000, 0x00400008, 0x10401000
2020
.word 0x10001000, 0x10400008, 0x10401008, 0x00400000
2021
.word 0x10400008, 0x00001008, 0x00400000, 0x10000008
2022
.word 0x00401000, 0x10001000, 0x00000008, 0x10400000
2023
.word 0x10001008, 0x00000000, 0x00001000, 0x00400008
2024
.word 0x00000000, 0x10400008, 0x10401000, 0x00001000
2025
.word 0x10000000, 0x10401008, 0x00401008, 0x00400000
2026
.word 0x10401008, 0x00000008, 0x10001000, 0x00401008
2027
.word 0x00400008, 0x00401000, 0x10400000, 0x10001008
2028
.word 0x00001008, 0x10000000, 0x10000008, 0x10401000
2030
.word 0x08000000, 0x00010000, 0x00000400, 0x08010420
2031
.word 0x08010020, 0x08000400, 0x00010420, 0x08010000
2032
.word 0x00010000, 0x00000020, 0x08000020, 0x00010400
2033
.word 0x08000420, 0x08010020, 0x08010400, 0x00000000
2034
.word 0x00010400, 0x08000000, 0x00010020, 0x00000420
2035
.word 0x08000400, 0x00010420, 0x00000000, 0x08000020
2036
.word 0x00000020, 0x08000420, 0x08010420, 0x00010020
2037
.word 0x08010000, 0x00000400, 0x00000420, 0x08010400
2038
.word 0x08010400, 0x08000420, 0x00010020, 0x08010000
2039
.word 0x00010000, 0x00000020, 0x08000020, 0x08000400
2040
.word 0x08000000, 0x00010400, 0x08010420, 0x00000000
2041
.word 0x00010420, 0x08000000, 0x00000400, 0x00010020
2042
.word 0x08000420, 0x00000400, 0x00000000, 0x08010420
2043
.word 0x08010020, 0x08010400, 0x00000420, 0x00010000
2044
.word 0x00010400, 0x08010020, 0x08000400, 0x00000420
2045
.word 0x00000020, 0x00010420, 0x08010000, 0x08000020
2047
.word 0x80000040, 0x00200040, 0x00000000, 0x80202000
2048
.word 0x00200040, 0x00002000, 0x80002040, 0x00200000
2049
.word 0x00002040, 0x80202040, 0x00202000, 0x80000000
2050
.word 0x80002000, 0x80000040, 0x80200000, 0x00202040
2051
.word 0x00200000, 0x80002040, 0x80200040, 0x00000000
2052
.word 0x00002000, 0x00000040, 0x80202000, 0x80200040
2053
.word 0x80202040, 0x80200000, 0x80000000, 0x00002040
2054
.word 0x00000040, 0x00202000, 0x00202040, 0x80002000
2055
.word 0x00002040, 0x80000000, 0x80002000, 0x00202040
2056
.word 0x80202000, 0x00200040, 0x00000000, 0x80002000
2057
.word 0x80000000, 0x00002000, 0x80200040, 0x00200000
2058
.word 0x00200040, 0x80202040, 0x00202000, 0x00000040
2059
.word 0x80202040, 0x00202000, 0x00200000, 0x80002040
2060
.word 0x80000040, 0x80200000, 0x00202040, 0x00000000
2061
.word 0x00002000, 0x80000040, 0x80002040, 0x80202000
2062
.word 0x80200000, 0x00002040, 0x00000040, 0x80200040
2064
.word 0x00004000, 0x00000200, 0x01000200, 0x01000004
2065
.word 0x01004204, 0x00004004, 0x00004200, 0x00000000
2066
.word 0x01000000, 0x01000204, 0x00000204, 0x01004000
2067
.word 0x00000004, 0x01004200, 0x01004000, 0x00000204
2068
.word 0x01000204, 0x00004000, 0x00004004, 0x01004204
2069
.word 0x00000000, 0x01000200, 0x01000004, 0x00004200
2070
.word 0x01004004, 0x00004204, 0x01004200, 0x00000004
2071
.word 0x00004204, 0x01004004, 0x00000200, 0x01000000
2072
.word 0x00004204, 0x01004000, 0x01004004, 0x00000204
2073
.word 0x00004000, 0x00000200, 0x01000000, 0x01004004
2074
.word 0x01000204, 0x00004204, 0x00004200, 0x00000000
2075
.word 0x00000200, 0x01000004, 0x00000004, 0x01000200
2076
.word 0x00000000, 0x01000204, 0x01000200, 0x00004200
2077
.word 0x00000204, 0x00004000, 0x01004204, 0x01000000
2078
.word 0x01004200, 0x00000004, 0x00004004, 0x01004204
2079
.word 0x01000004, 0x01004200, 0x01004000, 0x00004004
2081
.word 0x20800080, 0x20820000, 0x00020080, 0x00000000
2082
.word 0x20020000, 0x00800080, 0x20800000, 0x20820080
2083
.word 0x00000080, 0x20000000, 0x00820000, 0x00020080
2084
.word 0x00820080, 0x20020080, 0x20000080, 0x20800000
2085
.word 0x00020000, 0x00820080, 0x00800080, 0x20020000
2086
.word 0x20820080, 0x20000080, 0x00000000, 0x00820000
2087
.word 0x20000000, 0x00800000, 0x20020080, 0x20800080
2088
.word 0x00800000, 0x00020000, 0x20820000, 0x00000080
2089
.word 0x00800000, 0x00020000, 0x20000080, 0x20820080
2090
.word 0x00020080, 0x20000000, 0x00000000, 0x00820000
2091
.word 0x20800080, 0x20020080, 0x20020000, 0x00800080
2092
.word 0x20820000, 0x00000080, 0x00800080, 0x20020000
2093
.word 0x20820080, 0x00800000, 0x20800000, 0x20000080
2094
.word 0x00820000, 0x00020080, 0x20020080, 0x20800000
2095
.word 0x00000080, 0x20820000, 0x00820080, 0x00000000
2096
.word 0x20000000, 0x20800080, 0x00020000, 0x00820080