digest-kangarootwelve 0.4.6 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/digest-kangarootwelve.gemspec +1 -1
- data/ext/digest/kangarootwelve/.sitearchdir.-.digest.time +0 -0
- data/ext/digest/kangarootwelve/XKCP/lib/high/KangarooTwelve/KangarooTwelve.c +32 -32
- data/ext/digest/kangarootwelve/XKCP/lib/high/KangarooTwelve/KangarooTwelve.h +5 -5
- data/ext/digest/kangarootwelve/XKCP/lib/high/Keccak/KeccakSponge.c +0 -18
- data/ext/digest/kangarootwelve/XKCP/lib/high/Keccak/KeccakSponge.h +0 -6
- data/ext/digest/kangarootwelve/XKCP/lib/high/TurboSHAKE/TurboSHAKE.c +71 -0
- data/ext/digest/kangarootwelve/XKCP/lib/high/TurboSHAKE/TurboSHAKE.h +49 -0
- data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/AVX2/KeccakP-1600-AVX2.s +0 -52
- data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/AVX512/KeccakP-1600-AVX512.s +0 -48
- data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/common/KeccakP-1600-64.macros +19 -9
- data/ext/digest/kangarootwelve/XKCP/lib/low/common/PlSnP-Fallback.inc +3 -2
- data/ext/digest/kangarootwelve/ext.c +3 -1
- data/ext/digest/kangarootwelve/targets/armv6/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/armv6/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/armv6m/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/armv6m/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/armv7a/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/armv7a/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/armv7m/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/armv7m/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/armv8a/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/armv8a/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/avr8/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/avr8/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/avx/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/avx/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/avx2/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/avx2/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/avx2noasm/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/avx2noasm/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/avx512/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/avx512/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/avx512noasm/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/avx512noasm/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/compact/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/compact/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/config.h +1 -0
- data/ext/digest/kangarootwelve/targets/generic32/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/generic32/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/generic32lc/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/generic32lc/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/generic64/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/generic64/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/generic64lc/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/generic64lc/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/reference/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/reference/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/reference32bits/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/reference32bits/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/ssse3/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/ssse3/TurboSHAKE.h +1 -0
- data/ext/digest/kangarootwelve/targets/xop/TurboSHAKE.c +1 -0
- data/ext/digest/kangarootwelve/targets/xop/TurboSHAKE.h +1 -0
- data/lib/digest/kangarootwelve/version.rb +1 -1
- metadata +54 -5
@@ -25,10 +25,8 @@
|
|
25
25
|
.globl KeccakP1600_Initialize
|
26
26
|
.globl _KeccakP1600_Initialize
|
27
27
|
.ifndef old_gas_syntax
|
28
|
-
.ifndef no_type
|
29
28
|
.type KeccakP1600_Initialize,@function
|
30
29
|
.endif
|
31
|
-
.endif
|
32
30
|
KeccakP1600_Initialize:
|
33
31
|
_KeccakP1600_Initialize:
|
34
32
|
.balign 32
|
@@ -42,10 +40,8 @@ _KeccakP1600_Initialize:
|
|
42
40
|
movq $0,6*32(%rdi)
|
43
41
|
ret
|
44
42
|
.ifndef old_gas_syntax
|
45
|
-
.ifndef no_size
|
46
43
|
.size KeccakP1600_Initialize,.-KeccakP1600_Initialize
|
47
44
|
.endif
|
48
|
-
.endif
|
49
45
|
|
50
46
|
# -----------------------------------------------------------------------------
|
51
47
|
#
|
@@ -55,10 +51,8 @@ _KeccakP1600_Initialize:
|
|
55
51
|
.globl KeccakP1600_AddByte
|
56
52
|
.globl _KeccakP1600_AddByte
|
57
53
|
.ifndef old_gas_syntax
|
58
|
-
.ifndef no_type
|
59
54
|
.type KeccakP1600_AddByte,@function
|
60
55
|
.endif
|
61
|
-
.endif
|
62
56
|
KeccakP1600_AddByte:
|
63
57
|
_KeccakP1600_AddByte:
|
64
58
|
.balign 32
|
@@ -72,10 +66,8 @@ _KeccakP1600_AddByte:
|
|
72
66
|
xorb %sil, (%rdi)
|
73
67
|
ret
|
74
68
|
.ifndef old_gas_syntax
|
75
|
-
.ifndef no_size
|
76
69
|
.size KeccakP1600_AddByte,.-KeccakP1600_AddByte
|
77
70
|
.endif
|
78
|
-
.endif
|
79
71
|
|
80
72
|
# -----------------------------------------------------------------------------
|
81
73
|
#
|
@@ -85,10 +77,8 @@ _KeccakP1600_AddByte:
|
|
85
77
|
.globl KeccakP1600_AddBytes
|
86
78
|
.globl _KeccakP1600_AddBytes
|
87
79
|
.ifndef old_gas_syntax
|
88
|
-
.ifndef no_type
|
89
80
|
.type KeccakP1600_AddBytes,@function
|
90
81
|
.endif
|
91
|
-
.endif
|
92
82
|
KeccakP1600_AddBytes:
|
93
83
|
_KeccakP1600_AddBytes:
|
94
84
|
.balign 32
|
@@ -141,10 +131,8 @@ KeccakP1600_AddBytes_LastIncompleteLaneLoop:
|
|
141
131
|
KeccakP1600_AddBytes_Exit:
|
142
132
|
ret
|
143
133
|
.ifndef old_gas_syntax
|
144
|
-
.ifndef no_size
|
145
134
|
.size KeccakP1600_AddBytes,.-KeccakP1600_AddBytes
|
146
135
|
.endif
|
147
|
-
.endif
|
148
136
|
|
149
137
|
# -----------------------------------------------------------------------------
|
150
138
|
#
|
@@ -154,10 +142,8 @@ KeccakP1600_AddBytes_Exit:
|
|
154
142
|
.globl KeccakP1600_OverwriteBytes
|
155
143
|
.globl _KeccakP1600_OverwriteBytes
|
156
144
|
.ifndef old_gas_syntax
|
157
|
-
.ifndef no_type
|
158
145
|
.type KeccakP1600_OverwriteBytes,@function
|
159
146
|
.endif
|
160
|
-
.endif
|
161
147
|
KeccakP1600_OverwriteBytes:
|
162
148
|
_KeccakP1600_OverwriteBytes:
|
163
149
|
.balign 32
|
@@ -210,10 +196,8 @@ KeccakP1600_OverwriteBytes_LastIncompleteLaneLoop:
|
|
210
196
|
KeccakP1600_OverwriteBytes_Exit:
|
211
197
|
ret
|
212
198
|
.ifndef old_gas_syntax
|
213
|
-
.ifndef no_size
|
214
199
|
.size KeccakP1600_OverwriteBytes,.-KeccakP1600_OverwriteBytes
|
215
200
|
.endif
|
216
|
-
.endif
|
217
201
|
|
218
202
|
# -----------------------------------------------------------------------------
|
219
203
|
#
|
@@ -223,10 +207,8 @@ KeccakP1600_OverwriteBytes_Exit:
|
|
223
207
|
.globl KeccakP1600_OverwriteWithZeroes
|
224
208
|
.globl _KeccakP1600_OverwriteWithZeroes
|
225
209
|
.ifndef old_gas_syntax
|
226
|
-
.ifndef no_type
|
227
210
|
.type KeccakP1600_OverwriteWithZeroes,@function
|
228
211
|
.endif
|
229
|
-
.endif
|
230
212
|
KeccakP1600_OverwriteWithZeroes:
|
231
213
|
_KeccakP1600_OverwriteWithZeroes:
|
232
214
|
.balign 32
|
@@ -255,10 +237,8 @@ KeccakP1600_OverwriteWithZeroes_LastIncompleteLaneLoop:
|
|
255
237
|
KeccakP1600_OverwriteWithZeroes_Exit:
|
256
238
|
ret
|
257
239
|
.ifndef old_gas_syntax
|
258
|
-
.ifndef no_size
|
259
240
|
.size KeccakP1600_OverwriteWithZeroes,.-KeccakP1600_OverwriteWithZeroes
|
260
241
|
.endif
|
261
|
-
.endif
|
262
242
|
|
263
243
|
# -----------------------------------------------------------------------------
|
264
244
|
#
|
@@ -268,10 +248,8 @@ KeccakP1600_OverwriteWithZeroes_Exit:
|
|
268
248
|
.globl KeccakP1600_ExtractBytes
|
269
249
|
.globl _KeccakP1600_ExtractBytes
|
270
250
|
.ifndef old_gas_syntax
|
271
|
-
.ifndef no_type
|
272
251
|
.type KeccakP1600_ExtractBytes,@function
|
273
252
|
.endif
|
274
|
-
.endif
|
275
253
|
KeccakP1600_ExtractBytes:
|
276
254
|
_KeccakP1600_ExtractBytes:
|
277
255
|
.balign 32
|
@@ -327,10 +305,8 @@ KeccakP1600_ExtractBytes_Exit:
|
|
327
305
|
pop %rbx
|
328
306
|
ret
|
329
307
|
.ifndef old_gas_syntax
|
330
|
-
.ifndef no_size
|
331
308
|
.size KeccakP1600_ExtractBytes,.-KeccakP1600_ExtractBytes
|
332
309
|
.endif
|
333
|
-
.endif
|
334
310
|
|
335
311
|
# -----------------------------------------------------------------------------
|
336
312
|
#
|
@@ -340,10 +316,8 @@ KeccakP1600_ExtractBytes_Exit:
|
|
340
316
|
.globl KeccakP1600_ExtractAndAddBytes
|
341
317
|
.globl _KeccakP1600_ExtractAndAddBytes
|
342
318
|
.ifndef old_gas_syntax
|
343
|
-
.ifndef no_type
|
344
319
|
.type KeccakP1600_ExtractAndAddBytes,@function
|
345
320
|
.endif
|
346
|
-
.endif
|
347
321
|
KeccakP1600_ExtractAndAddBytes:
|
348
322
|
_KeccakP1600_ExtractAndAddBytes:
|
349
323
|
.balign 32
|
@@ -407,20 +381,16 @@ KeccakP1600_ExtractAndAddBytes_Exit:
|
|
407
381
|
pop %rbx
|
408
382
|
ret
|
409
383
|
.ifndef old_gas_syntax
|
410
|
-
.ifndef no_size
|
411
384
|
.size KeccakP1600_ExtractAndAddBytes,.-KeccakP1600_ExtractAndAddBytes
|
412
385
|
.endif
|
413
|
-
.endif
|
414
386
|
|
415
387
|
# -----------------------------------------------------------------------------
|
416
388
|
#
|
417
389
|
# internal
|
418
390
|
#
|
419
391
|
.ifndef old_gas_syntax
|
420
|
-
.ifndef no_type
|
421
392
|
.type __KeccakF1600,@function
|
422
393
|
.endif
|
423
|
-
.endif
|
424
394
|
.balign 32
|
425
395
|
__KeccakF1600:
|
426
396
|
.Loop_avx2:
|
@@ -561,10 +531,8 @@ __KeccakF1600:
|
|
561
531
|
jnz .Loop_avx2
|
562
532
|
ret
|
563
533
|
.ifndef old_gas_syntax
|
564
|
-
.ifndef no_size
|
565
534
|
.size __KeccakF1600,.-__KeccakF1600
|
566
535
|
.endif
|
567
|
-
.endif
|
568
536
|
|
569
537
|
# -----------------------------------------------------------------------------
|
570
538
|
#
|
@@ -574,10 +542,8 @@ __KeccakF1600:
|
|
574
542
|
.globl KeccakP1600_Permute_24rounds
|
575
543
|
.globl _KeccakP1600_Permute_24rounds
|
576
544
|
.ifndef old_gas_syntax
|
577
|
-
.ifndef no_type
|
578
545
|
.type KeccakP1600_Permute_24rounds,@function
|
579
546
|
.endif
|
580
|
-
.endif
|
581
547
|
KeccakP1600_Permute_24rounds:
|
582
548
|
_KeccakP1600_Permute_24rounds:
|
583
549
|
.balign 32
|
@@ -605,10 +571,8 @@ _KeccakP1600_Permute_24rounds:
|
|
605
571
|
vzeroupper
|
606
572
|
ret
|
607
573
|
.ifndef old_gas_syntax
|
608
|
-
.ifndef no_size
|
609
574
|
.size KeccakP1600_Permute_24rounds,.-KeccakP1600_Permute_24rounds
|
610
575
|
.endif
|
611
|
-
.endif
|
612
576
|
|
613
577
|
# -----------------------------------------------------------------------------
|
614
578
|
#
|
@@ -618,10 +582,8 @@ _KeccakP1600_Permute_24rounds:
|
|
618
582
|
.globl KeccakP1600_Permute_12rounds
|
619
583
|
.globl _KeccakP1600_Permute_12rounds
|
620
584
|
.ifndef old_gas_syntax
|
621
|
-
.ifndef no_type
|
622
585
|
.type KeccakP1600_Permute_12rounds,@function
|
623
586
|
.endif
|
624
|
-
.endif
|
625
587
|
KeccakP1600_Permute_12rounds:
|
626
588
|
_KeccakP1600_Permute_12rounds:
|
627
589
|
.balign 32
|
@@ -649,10 +611,8 @@ _KeccakP1600_Permute_12rounds:
|
|
649
611
|
vzeroupper
|
650
612
|
ret
|
651
613
|
.ifndef old_gas_syntax
|
652
|
-
.ifndef no_size
|
653
614
|
.size KeccakP1600_Permute_12rounds,.-KeccakP1600_Permute_12rounds
|
654
615
|
.endif
|
655
|
-
.endif
|
656
616
|
|
657
617
|
# -----------------------------------------------------------------------------
|
658
618
|
#
|
@@ -662,10 +622,8 @@ _KeccakP1600_Permute_12rounds:
|
|
662
622
|
.globl KeccakP1600_Permute_Nrounds
|
663
623
|
.globl _KeccakP1600_Permute_Nrounds
|
664
624
|
.ifndef old_gas_syntax
|
665
|
-
.ifndef no_type
|
666
625
|
.type KeccakP1600_Permute_Nrounds,@function
|
667
626
|
.endif
|
668
|
-
.endif
|
669
627
|
KeccakP1600_Permute_Nrounds:
|
670
628
|
_KeccakP1600_Permute_Nrounds:
|
671
629
|
.balign 32
|
@@ -695,10 +653,8 @@ _KeccakP1600_Permute_Nrounds:
|
|
695
653
|
vzeroupper
|
696
654
|
ret
|
697
655
|
.ifndef old_gas_syntax
|
698
|
-
.ifndef no_size
|
699
656
|
.size KeccakP1600_Permute_Nrounds,.-KeccakP1600_Permute_Nrounds
|
700
657
|
.endif
|
701
|
-
.endif
|
702
658
|
|
703
659
|
# -----------------------------------------------------------------------------
|
704
660
|
#
|
@@ -708,10 +664,8 @@ _KeccakP1600_Permute_Nrounds:
|
|
708
664
|
.globl KeccakF1600_FastLoop_Absorb
|
709
665
|
.globl _KeccakF1600_FastLoop_Absorb
|
710
666
|
.ifndef old_gas_syntax
|
711
|
-
.ifndef no_type
|
712
667
|
.type KeccakF1600_FastLoop_Absorb,@function
|
713
668
|
.endif
|
714
|
-
.endif
|
715
669
|
KeccakF1600_FastLoop_Absorb:
|
716
670
|
_KeccakF1600_FastLoop_Absorb:
|
717
671
|
.balign 32
|
@@ -878,10 +832,8 @@ KeccakF1600_FastLoop_Absorb_LanesAddLoop:
|
|
878
832
|
jae KeccakF1600_FastLoop_Absorb_Not17Lanes
|
879
833
|
jmp KeccakF1600_FastLoop_Absorb_Exit
|
880
834
|
.ifndef old_gas_syntax
|
881
|
-
.ifndef no_size
|
882
835
|
.size KeccakF1600_FastLoop_Absorb,.-KeccakF1600_FastLoop_Absorb
|
883
836
|
.endif
|
884
|
-
.endif
|
885
837
|
|
886
838
|
# -----------------------------------------------------------------------------
|
887
839
|
#
|
@@ -891,10 +843,8 @@ KeccakF1600_FastLoop_Absorb_LanesAddLoop:
|
|
891
843
|
.globl KeccakP1600_12rounds_FastLoop_Absorb
|
892
844
|
.globl _KeccakP1600_12rounds_FastLoop_Absorb
|
893
845
|
.ifndef old_gas_syntax
|
894
|
-
.ifndef no_type
|
895
846
|
.type KeccakP1600_12rounds_FastLoop_Absorb,@function
|
896
847
|
.endif
|
897
|
-
.endif
|
898
848
|
KeccakP1600_12rounds_FastLoop_Absorb:
|
899
849
|
_KeccakP1600_12rounds_FastLoop_Absorb:
|
900
850
|
.balign 32
|
@@ -1061,10 +1011,8 @@ KeccakP1600_12rounds_FastLoop_Absorb_LanesAddLoop:
|
|
1061
1011
|
jae KeccakP1600_12rounds_FastLoop_Absorb_Not17Lanes
|
1062
1012
|
jmp KeccakP1600_12rounds_FastLoop_Absorb_Exit
|
1063
1013
|
.ifndef old_gas_syntax
|
1064
|
-
.ifndef no_size
|
1065
1014
|
.size KeccakP1600_12rounds_FastLoop_Absorb,.-KeccakP1600_12rounds_FastLoop_Absorb
|
1066
1015
|
.endif
|
1067
|
-
.endif
|
1068
1016
|
|
1069
1017
|
.equ ALLON, 0xFFFFFFFFFFFFFFFF
|
1070
1018
|
|
@@ -25,10 +25,8 @@
|
|
25
25
|
.globl KeccakP1600_Initialize
|
26
26
|
.globl _KeccakP1600_Initialize
|
27
27
|
.ifndef old_gas_syntax
|
28
|
-
.ifndef no_type
|
29
28
|
.type KeccakP1600_Initialize,@function
|
30
29
|
.endif
|
31
|
-
.endif
|
32
30
|
KeccakP1600_Initialize:
|
33
31
|
_KeccakP1600_Initialize:
|
34
32
|
.balign 32
|
@@ -39,10 +37,8 @@ _KeccakP1600_Initialize:
|
|
39
37
|
movq $0,3*64(%rdi)
|
40
38
|
ret
|
41
39
|
.ifndef old_gas_syntax
|
42
|
-
.ifndef no_size
|
43
40
|
.size KeccakP1600_Initialize,.-KeccakP1600_Initialize
|
44
41
|
.endif
|
45
|
-
.endif
|
46
42
|
|
47
43
|
# -----------------------------------------------------------------------------
|
48
44
|
#
|
@@ -71,10 +67,8 @@ _KeccakP1600_Initialize:
|
|
71
67
|
.globl KeccakP1600_AddBytes
|
72
68
|
.globl _KeccakP1600_AddBytes
|
73
69
|
.ifndef old_gas_syntax
|
74
|
-
.ifndef no_type
|
75
70
|
.type KeccakP1600_AddBytes,@function
|
76
71
|
.endif
|
77
|
-
.endif
|
78
72
|
KeccakP1600_AddBytes:
|
79
73
|
_KeccakP1600_AddBytes:
|
80
74
|
.balign 32
|
@@ -117,10 +111,8 @@ KeccakP1600_AddBytes_LastIncompleteLaneLoop:
|
|
117
111
|
KeccakP1600_AddBytes_Exit:
|
118
112
|
ret
|
119
113
|
.ifndef old_gas_syntax
|
120
|
-
.ifndef no_size
|
121
114
|
.size KeccakP1600_AddBytes,.-KeccakP1600_AddBytes
|
122
115
|
.endif
|
123
|
-
.endif
|
124
116
|
|
125
117
|
# -----------------------------------------------------------------------------
|
126
118
|
#
|
@@ -130,10 +122,8 @@ KeccakP1600_AddBytes_Exit:
|
|
130
122
|
.globl KeccakP1600_OverwriteBytes
|
131
123
|
.globl _KeccakP1600_OverwriteBytes
|
132
124
|
.ifndef old_gas_syntax
|
133
|
-
.ifndef no_type
|
134
125
|
.type KeccakP1600_OverwriteBytes,@function
|
135
126
|
.endif
|
136
|
-
.endif
|
137
127
|
KeccakP1600_OverwriteBytes:
|
138
128
|
_KeccakP1600_OverwriteBytes:
|
139
129
|
.balign 32
|
@@ -176,10 +166,8 @@ KeccakP1600_OverwriteBytes_LastIncompleteLaneLoop:
|
|
176
166
|
KeccakP1600_OverwriteBytes_Exit:
|
177
167
|
ret
|
178
168
|
.ifndef old_gas_syntax
|
179
|
-
.ifndef no_size
|
180
169
|
.size KeccakP1600_OverwriteBytes,.-KeccakP1600_OverwriteBytes
|
181
170
|
.endif
|
182
|
-
.endif
|
183
171
|
|
184
172
|
# -----------------------------------------------------------------------------
|
185
173
|
#
|
@@ -189,10 +177,8 @@ KeccakP1600_OverwriteBytes_Exit:
|
|
189
177
|
.globl KeccakP1600_OverwriteWithZeroes
|
190
178
|
.globl _KeccakP1600_OverwriteWithZeroes
|
191
179
|
.ifndef old_gas_syntax
|
192
|
-
.ifndef no_type
|
193
180
|
.type KeccakP1600_OverwriteWithZeroes,@function
|
194
181
|
.endif
|
195
|
-
.endif
|
196
182
|
KeccakP1600_OverwriteWithZeroes:
|
197
183
|
_KeccakP1600_OverwriteWithZeroes:
|
198
184
|
.balign 32
|
@@ -216,10 +202,8 @@ KeccakP1600_OverwriteWithZeroes_LastIncompleteLaneLoop:
|
|
216
202
|
KeccakP1600_OverwriteWithZeroes_Exit:
|
217
203
|
ret
|
218
204
|
.ifndef old_gas_syntax
|
219
|
-
.ifndef no_size
|
220
205
|
.size KeccakP1600_OverwriteWithZeroes,.-KeccakP1600_OverwriteWithZeroes
|
221
206
|
.endif
|
222
|
-
.endif
|
223
207
|
|
224
208
|
# -----------------------------------------------------------------------------
|
225
209
|
#
|
@@ -229,10 +213,8 @@ KeccakP1600_OverwriteWithZeroes_Exit:
|
|
229
213
|
.globl KeccakP1600_ExtractBytes
|
230
214
|
.globl _KeccakP1600_ExtractBytes
|
231
215
|
.ifndef old_gas_syntax
|
232
|
-
.ifndef no_type
|
233
216
|
.type KeccakP1600_ExtractBytes,@function
|
234
217
|
.endif
|
235
|
-
.endif
|
236
218
|
KeccakP1600_ExtractBytes:
|
237
219
|
_KeccakP1600_ExtractBytes:
|
238
220
|
.balign 32
|
@@ -275,10 +257,8 @@ KeccakP1600_ExtractBytes_LastIncompleteLaneLoop:
|
|
275
257
|
KeccakP1600_ExtractBytes_Exit:
|
276
258
|
ret
|
277
259
|
.ifndef old_gas_syntax
|
278
|
-
.ifndef no_size
|
279
260
|
.size KeccakP1600_ExtractBytes,.-KeccakP1600_ExtractBytes
|
280
261
|
.endif
|
281
|
-
.endif
|
282
262
|
|
283
263
|
# -----------------------------------------------------------------------------
|
284
264
|
#
|
@@ -288,10 +268,8 @@ KeccakP1600_ExtractBytes_Exit:
|
|
288
268
|
.globl KeccakP1600_ExtractAndAddBytes
|
289
269
|
.globl _KeccakP1600_ExtractAndAddBytes
|
290
270
|
.ifndef old_gas_syntax
|
291
|
-
.ifndef no_type
|
292
271
|
.type KeccakP1600_ExtractAndAddBytes,@function
|
293
272
|
.endif
|
294
|
-
.endif
|
295
273
|
KeccakP1600_ExtractAndAddBytes:
|
296
274
|
_KeccakP1600_ExtractAndAddBytes:
|
297
275
|
.balign 32
|
@@ -342,10 +320,8 @@ KeccakP1600_ExtractAndAddBytes_Exit:
|
|
342
320
|
pop %rbx
|
343
321
|
ret
|
344
322
|
.ifndef old_gas_syntax
|
345
|
-
.ifndef no_size
|
346
323
|
.size KeccakP1600_ExtractAndAddBytes,.-KeccakP1600_ExtractAndAddBytes
|
347
324
|
.endif
|
348
|
-
.endif
|
349
325
|
|
350
326
|
# -----------------------------------------------------------------------------
|
351
327
|
#
|
@@ -353,10 +329,8 @@ KeccakP1600_ExtractAndAddBytes_Exit:
|
|
353
329
|
#
|
354
330
|
.text
|
355
331
|
.ifndef old_gas_syntax
|
356
|
-
.ifndef no_type
|
357
332
|
.type __KeccakF1600,@function
|
358
333
|
.endif
|
359
|
-
.endif
|
360
334
|
.balign 32
|
361
335
|
__KeccakF1600:
|
362
336
|
.Loop_avx512:
|
@@ -466,10 +440,8 @@ __KeccakF1600:
|
|
466
440
|
jnz .Loop_avx512
|
467
441
|
ret
|
468
442
|
.ifndef old_gas_syntax
|
469
|
-
.ifndef no_size
|
470
443
|
.size __KeccakF1600,.-__KeccakF1600
|
471
444
|
.endif
|
472
|
-
.endif
|
473
445
|
|
474
446
|
# -----------------------------------------------------------------------------
|
475
447
|
#
|
@@ -479,10 +451,8 @@ __KeccakF1600:
|
|
479
451
|
.globl KeccakP1600_Permute_24rounds
|
480
452
|
.globl _KeccakP1600_Permute_24rounds
|
481
453
|
.ifndef old_gas_syntax
|
482
|
-
.ifndef no_type
|
483
454
|
.type KeccakP1600_Permute_24rounds,@function
|
484
455
|
.endif
|
485
|
-
.endif
|
486
456
|
KeccakP1600_Permute_24rounds:
|
487
457
|
_KeccakP1600_Permute_24rounds:
|
488
458
|
.balign 32
|
@@ -532,10 +502,8 @@ _KeccakP1600_Permute_24rounds:
|
|
532
502
|
vzeroupper
|
533
503
|
ret
|
534
504
|
.ifndef old_gas_syntax
|
535
|
-
.ifndef no_size
|
536
505
|
.size KeccakP1600_Permute_24rounds,.-KeccakP1600_Permute_24rounds
|
537
506
|
.endif
|
538
|
-
.endif
|
539
507
|
|
540
508
|
# -----------------------------------------------------------------------------
|
541
509
|
#
|
@@ -545,10 +513,8 @@ _KeccakP1600_Permute_24rounds:
|
|
545
513
|
.globl KeccakP1600_Permute_12rounds
|
546
514
|
.globl _KeccakP1600_Permute_12rounds
|
547
515
|
.ifndef old_gas_syntax
|
548
|
-
.ifndef no_type
|
549
516
|
.type KeccakP1600_Permute_12rounds,@function
|
550
517
|
.endif
|
551
|
-
.endif
|
552
518
|
KeccakP1600_Permute_12rounds:
|
553
519
|
_KeccakP1600_Permute_12rounds:
|
554
520
|
.balign 32
|
@@ -598,10 +564,8 @@ _KeccakP1600_Permute_12rounds:
|
|
598
564
|
vzeroupper
|
599
565
|
ret
|
600
566
|
.ifndef old_gas_syntax
|
601
|
-
.ifndef no_size
|
602
567
|
.size KeccakP1600_Permute_12rounds,.-KeccakP1600_Permute_12rounds
|
603
568
|
.endif
|
604
|
-
.endif
|
605
569
|
|
606
570
|
# -----------------------------------------------------------------------------
|
607
571
|
#
|
@@ -611,10 +575,8 @@ _KeccakP1600_Permute_12rounds:
|
|
611
575
|
.globl KeccakP1600_Permute_Nrounds
|
612
576
|
.globl _KeccakP1600_Permute_Nrounds
|
613
577
|
.ifndef old_gas_syntax
|
614
|
-
.ifndef no_type
|
615
578
|
.type KeccakP1600_Permute_Nrounds,@function
|
616
579
|
.endif
|
617
|
-
.endif
|
618
580
|
KeccakP1600_Permute_Nrounds:
|
619
581
|
_KeccakP1600_Permute_Nrounds:
|
620
582
|
.balign 32
|
@@ -735,10 +697,8 @@ _KeccakP1600_Permute_Nrounds:
|
|
735
697
|
vzeroupper
|
736
698
|
ret
|
737
699
|
.ifndef old_gas_syntax
|
738
|
-
.ifndef no_size
|
739
700
|
.size KeccakP1600_Permute_Nrounds,.-KeccakP1600_Permute_Nrounds
|
740
701
|
.endif
|
741
|
-
.endif
|
742
702
|
|
743
703
|
# -----------------------------------------------------------------------------
|
744
704
|
#
|
@@ -748,10 +708,8 @@ _KeccakP1600_Permute_Nrounds:
|
|
748
708
|
.globl KeccakF1600_FastLoop_Absorb
|
749
709
|
.globl _KeccakF1600_FastLoop_Absorb
|
750
710
|
.ifndef old_gas_syntax
|
751
|
-
.ifndef no_type
|
752
711
|
.type KeccakF1600_FastLoop_Absorb,@function
|
753
712
|
.endif
|
754
|
-
.endif
|
755
713
|
KeccakF1600_FastLoop_Absorb:
|
756
714
|
_KeccakF1600_FastLoop_Absorb:
|
757
715
|
.balign 32
|
@@ -878,10 +836,8 @@ KeccakF1600_FastLoop_Absorb_LanesAddLoop:
|
|
878
836
|
jae KeccakF1600_FastLoop_Absorb_LanesLoop
|
879
837
|
jmp KeccakF1600_FastLoop_Absorb_Exit
|
880
838
|
.ifndef old_gas_syntax
|
881
|
-
.ifndef no_size
|
882
839
|
.size KeccakF1600_FastLoop_Absorb,.-KeccakF1600_FastLoop_Absorb
|
883
840
|
.endif
|
884
|
-
.endif
|
885
841
|
|
886
842
|
# -----------------------------------------------------------------------------
|
887
843
|
#
|
@@ -891,10 +847,8 @@ KeccakF1600_FastLoop_Absorb_LanesAddLoop:
|
|
891
847
|
.globl KeccakP1600_12rounds_FastLoop_Absorb
|
892
848
|
.globl _KeccakP1600_12rounds_FastLoop_Absorb
|
893
849
|
.ifndef old_gas_syntax
|
894
|
-
.ifndef no_type
|
895
850
|
.type KeccakP1600_12rounds_FastLoop_Absorb,@function
|
896
851
|
.endif
|
897
|
-
.endif
|
898
852
|
KeccakP1600_12rounds_FastLoop_Absorb:
|
899
853
|
_KeccakP1600_12rounds_FastLoop_Absorb:
|
900
854
|
.balign 32
|
@@ -1021,10 +975,8 @@ KeccakP1600_FastLoop_Absorb_LanesAddLoop:
|
|
1021
975
|
jae KeccakP1600_FastLoop_Absorb_LanesLoop
|
1022
976
|
jmp KeccakP1600_FastLoop_Absorb_Exit
|
1023
977
|
.ifndef old_gas_syntax
|
1024
|
-
.ifndef no_size
|
1025
978
|
.size KeccakP1600_12rounds_FastLoop_Absorb,.-KeccakP1600_12rounds_FastLoop_Absorb
|
1026
979
|
.endif
|
1027
|
-
.endif
|
1028
980
|
.balign 64
|
1029
981
|
theta_perm:
|
1030
982
|
.quad 0, 1, 2, 3, 4, 5, 6, 7 # [not used]
|
@@ -542,15 +542,25 @@ http://creativecommons.org/publicdomain/zero/1.0/
|
|
542
542
|
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
|
543
543
|
#define HTOLE64(x) (x)
|
544
544
|
#else
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
545
|
+
/*
|
546
|
+
* Big Endian platforms macro to swap data.
|
547
|
+
*
|
548
|
+
* NOTE: we cannot directly use the 64-bit input
|
549
|
+
* of the following macro because of possible alignment
|
550
|
+
* constraints (on some platforms such as Sparc or MIPS,
|
551
|
+
* dereferencing an uint64_t on a buffer not aligned on the
|
552
|
+
* word size will induce a 'bus error'). Instead, we read and
|
553
|
+
* swap the data byte per byte.
|
554
|
+
*/
|
555
|
+
#define HTOLE64(x) \
|
556
|
+
( ((uint64_t) (((uint8_t*)&(x))[ 7]) << 56 ) \
|
557
|
+
| ((uint64_t) (((uint8_t*)&(x))[ 6]) << 48 ) \
|
558
|
+
| ((uint64_t) (((uint8_t*)&(x))[ 5]) << 40 ) \
|
559
|
+
| ((uint64_t) (((uint8_t*)&(x))[ 4]) << 32 ) \
|
560
|
+
| ((uint64_t) (((uint8_t*)&(x))[ 3]) << 24 ) \
|
561
|
+
| ((uint64_t) (((uint8_t*)&(x))[ 2]) << 16 ) \
|
562
|
+
| ((uint64_t) (((uint8_t*)&(x))[ 1]) << 8 ) \
|
563
|
+
| ((uint64_t) (((uint8_t*)&(x))[ 0])))
|
554
564
|
#endif
|
555
565
|
|
556
566
|
#define addInput(X, input, laneCount) \
|
@@ -51,6 +51,7 @@ Please refer to PlSnP-documentation.h for more details.
|
|
51
51
|
#define PlSnP_factor ((PlSnP_targetParallelism)/(PlSnP_baseParallelism))
|
52
52
|
#define SnP_stateOffset (((SnP_stateSizeInBytes+(SnP_stateAlignment-1))/SnP_stateAlignment)*SnP_stateAlignment)
|
53
53
|
#define stateWithIndex(i) ((unsigned char *)states+((i)*SnP_stateOffset))
|
54
|
+
#define stateWithIndexConst(i) ((const unsigned char *)states+((i)*SnP_stateOffset))
|
54
55
|
|
55
56
|
#define SnP_StaticInitialize JOIN(SnP, _StaticInitialize)
|
56
57
|
#define SnP_Initialize JOIN(SnP, _Initialize)
|
@@ -220,7 +221,7 @@ void PlSnP_ExtractLanesAll(const void *states, unsigned char *data, unsigned int
|
|
220
221
|
|
221
222
|
for(i=0; i<PlSnP_factor; i++) {
|
222
223
|
#if (PlSnP_baseParallelism == 1)
|
223
|
-
SnP_ExtractBytes(
|
224
|
+
SnP_ExtractBytes(stateWithIndexConst(i), data, 0, laneCount*SnP_laneLengthInBytes);
|
224
225
|
#else
|
225
226
|
SnP_ExtractLanesAll(stateWithIndex(i), data, laneCount, laneOffset);
|
226
227
|
#endif
|
@@ -243,7 +244,7 @@ void PlSnP_ExtractAndAddLanesAll(const void *states, const unsigned char *input,
|
|
243
244
|
|
244
245
|
for(i=0; i<PlSnP_factor; i++) {
|
245
246
|
#if (PlSnP_baseParallelism == 1)
|
246
|
-
SnP_ExtractAndAddBytes(
|
247
|
+
SnP_ExtractAndAddBytes(stateWithIndexConst(i), input, output, 0, laneCount*SnP_laneLengthInBytes);
|
247
248
|
#else
|
248
249
|
SnP_ExtractAndAddLanesAll(stateWithIndex(i), input, output, laneCount, laneOffset);
|
249
250
|
#endif
|
@@ -597,7 +597,7 @@ static VALUE _Digest_KangarooTwelve_Impl_inspect(VALUE self)
|
|
597
597
|
* Init
|
598
598
|
*/
|
599
599
|
|
600
|
-
void Init_kangarootwelve()
|
600
|
+
void Init_kangarootwelve(void)
|
601
601
|
{
|
602
602
|
#define DEFINE_ID(x) _id_##x = rb_intern_const(#x);
|
603
603
|
|
@@ -695,5 +695,7 @@ void Init_kangarootwelve()
|
|
695
695
|
_Digest_KangarooTwelve_Metadata = rb_define_class_under(_Digest_KangarooTwelve, "Metadata",
|
696
696
|
rb_cObject);
|
697
697
|
|
698
|
+
rb_undef_alloc_func(_Digest_KangarooTwelve_Metadata);
|
699
|
+
|
698
700
|
rb_require("digest/kangarootwelve/version");
|
699
701
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.h"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.h"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.h"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.h"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.h"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.h"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.h"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.h"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.h"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.h"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.h"
|
@@ -0,0 +1 @@
|
|
1
|
+
#include "../../XKCP/lib/high/TurboSHAKE/TurboSHAKE.c"
|