digest-kangarootwelve 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of digest-kangarootwelve might be problematic. Click here for more details.

Files changed (1025) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/LICENSE.XKCP +9 -0
  4. data/README.md +63 -33
  5. data/Rakefile +58 -4
  6. data/digest-kangarootwelve.gemspec +22 -316
  7. data/ext/digest/kangarootwelve/XKCP/lib/common/align.h +33 -0
  8. data/ext/digest/kangarootwelve/XKCP/lib/common/brg_endian.h +143 -0
  9. data/ext/digest/kangarootwelve/XKCP/lib/high/KangarooTwelve/KangarooTwelve.c +301 -0
  10. data/ext/digest/kangarootwelve/XKCP/lib/high/KangarooTwelve/KangarooTwelve.h +97 -0
  11. data/ext/digest/kangarootwelve/XKCP/lib/high/Keccak/KeccakSponge.c +111 -0
  12. data/ext/digest/kangarootwelve/XKCP/lib/high/Keccak/KeccakSponge.h +76 -0
  13. data/ext/digest/kangarootwelve/XKCP/lib/high/Keccak/KeccakSponge.inc +314 -0
  14. data/ext/digest/kangarootwelve/XKCP/lib/high/common/Phases.h +25 -0
  15. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/ARM/KeccakP-1600-SnP.h +41 -0
  16. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/ARMv7A-NEON/KeccakP-1600-SnP.h +42 -0
  17. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/AVR8/KeccakP-1600-SnP.h +42 -0
  18. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/AVX2/KeccakP-1600-SnP.h +52 -0
  19. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/AVX512/C/KeccakP-1600-AVX512.c +623 -0
  20. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/AVX512/C/KeccakP-1600-SnP.h +47 -0
  21. data/ext/digest/kangarootwelve/{keccak/skylakex → XKCP/lib/low/KeccakP-1600/AVX512/C/u12}/KeccakP-1600-AVX512-config.h +0 -0
  22. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/AVX512/KeccakP-1600-SnP.h +53 -0
  23. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/XOP/KeccakP-1600-SnP.h +44 -0
  24. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/XOP/KeccakP-1600-XOP.c +476 -0
  25. data/ext/digest/kangarootwelve/{keccak/bulldozer → XKCP/lib/low/KeccakP-1600/XOP/ua}/KeccakP-1600-XOP-config.h +0 -0
  26. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/common/KeccakP-1600-64.macros +748 -0
  27. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/common/KeccakP-1600-unrolling.macros +305 -0
  28. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/compact/KeccakP-1600-SnP.h +40 -0
  29. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/compact/KeccakP-1600-compact64.c +420 -0
  30. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/plain-32bits-inplace/KeccakP-1600-SnP.h +43 -0
  31. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/plain-32bits-inplace/KeccakP-1600-inplace32BI.c +1163 -0
  32. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/plain-64bits/KeccakP-1600-SnP.h +54 -0
  33. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/plain-64bits/KeccakP-1600-opt64.c +565 -0
  34. data/ext/digest/kangarootwelve/{keccak/generic64lc → XKCP/lib/low/KeccakP-1600/plain-64bits/lcua}/KeccakP-1600-opt64-config.h +0 -0
  35. data/ext/digest/kangarootwelve/{keccak/sandybridge → XKCP/lib/low/KeccakP-1600/plain-64bits/lcua-shld}/KeccakP-1600-opt64-config.h +0 -0
  36. data/ext/digest/kangarootwelve/{keccak/generic64 → XKCP/lib/low/KeccakP-1600/plain-64bits/ua}/KeccakP-1600-opt64-config.h +0 -0
  37. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/ref-32bits/KeccakP-1600-SnP.h +44 -0
  38. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/ref-32bits/KeccakP-1600-reference.h +23 -0
  39. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/ref-32bits/KeccakP-1600-reference32BI.c +625 -0
  40. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/ref-64bits/KeccakP-1600-SnP.h +44 -0
  41. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/ref-64bits/KeccakP-1600-reference.c +440 -0
  42. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600/ref-64bits/KeccakP-1600-reference.h +23 -0
  43. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times2/ARMv7A-NEON/KeccakP-1600-times2-SnP.h +42 -0
  44. data/ext/digest/kangarootwelve/{keccak/skylakex → XKCP/lib/low/KeccakP-1600-times2/AVX512/AVX512u12}/SIMD512-2-config.h +0 -0
  45. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times2/AVX512/KeccakP-1600-times2-SIMD512.c +850 -0
  46. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times2/AVX512/KeccakP-1600-times2-SnP.h +51 -0
  47. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times2/SIMD128/KeccakP-1600-times2-SIMD128.c +957 -0
  48. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times2/SIMD128/KeccakP-1600-times2-SnP.h +49 -0
  49. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times2/SIMD128/SSSE3-u2/SIMD128-config.h +8 -0
  50. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times2/SIMD128/SSSE3-ua/SIMD128-config.h +8 -0
  51. data/ext/digest/kangarootwelve/{keccak/bulldozer → XKCP/lib/low/KeccakP-1600-times2/SIMD128/XOP-ua}/SIMD128-config.h +0 -0
  52. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times2/fallback-on1/KeccakP-1600-times2-SnP.h +45 -0
  53. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times2/fallback-on1/KeccakP-1600-times2-on1.c +37 -0
  54. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times4/AVX2/KeccakP-1600-times4-SIMD256.c +1321 -0
  55. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times4/AVX2/KeccakP-1600-times4-SnP.h +55 -0
  56. data/ext/digest/kangarootwelve/{keccak/haswell → XKCP/lib/low/KeccakP-1600-times4/AVX2/u12}/SIMD256-config.h +0 -0
  57. data/ext/digest/kangarootwelve/{keccak/skylakex → XKCP/lib/low/KeccakP-1600-times4/AVX512/AVX512u12}/SIMD512-4-config.h +0 -0
  58. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times4/AVX512/KeccakP-1600-times4-SIMD512.c +881 -0
  59. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times4/AVX512/KeccakP-1600-times4-SnP.h +51 -0
  60. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times4/fallback-on1/KeccakP-1600-times4-SnP.h +45 -0
  61. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times4/fallback-on1/KeccakP-1600-times4-on1.c +37 -0
  62. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times4/fallback-on2/KeccakP-1600-times4-SnP.h +45 -0
  63. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times4/fallback-on2/KeccakP-1600-times4-on2.c +38 -0
  64. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times8/AVX512/KeccakP-1600-times8-SIMD512.c +1615 -0
  65. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times8/AVX512/KeccakP-1600-times8-SnP.h +57 -0
  66. data/ext/digest/kangarootwelve/{keccak/skylakex → XKCP/lib/low/KeccakP-1600-times8/AVX512/u12}/SIMD512-config.h +0 -0
  67. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times8/fallback-on1/KeccakP-1600-times8-SnP.h +45 -0
  68. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times8/fallback-on1/KeccakP-1600-times8-on1.c +37 -0
  69. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times8/fallback-on2/KeccakP-1600-times8-SnP.h +45 -0
  70. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times8/fallback-on2/KeccakP-1600-times8-on2.c +38 -0
  71. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times8/fallback-on4/KeccakP-1600-times8-SnP.h +45 -0
  72. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-1600-times8/fallback-on4/KeccakP-1600-times8-on4.c +38 -0
  73. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-200/ARM/KeccakP-200-SnP.h +41 -0
  74. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-200/ARM/KeccakP-200-armv7m-le-gcc.s +427 -0
  75. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-200/AVR8/KeccakP-200-SnP.h +41 -0
  76. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-200/compact/KeccakP-200-SnP.h +39 -0
  77. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-200/compact/KeccakP-200-compact.c +190 -0
  78. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-200/ref/KeccakP-200-SnP.h +43 -0
  79. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-200/ref/KeccakP-200-reference.c +412 -0
  80. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-200/ref/KeccakP-200-reference.h +23 -0
  81. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-400/ARM/KeccakP-400-SnP.h +41 -0
  82. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-400/AVR8/KeccakP-400-SnP.h +41 -0
  83. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-400/ref/KeccakP-400-SnP.h +43 -0
  84. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-400/ref/KeccakP-400-reference.c +414 -0
  85. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-400/ref/KeccakP-400-reference.h +23 -0
  86. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/ARM/KeccakP-800-SnP.h +42 -0
  87. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/AVR8/KeccakP-800-SnP.h +42 -0
  88. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/compact/KeccakP-800-SnP.h +40 -0
  89. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/compact/KeccakP-800-compact.c +244 -0
  90. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/plain/KeccakP-800-SnP.h +46 -0
  91. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/plain/KeccakP-800-opt32-bis.macros +184 -0
  92. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/plain/KeccakP-800-opt32.c +454 -0
  93. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/plain/KeccakP-800-opt32.macros +459 -0
  94. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/plain/KeccakP-800-unrolling-bis.macros +83 -0
  95. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/plain/KeccakP-800-unrolling.macros +88 -0
  96. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/plain/lcu2/KeccakP-800-opt32-config.h +7 -0
  97. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/plain/lcua/KeccakP-800-opt32-config.h +7 -0
  98. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/plain/u2/KeccakP-800-opt32-config.h +7 -0
  99. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/plain/ua/KeccakP-800-opt32-config.h +7 -0
  100. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/ref/KeccakP-800-SnP.h +44 -0
  101. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/ref/KeccakP-800-reference.c +437 -0
  102. data/ext/digest/kangarootwelve/XKCP/lib/low/KeccakP-800/ref/KeccakP-800-reference.h +23 -0
  103. data/ext/digest/kangarootwelve/XKCP/lib/low/common/PlSnP-Fallback.inc +290 -0
  104. data/ext/digest/kangarootwelve/XKCP/lib/low/common/SnP-Relaned.h +141 -0
  105. data/ext/digest/kangarootwelve/XKCP/tests/UnitTests/displayIntermediateValues.c +177 -0
  106. data/ext/digest/kangarootwelve/XKCP/tests/UnitTests/displayIntermediateValues.h +30 -0
  107. data/ext/digest/kangarootwelve/ext.c +30 -22
  108. data/ext/digest/kangarootwelve/extconf.rb +7 -11
  109. data/ext/digest/kangarootwelve/targets/armv6/KangarooTwelve.c +1 -0
  110. data/ext/digest/kangarootwelve/targets/armv6/KangarooTwelve.h +1 -0
  111. data/ext/digest/kangarootwelve/targets/armv6/KeccakP-1600-SnP.h +1 -0
  112. data/ext/digest/kangarootwelve/targets/armv6/KeccakP-1600-times2-SnP.h +1 -0
  113. data/ext/digest/kangarootwelve/targets/armv6/KeccakP-1600-times2-on1.c +1 -0
  114. data/ext/digest/kangarootwelve/targets/armv6/KeccakP-1600-times4-SnP.h +1 -0
  115. data/ext/digest/kangarootwelve/targets/armv6/KeccakP-1600-times4-on1.c +1 -0
  116. data/ext/digest/kangarootwelve/targets/armv6/KeccakP-1600-times8-SnP.h +1 -0
  117. data/ext/digest/kangarootwelve/targets/armv6/KeccakP-1600-times8-on1.c +1 -0
  118. data/ext/digest/kangarootwelve/targets/armv6/KeccakP-200-SnP.h +1 -0
  119. data/ext/digest/kangarootwelve/targets/armv6/KeccakP-400-SnP.h +1 -0
  120. data/ext/digest/kangarootwelve/targets/armv6/KeccakP-800-SnP.h +1 -0
  121. data/ext/digest/kangarootwelve/targets/armv6/KeccakSponge.c +1 -0
  122. data/ext/digest/kangarootwelve/targets/armv6/KeccakSponge.h +1 -0
  123. data/ext/digest/kangarootwelve/targets/armv6/KeccakSponge.inc +1 -0
  124. data/ext/digest/kangarootwelve/targets/armv6/Phases.h +1 -0
  125. data/ext/digest/kangarootwelve/targets/armv6/PlSnP-Fallback.inc +1 -0
  126. data/ext/digest/kangarootwelve/targets/armv6/align.h +1 -0
  127. data/ext/digest/kangarootwelve/targets/armv6/brg_endian.h +1 -0
  128. data/ext/digest/kangarootwelve/targets/armv6/config.h +1 -0
  129. data/ext/digest/kangarootwelve/{keccak/armv6m/ext.link.c → targets/armv6/ext.c} +0 -0
  130. data/ext/digest/kangarootwelve/targets/armv6/utils.h +1 -0
  131. data/ext/digest/kangarootwelve/targets/armv6m/KangarooTwelve.c +1 -0
  132. data/ext/digest/kangarootwelve/targets/armv6m/KangarooTwelve.h +1 -0
  133. data/ext/digest/kangarootwelve/targets/armv6m/KeccakP-1600-SnP.h +1 -0
  134. data/ext/digest/kangarootwelve/targets/armv6m/KeccakP-1600-times2-SnP.h +1 -0
  135. data/ext/digest/kangarootwelve/targets/armv6m/KeccakP-1600-times2-on1.c +1 -0
  136. data/ext/digest/kangarootwelve/targets/armv6m/KeccakP-1600-times4-SnP.h +1 -0
  137. data/ext/digest/kangarootwelve/targets/armv6m/KeccakP-1600-times4-on1.c +1 -0
  138. data/ext/digest/kangarootwelve/targets/armv6m/KeccakP-1600-times8-SnP.h +1 -0
  139. data/ext/digest/kangarootwelve/targets/armv6m/KeccakP-1600-times8-on1.c +1 -0
  140. data/ext/digest/kangarootwelve/targets/armv6m/KeccakP-200-SnP.h +1 -0
  141. data/ext/digest/kangarootwelve/targets/armv6m/KeccakP-400-SnP.h +1 -0
  142. data/ext/digest/kangarootwelve/targets/armv6m/KeccakP-800-SnP.h +1 -0
  143. data/ext/digest/kangarootwelve/targets/armv6m/KeccakSponge.c +1 -0
  144. data/ext/digest/kangarootwelve/targets/armv6m/KeccakSponge.h +1 -0
  145. data/ext/digest/kangarootwelve/targets/armv6m/KeccakSponge.inc +1 -0
  146. data/ext/digest/kangarootwelve/targets/armv6m/Phases.h +1 -0
  147. data/ext/digest/kangarootwelve/targets/armv6m/PlSnP-Fallback.inc +1 -0
  148. data/ext/digest/kangarootwelve/targets/armv6m/align.h +1 -0
  149. data/ext/digest/kangarootwelve/targets/armv6m/brg_endian.h +1 -0
  150. data/ext/digest/kangarootwelve/targets/armv6m/config.h +1 -0
  151. data/ext/digest/kangarootwelve/{keccak/armv7a/ext.link.c → targets/armv6m/ext.c} +0 -0
  152. data/ext/digest/kangarootwelve/targets/armv6m/utils.h +1 -0
  153. data/ext/digest/kangarootwelve/targets/armv7a/KangarooTwelve.c +1 -0
  154. data/ext/digest/kangarootwelve/targets/armv7a/KangarooTwelve.h +1 -0
  155. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-1600-SnP.h +1 -0
  156. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-1600-times2-SnP.h +1 -0
  157. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-1600-times4-SnP.h +1 -0
  158. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-1600-times4-on2.c +1 -0
  159. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-1600-times8-SnP.h +1 -0
  160. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-1600-times8-on2.c +1 -0
  161. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-200-SnP.h +1 -0
  162. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-200-reference.c +1 -0
  163. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-200-reference.h +1 -0
  164. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-400-SnP.h +1 -0
  165. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-400-reference.c +1 -0
  166. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-400-reference.h +1 -0
  167. data/ext/digest/kangarootwelve/targets/armv7a/KeccakP-800-SnP.h +1 -0
  168. data/ext/digest/kangarootwelve/targets/armv7a/KeccakSponge.c +1 -0
  169. data/ext/digest/kangarootwelve/targets/armv7a/KeccakSponge.h +1 -0
  170. data/ext/digest/kangarootwelve/targets/armv7a/KeccakSponge.inc +1 -0
  171. data/ext/digest/kangarootwelve/targets/armv7a/Phases.h +1 -0
  172. data/ext/digest/kangarootwelve/targets/armv7a/PlSnP-Fallback.inc +1 -0
  173. data/ext/digest/kangarootwelve/targets/armv7a/align.h +1 -0
  174. data/ext/digest/kangarootwelve/targets/armv7a/brg_endian.h +1 -0
  175. data/ext/digest/kangarootwelve/targets/armv7a/config.h +1 -0
  176. data/ext/digest/kangarootwelve/{keccak/armv7m/ext.link.c → targets/armv7a/ext.c} +0 -0
  177. data/ext/digest/kangarootwelve/targets/armv7a/utils.h +1 -0
  178. data/ext/digest/kangarootwelve/targets/armv7m/KangarooTwelve.c +1 -0
  179. data/ext/digest/kangarootwelve/targets/armv7m/KangarooTwelve.h +1 -0
  180. data/ext/digest/kangarootwelve/targets/armv7m/KeccakP-1600-SnP.h +1 -0
  181. data/ext/digest/kangarootwelve/targets/armv7m/KeccakP-1600-times2-SnP.h +1 -0
  182. data/ext/digest/kangarootwelve/targets/armv7m/KeccakP-1600-times2-on1.c +1 -0
  183. data/ext/digest/kangarootwelve/targets/armv7m/KeccakP-1600-times4-SnP.h +1 -0
  184. data/ext/digest/kangarootwelve/targets/armv7m/KeccakP-1600-times4-on1.c +1 -0
  185. data/ext/digest/kangarootwelve/targets/armv7m/KeccakP-1600-times8-SnP.h +1 -0
  186. data/ext/digest/kangarootwelve/targets/armv7m/KeccakP-1600-times8-on1.c +1 -0
  187. data/ext/digest/kangarootwelve/targets/armv7m/KeccakP-200-SnP.h +1 -0
  188. data/ext/digest/kangarootwelve/targets/armv7m/KeccakP-200-armv7m-le-gcc.s +1 -0
  189. data/ext/digest/kangarootwelve/targets/armv7m/KeccakP-400-SnP.h +1 -0
  190. data/ext/digest/kangarootwelve/targets/armv7m/KeccakP-800-SnP.h +1 -0
  191. data/ext/digest/kangarootwelve/targets/armv7m/KeccakSponge.c +1 -0
  192. data/ext/digest/kangarootwelve/targets/armv7m/KeccakSponge.h +1 -0
  193. data/ext/digest/kangarootwelve/targets/armv7m/KeccakSponge.inc +1 -0
  194. data/ext/digest/kangarootwelve/targets/armv7m/Phases.h +1 -0
  195. data/ext/digest/kangarootwelve/targets/armv7m/PlSnP-Fallback.inc +1 -0
  196. data/ext/digest/kangarootwelve/targets/armv7m/align.h +1 -0
  197. data/ext/digest/kangarootwelve/targets/armv7m/brg_endian.h +1 -0
  198. data/ext/digest/kangarootwelve/targets/armv7m/config.h +1 -0
  199. data/ext/digest/kangarootwelve/{keccak/armv8a/ext.link.c → targets/armv7m/ext.c} +0 -0
  200. data/ext/digest/kangarootwelve/targets/armv7m/utils.h +1 -0
  201. data/ext/digest/kangarootwelve/targets/armv8a/KangarooTwelve.c +1 -0
  202. data/ext/digest/kangarootwelve/targets/armv8a/KangarooTwelve.h +1 -0
  203. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-1600-64.macros +1 -0
  204. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-1600-SnP.h +1 -0
  205. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-1600-opt64-config.h +1 -0
  206. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-1600-opt64.c +1 -0
  207. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-1600-times2-SnP.h +1 -0
  208. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-1600-times2-on1.c +1 -0
  209. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-1600-times4-SnP.h +1 -0
  210. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-1600-times4-on1.c +1 -0
  211. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-1600-times8-SnP.h +1 -0
  212. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-1600-times8-on1.c +1 -0
  213. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-1600-unrolling.macros +1 -0
  214. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-200-SnP.h +1 -0
  215. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-200-reference.c +1 -0
  216. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-200-reference.h +1 -0
  217. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-400-SnP.h +1 -0
  218. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-400-reference.c +1 -0
  219. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-400-reference.h +1 -0
  220. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-800-SnP.h +1 -0
  221. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-800-opt32-bis.macros +1 -0
  222. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-800-opt32-config.h +1 -0
  223. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-800-opt32.c +1 -0
  224. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-800-opt32.macros +1 -0
  225. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-800-unrolling-bis.macros +1 -0
  226. data/ext/digest/kangarootwelve/targets/armv8a/KeccakP-800-unrolling.macros +1 -0
  227. data/ext/digest/kangarootwelve/targets/armv8a/KeccakSponge.c +1 -0
  228. data/ext/digest/kangarootwelve/targets/armv8a/KeccakSponge.h +1 -0
  229. data/ext/digest/kangarootwelve/targets/armv8a/KeccakSponge.inc +1 -0
  230. data/ext/digest/kangarootwelve/targets/armv8a/Phases.h +1 -0
  231. data/ext/digest/kangarootwelve/targets/armv8a/PlSnP-Fallback.inc +1 -0
  232. data/ext/digest/kangarootwelve/targets/armv8a/SnP-Relaned.h +1 -0
  233. data/ext/digest/kangarootwelve/targets/armv8a/align.h +1 -0
  234. data/ext/digest/kangarootwelve/targets/armv8a/brg_endian.h +1 -0
  235. data/ext/digest/kangarootwelve/targets/armv8a/config.h +1 -0
  236. data/ext/digest/kangarootwelve/{keccak/asmx86-64/ext.link.c → targets/armv8a/ext.c} +0 -0
  237. data/ext/digest/kangarootwelve/targets/armv8a/utils.h +1 -0
  238. data/ext/digest/kangarootwelve/targets/avr8/KangarooTwelve.c +1 -0
  239. data/ext/digest/kangarootwelve/targets/avr8/KangarooTwelve.h +1 -0
  240. data/ext/digest/kangarootwelve/targets/avr8/KeccakP-1600-SnP.h +1 -0
  241. data/ext/digest/kangarootwelve/targets/avr8/KeccakP-1600-times2-SnP.h +1 -0
  242. data/ext/digest/kangarootwelve/targets/avr8/KeccakP-1600-times2-on1.c +1 -0
  243. data/ext/digest/kangarootwelve/targets/avr8/KeccakP-1600-times4-SnP.h +1 -0
  244. data/ext/digest/kangarootwelve/targets/avr8/KeccakP-1600-times4-on1.c +1 -0
  245. data/ext/digest/kangarootwelve/targets/avr8/KeccakP-1600-times8-SnP.h +1 -0
  246. data/ext/digest/kangarootwelve/targets/avr8/KeccakP-1600-times8-on1.c +1 -0
  247. data/ext/digest/kangarootwelve/targets/avr8/KeccakP-200-SnP.h +1 -0
  248. data/ext/digest/kangarootwelve/targets/avr8/KeccakP-400-SnP.h +1 -0
  249. data/ext/digest/kangarootwelve/targets/avr8/KeccakP-800-SnP.h +1 -0
  250. data/ext/digest/kangarootwelve/targets/avr8/KeccakSponge.c +1 -0
  251. data/ext/digest/kangarootwelve/targets/avr8/KeccakSponge.h +1 -0
  252. data/ext/digest/kangarootwelve/targets/avr8/KeccakSponge.inc +1 -0
  253. data/ext/digest/kangarootwelve/targets/avr8/Phases.h +1 -0
  254. data/ext/digest/kangarootwelve/targets/avr8/PlSnP-Fallback.inc +1 -0
  255. data/ext/digest/kangarootwelve/targets/avr8/align.h +1 -0
  256. data/ext/digest/kangarootwelve/targets/avr8/brg_endian.h +1 -0
  257. data/ext/digest/kangarootwelve/targets/avr8/config.h +1 -0
  258. data/ext/digest/kangarootwelve/{keccak/asmx86-64shld/ext.link.c → targets/avr8/ext.c} +0 -0
  259. data/ext/digest/kangarootwelve/targets/avr8/utils.h +1 -0
  260. data/ext/digest/kangarootwelve/targets/avx/KangarooTwelve.c +1 -0
  261. data/ext/digest/kangarootwelve/targets/avx/KangarooTwelve.h +1 -0
  262. data/ext/digest/kangarootwelve/targets/avx/KeccakP-1600-64.macros +1 -0
  263. data/ext/digest/kangarootwelve/targets/avx/KeccakP-1600-SnP.h +1 -0
  264. data/ext/digest/kangarootwelve/targets/avx/KeccakP-1600-opt64-config.h +1 -0
  265. data/ext/digest/kangarootwelve/targets/avx/KeccakP-1600-opt64.c +1 -0
  266. data/ext/digest/kangarootwelve/targets/avx/KeccakP-1600-times2-SIMD128.c +1 -0
  267. data/ext/digest/kangarootwelve/targets/avx/KeccakP-1600-times2-SnP.h +1 -0
  268. data/ext/digest/kangarootwelve/targets/avx/KeccakP-1600-times4-SnP.h +1 -0
  269. data/ext/digest/kangarootwelve/targets/avx/KeccakP-1600-times4-on2.c +1 -0
  270. data/ext/digest/kangarootwelve/targets/avx/KeccakP-1600-times8-SnP.h +1 -0
  271. data/ext/digest/kangarootwelve/targets/avx/KeccakP-1600-times8-on2.c +1 -0
  272. data/ext/digest/kangarootwelve/targets/avx/KeccakP-1600-unrolling.macros +1 -0
  273. data/ext/digest/kangarootwelve/targets/avx/KeccakP-200-SnP.h +1 -0
  274. data/ext/digest/kangarootwelve/targets/avx/KeccakP-200-reference.c +1 -0
  275. data/ext/digest/kangarootwelve/targets/avx/KeccakP-200-reference.h +1 -0
  276. data/ext/digest/kangarootwelve/targets/avx/KeccakP-400-SnP.h +1 -0
  277. data/ext/digest/kangarootwelve/targets/avx/KeccakP-400-reference.c +1 -0
  278. data/ext/digest/kangarootwelve/targets/avx/KeccakP-400-reference.h +1 -0
  279. data/ext/digest/kangarootwelve/targets/avx/KeccakP-800-SnP.h +1 -0
  280. data/ext/digest/kangarootwelve/targets/avx/KeccakP-800-opt32-bis.macros +1 -0
  281. data/ext/digest/kangarootwelve/targets/avx/KeccakP-800-opt32-config.h +1 -0
  282. data/ext/digest/kangarootwelve/targets/avx/KeccakP-800-opt32.c +1 -0
  283. data/ext/digest/kangarootwelve/targets/avx/KeccakP-800-opt32.macros +1 -0
  284. data/ext/digest/kangarootwelve/targets/avx/KeccakP-800-unrolling-bis.macros +1 -0
  285. data/ext/digest/kangarootwelve/targets/avx/KeccakP-800-unrolling.macros +1 -0
  286. data/ext/digest/kangarootwelve/targets/avx/KeccakSponge.c +1 -0
  287. data/ext/digest/kangarootwelve/targets/avx/KeccakSponge.h +1 -0
  288. data/ext/digest/kangarootwelve/targets/avx/KeccakSponge.inc +1 -0
  289. data/ext/digest/kangarootwelve/targets/avx/Phases.h +1 -0
  290. data/ext/digest/kangarootwelve/targets/avx/PlSnP-Fallback.inc +1 -0
  291. data/ext/digest/kangarootwelve/targets/avx/SIMD128-config.h +1 -0
  292. data/ext/digest/kangarootwelve/targets/avx/SnP-Relaned.h +1 -0
  293. data/ext/digest/kangarootwelve/targets/avx/align.h +1 -0
  294. data/ext/digest/kangarootwelve/targets/avx/brg_endian.h +1 -0
  295. data/ext/digest/kangarootwelve/targets/avx/config.h +1 -0
  296. data/ext/digest/kangarootwelve/{keccak/avr8/ext.link.c → targets/avx/ext.c} +0 -0
  297. data/ext/digest/kangarootwelve/targets/avx/utils.h +1 -0
  298. data/ext/digest/kangarootwelve/targets/avx2/KangarooTwelve.c +1 -0
  299. data/ext/digest/kangarootwelve/targets/avx2/KangarooTwelve.h +1 -0
  300. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-1600-SnP.h +1 -0
  301. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-1600-times2-SIMD128.c +1 -0
  302. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-1600-times2-SnP.h +1 -0
  303. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-1600-times4-SIMD256.c +1 -0
  304. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-1600-times4-SnP.h +1 -0
  305. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-1600-times8-SnP.h +1 -0
  306. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-1600-times8-on4.c +1 -0
  307. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-1600-unrolling.macros +1 -0
  308. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-200-SnP.h +1 -0
  309. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-200-reference.c +1 -0
  310. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-200-reference.h +1 -0
  311. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-400-SnP.h +1 -0
  312. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-400-reference.c +1 -0
  313. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-400-reference.h +1 -0
  314. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-800-SnP.h +1 -0
  315. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-800-opt32-bis.macros +1 -0
  316. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-800-opt32-config.h +1 -0
  317. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-800-opt32.c +1 -0
  318. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-800-opt32.macros +1 -0
  319. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-800-unrolling-bis.macros +1 -0
  320. data/ext/digest/kangarootwelve/targets/avx2/KeccakP-800-unrolling.macros +1 -0
  321. data/ext/digest/kangarootwelve/targets/avx2/KeccakSponge.c +1 -0
  322. data/ext/digest/kangarootwelve/targets/avx2/KeccakSponge.h +1 -0
  323. data/ext/digest/kangarootwelve/targets/avx2/KeccakSponge.inc +1 -0
  324. data/ext/digest/kangarootwelve/targets/avx2/Phases.h +1 -0
  325. data/ext/digest/kangarootwelve/targets/avx2/PlSnP-Fallback.inc +1 -0
  326. data/ext/digest/kangarootwelve/targets/avx2/SIMD128-config.h +1 -0
  327. data/ext/digest/kangarootwelve/targets/avx2/SIMD256-config.h +1 -0
  328. data/ext/digest/kangarootwelve/targets/avx2/align.h +1 -0
  329. data/ext/digest/kangarootwelve/targets/avx2/brg_endian.h +1 -0
  330. data/ext/digest/kangarootwelve/targets/avx2/config.h +1 -0
  331. data/ext/digest/kangarootwelve/{keccak/bulldozer/ext.link.c → targets/avx2/ext.c} +0 -0
  332. data/ext/digest/kangarootwelve/targets/avx2/utils.h +1 -0
  333. data/ext/digest/kangarootwelve/targets/avx2noasm/KangarooTwelve.c +1 -0
  334. data/ext/digest/kangarootwelve/targets/avx2noasm/KangarooTwelve.h +1 -0
  335. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-1600-64.macros +1 -0
  336. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-1600-SnP.h +1 -0
  337. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-1600-opt64-config.h +1 -0
  338. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-1600-opt64.c +1 -0
  339. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-1600-times2-SIMD128.c +1 -0
  340. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-1600-times2-SnP.h +1 -0
  341. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-1600-times4-SIMD256.c +1 -0
  342. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-1600-times4-SnP.h +1 -0
  343. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-1600-times8-SnP.h +1 -0
  344. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-1600-times8-on4.c +1 -0
  345. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-1600-unrolling.macros +1 -0
  346. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-200-SnP.h +1 -0
  347. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-200-reference.c +1 -0
  348. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-200-reference.h +1 -0
  349. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-400-SnP.h +1 -0
  350. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-400-reference.c +1 -0
  351. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-400-reference.h +1 -0
  352. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-800-SnP.h +1 -0
  353. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-800-opt32-bis.macros +1 -0
  354. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-800-opt32-config.h +1 -0
  355. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-800-opt32.c +1 -0
  356. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-800-opt32.macros +1 -0
  357. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-800-unrolling-bis.macros +1 -0
  358. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakP-800-unrolling.macros +1 -0
  359. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakSponge.c +1 -0
  360. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakSponge.h +1 -0
  361. data/ext/digest/kangarootwelve/targets/avx2noasm/KeccakSponge.inc +1 -0
  362. data/ext/digest/kangarootwelve/targets/avx2noasm/Phases.h +1 -0
  363. data/ext/digest/kangarootwelve/targets/avx2noasm/PlSnP-Fallback.inc +1 -0
  364. data/ext/digest/kangarootwelve/targets/avx2noasm/SIMD128-config.h +1 -0
  365. data/ext/digest/kangarootwelve/targets/avx2noasm/SIMD256-config.h +1 -0
  366. data/ext/digest/kangarootwelve/targets/avx2noasm/SnP-Relaned.h +1 -0
  367. data/ext/digest/kangarootwelve/targets/avx2noasm/align.h +1 -0
  368. data/ext/digest/kangarootwelve/targets/avx2noasm/brg_endian.h +1 -0
  369. data/ext/digest/kangarootwelve/targets/avx2noasm/config.h +1 -0
  370. data/ext/digest/kangarootwelve/{keccak/compact/ext.link.c → targets/avx2noasm/ext.c} +0 -0
  371. data/ext/digest/kangarootwelve/targets/avx2noasm/utils.h +1 -0
  372. data/ext/digest/kangarootwelve/targets/avx512/KangarooTwelve.c +1 -0
  373. data/ext/digest/kangarootwelve/targets/avx512/KangarooTwelve.h +1 -0
  374. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-1600-SnP.h +1 -0
  375. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-1600-times2-SIMD512.c +1 -0
  376. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-1600-times2-SnP.h +1 -0
  377. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-1600-times4-SIMD512.c +1 -0
  378. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-1600-times4-SnP.h +1 -0
  379. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-1600-times8-SIMD512.c +1 -0
  380. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-1600-times8-SnP.h +1 -0
  381. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-200-SnP.h +1 -0
  382. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-200-reference.c +1 -0
  383. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-200-reference.h +1 -0
  384. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-400-SnP.h +1 -0
  385. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-400-reference.c +1 -0
  386. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-400-reference.h +1 -0
  387. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-800-SnP.h +1 -0
  388. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-800-opt32-bis.macros +1 -0
  389. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-800-opt32-config.h +1 -0
  390. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-800-opt32.c +1 -0
  391. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-800-opt32.macros +1 -0
  392. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-800-unrolling-bis.macros +1 -0
  393. data/ext/digest/kangarootwelve/targets/avx512/KeccakP-800-unrolling.macros +1 -0
  394. data/ext/digest/kangarootwelve/targets/avx512/KeccakSponge.c +1 -0
  395. data/ext/digest/kangarootwelve/targets/avx512/KeccakSponge.h +1 -0
  396. data/ext/digest/kangarootwelve/targets/avx512/KeccakSponge.inc +1 -0
  397. data/ext/digest/kangarootwelve/targets/avx512/Phases.h +1 -0
  398. data/ext/digest/kangarootwelve/targets/avx512/SIMD512-2-config.h +1 -0
  399. data/ext/digest/kangarootwelve/targets/avx512/SIMD512-4-config.h +1 -0
  400. data/ext/digest/kangarootwelve/targets/avx512/SIMD512-config.h +1 -0
  401. data/ext/digest/kangarootwelve/targets/avx512/align.h +1 -0
  402. data/ext/digest/kangarootwelve/targets/avx512/brg_endian.h +1 -0
  403. data/ext/digest/kangarootwelve/targets/avx512/config.h +1 -0
  404. data/ext/digest/kangarootwelve/{keccak/generic32/ext.link.c → targets/avx512/ext.c} +0 -0
  405. data/ext/digest/kangarootwelve/targets/avx512/utils.h +1 -0
  406. data/ext/digest/kangarootwelve/targets/avx512noasm/KangarooTwelve.c +1 -0
  407. data/ext/digest/kangarootwelve/targets/avx512noasm/KangarooTwelve.h +1 -0
  408. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-1600-AVX512-config.h +1 -0
  409. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-1600-AVX512.c +1 -0
  410. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-1600-SnP.h +1 -0
  411. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-1600-times2-SIMD512.c +1 -0
  412. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-1600-times2-SnP.h +1 -0
  413. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-1600-times4-SIMD512.c +1 -0
  414. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-1600-times4-SnP.h +1 -0
  415. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-1600-times8-SIMD512.c +1 -0
  416. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-1600-times8-SnP.h +1 -0
  417. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-200-SnP.h +1 -0
  418. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-200-reference.c +1 -0
  419. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-200-reference.h +1 -0
  420. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-400-SnP.h +1 -0
  421. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-400-reference.c +1 -0
  422. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-400-reference.h +1 -0
  423. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-800-SnP.h +1 -0
  424. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-800-opt32-bis.macros +1 -0
  425. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-800-opt32-config.h +1 -0
  426. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-800-opt32.c +1 -0
  427. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-800-opt32.macros +1 -0
  428. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-800-unrolling-bis.macros +1 -0
  429. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakP-800-unrolling.macros +1 -0
  430. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakSponge.c +1 -0
  431. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakSponge.h +1 -0
  432. data/ext/digest/kangarootwelve/targets/avx512noasm/KeccakSponge.inc +1 -0
  433. data/ext/digest/kangarootwelve/targets/avx512noasm/Phases.h +1 -0
  434. data/ext/digest/kangarootwelve/targets/avx512noasm/SIMD512-2-config.h +1 -0
  435. data/ext/digest/kangarootwelve/targets/avx512noasm/SIMD512-4-config.h +1 -0
  436. data/ext/digest/kangarootwelve/targets/avx512noasm/SIMD512-config.h +1 -0
  437. data/ext/digest/kangarootwelve/targets/avx512noasm/align.h +1 -0
  438. data/ext/digest/kangarootwelve/targets/avx512noasm/brg_endian.h +1 -0
  439. data/ext/digest/kangarootwelve/targets/avx512noasm/config.h +1 -0
  440. data/ext/digest/kangarootwelve/{keccak/generic32lc/ext.link.c → targets/avx512noasm/ext.c} +0 -0
  441. data/ext/digest/kangarootwelve/targets/avx512noasm/utils.h +1 -0
  442. data/ext/digest/kangarootwelve/targets/compact/KangarooTwelve.c +1 -0
  443. data/ext/digest/kangarootwelve/targets/compact/KangarooTwelve.h +1 -0
  444. data/ext/digest/kangarootwelve/targets/compact/KeccakP-1600-SnP.h +1 -0
  445. data/ext/digest/kangarootwelve/targets/compact/KeccakP-1600-compact64.c +1 -0
  446. data/ext/digest/kangarootwelve/targets/compact/KeccakP-1600-times2-SnP.h +1 -0
  447. data/ext/digest/kangarootwelve/targets/compact/KeccakP-1600-times2-on1.c +1 -0
  448. data/ext/digest/kangarootwelve/targets/compact/KeccakP-1600-times4-SnP.h +1 -0
  449. data/ext/digest/kangarootwelve/targets/compact/KeccakP-1600-times4-on1.c +1 -0
  450. data/ext/digest/kangarootwelve/targets/compact/KeccakP-1600-times8-SnP.h +1 -0
  451. data/ext/digest/kangarootwelve/targets/compact/KeccakP-1600-times8-on1.c +1 -0
  452. data/ext/digest/kangarootwelve/targets/compact/KeccakP-200-SnP.h +1 -0
  453. data/ext/digest/kangarootwelve/targets/compact/KeccakP-200-compact.c +1 -0
  454. data/ext/digest/kangarootwelve/targets/compact/KeccakP-400-SnP.h +1 -0
  455. data/ext/digest/kangarootwelve/targets/compact/KeccakP-400-reference.c +1 -0
  456. data/ext/digest/kangarootwelve/targets/compact/KeccakP-400-reference.h +1 -0
  457. data/ext/digest/kangarootwelve/targets/compact/KeccakP-800-SnP.h +1 -0
  458. data/ext/digest/kangarootwelve/targets/compact/KeccakP-800-compact.c +1 -0
  459. data/ext/digest/kangarootwelve/targets/compact/KeccakSponge.c +1 -0
  460. data/ext/digest/kangarootwelve/targets/compact/KeccakSponge.h +1 -0
  461. data/ext/digest/kangarootwelve/targets/compact/KeccakSponge.inc +1 -0
  462. data/ext/digest/kangarootwelve/targets/compact/Phases.h +1 -0
  463. data/ext/digest/kangarootwelve/targets/compact/PlSnP-Fallback.inc +1 -0
  464. data/ext/digest/kangarootwelve/targets/compact/SnP-Relaned.h +1 -0
  465. data/ext/digest/kangarootwelve/targets/compact/align.h +1 -0
  466. data/ext/digest/kangarootwelve/targets/compact/brg_endian.h +1 -0
  467. data/ext/digest/kangarootwelve/targets/compact/config.h +1 -0
  468. data/ext/digest/kangarootwelve/{keccak/generic64/ext.link.c → targets/compact/ext.c} +0 -0
  469. data/ext/digest/kangarootwelve/targets/compact/utils.h +1 -0
  470. data/ext/digest/kangarootwelve/targets/config.h +9 -0
  471. data/ext/digest/kangarootwelve/targets/defs +2 -0
  472. data/ext/digest/kangarootwelve/targets/generic32/KangarooTwelve.c +1 -0
  473. data/ext/digest/kangarootwelve/targets/generic32/KangarooTwelve.h +1 -0
  474. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-1600-SnP.h +1 -0
  475. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-1600-inplace32BI.c +1 -0
  476. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-1600-times2-SnP.h +1 -0
  477. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-1600-times2-on1.c +1 -0
  478. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-1600-times4-SnP.h +1 -0
  479. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-1600-times4-on1.c +1 -0
  480. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-1600-times8-SnP.h +1 -0
  481. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-1600-times8-on1.c +1 -0
  482. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-200-SnP.h +1 -0
  483. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-200-reference.c +1 -0
  484. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-200-reference.h +1 -0
  485. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-400-SnP.h +1 -0
  486. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-400-reference.c +1 -0
  487. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-400-reference.h +1 -0
  488. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-800-SnP.h +1 -0
  489. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-800-opt32-bis.macros +1 -0
  490. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-800-opt32-config.h +1 -0
  491. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-800-opt32.c +1 -0
  492. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-800-opt32.macros +1 -0
  493. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-800-unrolling-bis.macros +1 -0
  494. data/ext/digest/kangarootwelve/targets/generic32/KeccakP-800-unrolling.macros +1 -0
  495. data/ext/digest/kangarootwelve/targets/generic32/KeccakSponge.c +1 -0
  496. data/ext/digest/kangarootwelve/targets/generic32/KeccakSponge.h +1 -0
  497. data/ext/digest/kangarootwelve/targets/generic32/KeccakSponge.inc +1 -0
  498. data/ext/digest/kangarootwelve/targets/generic32/Phases.h +1 -0
  499. data/ext/digest/kangarootwelve/targets/generic32/PlSnP-Fallback.inc +1 -0
  500. data/ext/digest/kangarootwelve/targets/generic32/SnP-Relaned.h +1 -0
  501. data/ext/digest/kangarootwelve/targets/generic32/align.h +1 -0
  502. data/ext/digest/kangarootwelve/targets/generic32/brg_endian.h +1 -0
  503. data/ext/digest/kangarootwelve/targets/generic32/config.h +1 -0
  504. data/ext/digest/kangarootwelve/{keccak/generic64lc/ext.link.c → targets/generic32/ext.c} +0 -0
  505. data/ext/digest/kangarootwelve/targets/generic32/utils.h +1 -0
  506. data/ext/digest/kangarootwelve/targets/generic32lc/KangarooTwelve.c +1 -0
  507. data/ext/digest/kangarootwelve/targets/generic32lc/KangarooTwelve.h +1 -0
  508. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-1600-SnP.h +1 -0
  509. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-1600-inplace32BI.c +1 -0
  510. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-1600-times2-SnP.h +1 -0
  511. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-1600-times2-on1.c +1 -0
  512. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-1600-times4-SnP.h +1 -0
  513. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-1600-times4-on1.c +1 -0
  514. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-1600-times8-SnP.h +1 -0
  515. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-1600-times8-on1.c +1 -0
  516. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-200-SnP.h +1 -0
  517. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-200-reference.c +1 -0
  518. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-200-reference.h +1 -0
  519. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-400-SnP.h +1 -0
  520. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-400-reference.c +1 -0
  521. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-400-reference.h +1 -0
  522. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-800-SnP.h +1 -0
  523. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-800-opt32-bis.macros +1 -0
  524. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-800-opt32-config.h +1 -0
  525. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-800-opt32.c +1 -0
  526. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-800-opt32.macros +1 -0
  527. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-800-unrolling-bis.macros +1 -0
  528. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakP-800-unrolling.macros +1 -0
  529. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakSponge.c +1 -0
  530. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakSponge.h +1 -0
  531. data/ext/digest/kangarootwelve/targets/generic32lc/KeccakSponge.inc +1 -0
  532. data/ext/digest/kangarootwelve/targets/generic32lc/Phases.h +1 -0
  533. data/ext/digest/kangarootwelve/targets/generic32lc/PlSnP-Fallback.inc +1 -0
  534. data/ext/digest/kangarootwelve/targets/generic32lc/SnP-Relaned.h +1 -0
  535. data/ext/digest/kangarootwelve/targets/generic32lc/align.h +1 -0
  536. data/ext/digest/kangarootwelve/targets/generic32lc/brg_endian.h +1 -0
  537. data/ext/digest/kangarootwelve/targets/generic32lc/config.h +1 -0
  538. data/ext/digest/kangarootwelve/{keccak/haswell/ext.link.c → targets/generic32lc/ext.c} +0 -0
  539. data/ext/digest/kangarootwelve/targets/generic32lc/utils.h +1 -0
  540. data/ext/digest/kangarootwelve/targets/generic64/KangarooTwelve.c +1 -0
  541. data/ext/digest/kangarootwelve/targets/generic64/KangarooTwelve.h +1 -0
  542. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-1600-64.macros +1 -0
  543. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-1600-SnP.h +1 -0
  544. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-1600-opt64-config.h +1 -0
  545. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-1600-opt64.c +1 -0
  546. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-1600-times2-SnP.h +1 -0
  547. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-1600-times2-on1.c +1 -0
  548. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-1600-times4-SnP.h +1 -0
  549. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-1600-times4-on1.c +1 -0
  550. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-1600-times8-SnP.h +1 -0
  551. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-1600-times8-on1.c +1 -0
  552. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-1600-unrolling.macros +1 -0
  553. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-200-SnP.h +1 -0
  554. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-200-reference.c +1 -0
  555. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-200-reference.h +1 -0
  556. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-400-SnP.h +1 -0
  557. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-400-reference.c +1 -0
  558. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-400-reference.h +1 -0
  559. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-800-SnP.h +1 -0
  560. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-800-opt32-bis.macros +1 -0
  561. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-800-opt32-config.h +1 -0
  562. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-800-opt32.c +1 -0
  563. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-800-opt32.macros +1 -0
  564. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-800-unrolling-bis.macros +1 -0
  565. data/ext/digest/kangarootwelve/targets/generic64/KeccakP-800-unrolling.macros +1 -0
  566. data/ext/digest/kangarootwelve/targets/generic64/KeccakSponge.c +1 -0
  567. data/ext/digest/kangarootwelve/targets/generic64/KeccakSponge.h +1 -0
  568. data/ext/digest/kangarootwelve/targets/generic64/KeccakSponge.inc +1 -0
  569. data/ext/digest/kangarootwelve/targets/generic64/Phases.h +1 -0
  570. data/ext/digest/kangarootwelve/targets/generic64/PlSnP-Fallback.inc +1 -0
  571. data/ext/digest/kangarootwelve/targets/generic64/SnP-Relaned.h +1 -0
  572. data/ext/digest/kangarootwelve/targets/generic64/align.h +1 -0
  573. data/ext/digest/kangarootwelve/targets/generic64/brg_endian.h +1 -0
  574. data/ext/digest/kangarootwelve/targets/generic64/config.h +1 -0
  575. data/ext/digest/kangarootwelve/{keccak/nehalem/ext.link.c → targets/generic64/ext.c} +0 -0
  576. data/ext/digest/kangarootwelve/targets/generic64/utils.h +1 -0
  577. data/ext/digest/kangarootwelve/targets/generic64lc/KangarooTwelve.c +1 -0
  578. data/ext/digest/kangarootwelve/targets/generic64lc/KangarooTwelve.h +1 -0
  579. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-1600-64.macros +1 -0
  580. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-1600-SnP.h +1 -0
  581. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-1600-opt64-config.h +1 -0
  582. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-1600-opt64.c +1 -0
  583. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-1600-times2-SnP.h +1 -0
  584. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-1600-times2-on1.c +1 -0
  585. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-1600-times4-SnP.h +1 -0
  586. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-1600-times4-on1.c +1 -0
  587. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-1600-times8-SnP.h +1 -0
  588. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-1600-times8-on1.c +1 -0
  589. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-1600-unrolling.macros +1 -0
  590. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-200-SnP.h +1 -0
  591. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-200-reference.c +1 -0
  592. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-200-reference.h +1 -0
  593. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-400-SnP.h +1 -0
  594. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-400-reference.c +1 -0
  595. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-400-reference.h +1 -0
  596. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-800-SnP.h +1 -0
  597. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-800-opt32-bis.macros +1 -0
  598. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-800-opt32-config.h +1 -0
  599. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-800-opt32.c +1 -0
  600. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-800-opt32.macros +1 -0
  601. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-800-unrolling-bis.macros +1 -0
  602. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakP-800-unrolling.macros +1 -0
  603. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakSponge.c +1 -0
  604. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakSponge.h +1 -0
  605. data/ext/digest/kangarootwelve/targets/generic64lc/KeccakSponge.inc +1 -0
  606. data/ext/digest/kangarootwelve/targets/generic64lc/Phases.h +1 -0
  607. data/ext/digest/kangarootwelve/targets/generic64lc/PlSnP-Fallback.inc +1 -0
  608. data/ext/digest/kangarootwelve/targets/generic64lc/SnP-Relaned.h +1 -0
  609. data/ext/digest/kangarootwelve/targets/generic64lc/align.h +1 -0
  610. data/ext/digest/kangarootwelve/targets/generic64lc/brg_endian.h +1 -0
  611. data/ext/digest/kangarootwelve/targets/generic64lc/config.h +1 -0
  612. data/ext/digest/kangarootwelve/{keccak/reference/ext.link.c → targets/generic64lc/ext.c} +0 -0
  613. data/ext/digest/kangarootwelve/targets/generic64lc/utils.h +1 -0
  614. data/ext/digest/kangarootwelve/targets/list +20 -0
  615. data/ext/digest/kangarootwelve/targets/reference/KangarooTwelve.c +1 -0
  616. data/ext/digest/kangarootwelve/targets/reference/KangarooTwelve.h +1 -0
  617. data/ext/digest/kangarootwelve/targets/reference/KeccakP-1600-SnP.h +1 -0
  618. data/ext/digest/kangarootwelve/targets/reference/KeccakP-1600-reference.c +1 -0
  619. data/ext/digest/kangarootwelve/targets/reference/KeccakP-1600-reference.h +1 -0
  620. data/ext/digest/kangarootwelve/targets/reference/KeccakP-1600-times2-SnP.h +1 -0
  621. data/ext/digest/kangarootwelve/targets/reference/KeccakP-1600-times2-on1.c +1 -0
  622. data/ext/digest/kangarootwelve/targets/reference/KeccakP-1600-times4-SnP.h +1 -0
  623. data/ext/digest/kangarootwelve/targets/reference/KeccakP-1600-times4-on1.c +1 -0
  624. data/ext/digest/kangarootwelve/targets/reference/KeccakP-1600-times8-SnP.h +1 -0
  625. data/ext/digest/kangarootwelve/targets/reference/KeccakP-1600-times8-on1.c +1 -0
  626. data/ext/digest/kangarootwelve/targets/reference/KeccakP-200-SnP.h +1 -0
  627. data/ext/digest/kangarootwelve/targets/reference/KeccakP-200-reference.c +1 -0
  628. data/ext/digest/kangarootwelve/targets/reference/KeccakP-200-reference.h +1 -0
  629. data/ext/digest/kangarootwelve/targets/reference/KeccakP-400-SnP.h +1 -0
  630. data/ext/digest/kangarootwelve/targets/reference/KeccakP-400-reference.c +1 -0
  631. data/ext/digest/kangarootwelve/targets/reference/KeccakP-400-reference.h +1 -0
  632. data/ext/digest/kangarootwelve/targets/reference/KeccakP-800-SnP.h +1 -0
  633. data/ext/digest/kangarootwelve/targets/reference/KeccakP-800-reference.c +1 -0
  634. data/ext/digest/kangarootwelve/targets/reference/KeccakP-800-reference.h +1 -0
  635. data/ext/digest/kangarootwelve/targets/reference/KeccakSponge.c +1 -0
  636. data/ext/digest/kangarootwelve/targets/reference/KeccakSponge.h +1 -0
  637. data/ext/digest/kangarootwelve/targets/reference/KeccakSponge.inc +1 -0
  638. data/ext/digest/kangarootwelve/targets/reference/Phases.h +1 -0
  639. data/ext/digest/kangarootwelve/targets/reference/PlSnP-Fallback.inc +1 -0
  640. data/ext/digest/kangarootwelve/targets/reference/align.h +1 -0
  641. data/ext/digest/kangarootwelve/targets/reference/brg_endian.h +1 -0
  642. data/ext/digest/kangarootwelve/targets/reference/config.h +1 -0
  643. data/ext/digest/kangarootwelve/targets/reference/displayIntermediateValues.c +1 -0
  644. data/ext/digest/kangarootwelve/targets/reference/displayIntermediateValues.h +1 -0
  645. data/ext/digest/kangarootwelve/{keccak/reference32bits/ext.link.c → targets/reference/ext.c} +0 -0
  646. data/ext/digest/kangarootwelve/targets/reference/utils.h +1 -0
  647. data/ext/digest/kangarootwelve/targets/reference32bits/KangarooTwelve.c +1 -0
  648. data/ext/digest/kangarootwelve/targets/reference32bits/KangarooTwelve.h +1 -0
  649. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-1600-SnP.h +1 -0
  650. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-1600-reference.h +1 -0
  651. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-1600-reference32BI.c +1 -0
  652. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-1600-times2-SnP.h +1 -0
  653. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-1600-times2-on1.c +1 -0
  654. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-1600-times4-SnP.h +1 -0
  655. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-1600-times4-on1.c +1 -0
  656. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-1600-times8-SnP.h +1 -0
  657. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-1600-times8-on1.c +1 -0
  658. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-200-SnP.h +1 -0
  659. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-200-reference.c +1 -0
  660. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-200-reference.h +1 -0
  661. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-400-SnP.h +1 -0
  662. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-400-reference.c +1 -0
  663. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-400-reference.h +1 -0
  664. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-800-SnP.h +1 -0
  665. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-800-reference.c +1 -0
  666. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakP-800-reference.h +1 -0
  667. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakSponge.c +1 -0
  668. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakSponge.h +1 -0
  669. data/ext/digest/kangarootwelve/targets/reference32bits/KeccakSponge.inc +1 -0
  670. data/ext/digest/kangarootwelve/targets/reference32bits/Phases.h +1 -0
  671. data/ext/digest/kangarootwelve/targets/reference32bits/PlSnP-Fallback.inc +1 -0
  672. data/ext/digest/kangarootwelve/targets/reference32bits/align.h +1 -0
  673. data/ext/digest/kangarootwelve/targets/reference32bits/brg_endian.h +1 -0
  674. data/ext/digest/kangarootwelve/targets/reference32bits/config.h +1 -0
  675. data/ext/digest/kangarootwelve/targets/reference32bits/displayIntermediateValues.c +1 -0
  676. data/ext/digest/kangarootwelve/targets/reference32bits/displayIntermediateValues.h +1 -0
  677. data/ext/digest/kangarootwelve/{keccak/sandybridge/ext.link.c → targets/reference32bits/ext.c} +0 -0
  678. data/ext/digest/kangarootwelve/targets/reference32bits/utils.h +1 -0
  679. data/ext/digest/kangarootwelve/targets/ssse3/KangarooTwelve.c +1 -0
  680. data/ext/digest/kangarootwelve/targets/ssse3/KangarooTwelve.h +1 -0
  681. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-1600-64.macros +1 -0
  682. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-1600-SnP.h +1 -0
  683. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-1600-opt64-config.h +1 -0
  684. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-1600-opt64.c +1 -0
  685. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-1600-times2-SIMD128.c +1 -0
  686. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-1600-times2-SnP.h +1 -0
  687. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-1600-times4-SnP.h +1 -0
  688. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-1600-times4-on2.c +1 -0
  689. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-1600-times8-SnP.h +1 -0
  690. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-1600-times8-on2.c +1 -0
  691. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-1600-unrolling.macros +1 -0
  692. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-200-SnP.h +1 -0
  693. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-200-reference.c +1 -0
  694. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-200-reference.h +1 -0
  695. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-400-SnP.h +1 -0
  696. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-400-reference.c +1 -0
  697. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-400-reference.h +1 -0
  698. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-800-SnP.h +1 -0
  699. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-800-opt32-bis.macros +1 -0
  700. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-800-opt32-config.h +1 -0
  701. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-800-opt32.c +1 -0
  702. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-800-opt32.macros +1 -0
  703. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-800-unrolling-bis.macros +1 -0
  704. data/ext/digest/kangarootwelve/targets/ssse3/KeccakP-800-unrolling.macros +1 -0
  705. data/ext/digest/kangarootwelve/targets/ssse3/KeccakSponge.c +1 -0
  706. data/ext/digest/kangarootwelve/targets/ssse3/KeccakSponge.h +1 -0
  707. data/ext/digest/kangarootwelve/targets/ssse3/KeccakSponge.inc +1 -0
  708. data/ext/digest/kangarootwelve/targets/ssse3/Phases.h +1 -0
  709. data/ext/digest/kangarootwelve/targets/ssse3/PlSnP-Fallback.inc +1 -0
  710. data/ext/digest/kangarootwelve/targets/ssse3/SIMD128-config.h +1 -0
  711. data/ext/digest/kangarootwelve/targets/ssse3/SnP-Relaned.h +1 -0
  712. data/ext/digest/kangarootwelve/targets/ssse3/align.h +1 -0
  713. data/ext/digest/kangarootwelve/targets/ssse3/brg_endian.h +1 -0
  714. data/ext/digest/kangarootwelve/targets/ssse3/config.h +1 -0
  715. data/ext/digest/kangarootwelve/{keccak/skylakex/ext.link.c → targets/ssse3/ext.c} +0 -0
  716. data/ext/digest/kangarootwelve/targets/ssse3/utils.h +1 -0
  717. data/ext/digest/kangarootwelve/targets/xop/KangarooTwelve.c +1 -0
  718. data/ext/digest/kangarootwelve/targets/xop/KangarooTwelve.h +1 -0
  719. data/ext/digest/kangarootwelve/targets/xop/KeccakP-1600-SnP.h +1 -0
  720. data/ext/digest/kangarootwelve/targets/xop/KeccakP-1600-XOP-config.h +1 -0
  721. data/ext/digest/kangarootwelve/targets/xop/KeccakP-1600-XOP.c +1 -0
  722. data/ext/digest/kangarootwelve/targets/xop/KeccakP-1600-times2-SIMD128.c +1 -0
  723. data/ext/digest/kangarootwelve/targets/xop/KeccakP-1600-times2-SnP.h +1 -0
  724. data/ext/digest/kangarootwelve/targets/xop/KeccakP-1600-times4-SnP.h +1 -0
  725. data/ext/digest/kangarootwelve/targets/xop/KeccakP-1600-times4-on2.c +1 -0
  726. data/ext/digest/kangarootwelve/targets/xop/KeccakP-1600-times8-SnP.h +1 -0
  727. data/ext/digest/kangarootwelve/targets/xop/KeccakP-1600-times8-on2.c +1 -0
  728. data/ext/digest/kangarootwelve/targets/xop/KeccakP-1600-unrolling.macros +1 -0
  729. data/ext/digest/kangarootwelve/targets/xop/KeccakP-200-SnP.h +1 -0
  730. data/ext/digest/kangarootwelve/targets/xop/KeccakP-200-reference.c +1 -0
  731. data/ext/digest/kangarootwelve/targets/xop/KeccakP-200-reference.h +1 -0
  732. data/ext/digest/kangarootwelve/targets/xop/KeccakP-400-SnP.h +1 -0
  733. data/ext/digest/kangarootwelve/targets/xop/KeccakP-400-reference.c +1 -0
  734. data/ext/digest/kangarootwelve/targets/xop/KeccakP-400-reference.h +1 -0
  735. data/ext/digest/kangarootwelve/targets/xop/KeccakP-800-SnP.h +1 -0
  736. data/ext/digest/kangarootwelve/targets/xop/KeccakP-800-opt32-bis.macros +1 -0
  737. data/ext/digest/kangarootwelve/targets/xop/KeccakP-800-opt32-config.h +1 -0
  738. data/ext/digest/kangarootwelve/targets/xop/KeccakP-800-opt32.c +1 -0
  739. data/ext/digest/kangarootwelve/targets/xop/KeccakP-800-opt32.macros +1 -0
  740. data/ext/digest/kangarootwelve/targets/xop/KeccakP-800-unrolling-bis.macros +1 -0
  741. data/ext/digest/kangarootwelve/targets/xop/KeccakP-800-unrolling.macros +1 -0
  742. data/ext/digest/kangarootwelve/targets/xop/KeccakSponge.c +1 -0
  743. data/ext/digest/kangarootwelve/targets/xop/KeccakSponge.h +1 -0
  744. data/ext/digest/kangarootwelve/targets/xop/KeccakSponge.inc +1 -0
  745. data/ext/digest/kangarootwelve/targets/xop/Phases.h +1 -0
  746. data/ext/digest/kangarootwelve/targets/xop/PlSnP-Fallback.inc +1 -0
  747. data/ext/digest/kangarootwelve/targets/xop/SIMD128-config.h +1 -0
  748. data/ext/digest/kangarootwelve/targets/xop/SnP-Relaned.h +1 -0
  749. data/ext/digest/kangarootwelve/targets/xop/align.h +1 -0
  750. data/ext/digest/kangarootwelve/targets/xop/brg_endian.h +1 -0
  751. data/ext/digest/kangarootwelve/targets/xop/config.h +1 -0
  752. data/ext/digest/kangarootwelve/targets/xop/ext.c +1 -0
  753. data/ext/digest/kangarootwelve/targets/xop/utils.h +1 -0
  754. data/lib/digest/kangarootwelve/version.rb +1 -1
  755. data/rakelib/alt-install-task.rake +59 -0
  756. data/test/test.rb +5 -3
  757. metadata +778 -300
  758. data/ext/digest/kangarootwelve/keccak/armv6m/KangarooTwelve.link.c +0 -1
  759. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakDuplexWidth1600.link.c +0 -1
  760. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakP-1600-SnP.h +0 -36
  761. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakP-1600-times2-SnP.h +0 -45
  762. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakP-1600-times2-on1.c +0 -37
  763. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakP-1600-times4-SnP.h +0 -45
  764. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakP-1600-times4-on1.c +0 -37
  765. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakP-1600-times8-SnP.h +0 -45
  766. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakP-1600-times8-on1.c +0 -37
  767. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakP-1600-u2-32bi-armv6m-le-gcc.s +0 -1334
  768. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakSpongeWidth1600.link.c +0 -1
  769. data/ext/digest/kangarootwelve/keccak/armv6m/PlSnP-Fallback.inc +0 -287
  770. data/ext/digest/kangarootwelve/keccak/armv7a/KangarooTwelve.link.c +0 -1
  771. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakDuplexWidth1600.link.c +0 -1
  772. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-SnP.h +0 -37
  773. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-armv7a-le-neon-gcc.s +0 -826
  774. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-inplace-pl2-armv7a-neon-le-gcc.s +0 -1245
  775. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-times2-SnP.h +0 -38
  776. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-times4-SnP.h +0 -45
  777. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-times4-on2.c +0 -38
  778. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-times8-SnP.h +0 -45
  779. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-times8-on2.c +0 -38
  780. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakSpongeWidth1600.link.c +0 -1
  781. data/ext/digest/kangarootwelve/keccak/armv7a/PlSnP-Fallback.inc +0 -287
  782. data/ext/digest/kangarootwelve/keccak/armv7m/KangarooTwelve.link.c +0 -1
  783. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakDuplexWidth1600.link.c +0 -1
  784. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-SnP.h +0 -36
  785. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-inplace-32bi-armv7m-le-gcc.s +0 -1170
  786. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times2-SnP.h +0 -45
  787. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times2-on1.c +0 -37
  788. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times4-SnP.h +0 -45
  789. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times4-on1.c +0 -37
  790. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times8-SnP.h +0 -45
  791. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times8-on1.c +0 -37
  792. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakSpongeWidth1600.link.c +0 -1
  793. data/ext/digest/kangarootwelve/keccak/armv7m/PlSnP-Fallback.inc +0 -287
  794. data/ext/digest/kangarootwelve/keccak/armv8a/KangarooTwelve.link.c +0 -1
  795. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakDuplexWidth1600.link.c +0 -1
  796. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-SnP.h +0 -28
  797. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-armv8a-neon.s +0 -537
  798. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times2-SnP.h +0 -45
  799. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times2-on1.c +0 -37
  800. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times4-SnP.h +0 -45
  801. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times4-on1.c +0 -37
  802. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times8-SnP.h +0 -45
  803. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times8-on1.c +0 -37
  804. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakSpongeWidth1600.link.c +0 -1
  805. data/ext/digest/kangarootwelve/keccak/armv8a/PlSnP-Fallback.inc +0 -287
  806. data/ext/digest/kangarootwelve/keccak/asmx86-64/KangarooTwelve.link.c +0 -1
  807. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakDuplexWidth1600.link.c +0 -1
  808. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-SnP.h +0 -37
  809. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times2-SnP.h +0 -45
  810. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times2-on1.c +0 -37
  811. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times4-SnP.h +0 -45
  812. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times4-on1.c +0 -37
  813. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times8-SnP.h +0 -45
  814. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times8-on1.c +0 -37
  815. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-x86-64-gas.s +0 -1190
  816. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakSpongeWidth1600.link.c +0 -1
  817. data/ext/digest/kangarootwelve/keccak/asmx86-64/PlSnP-Fallback.inc +0 -287
  818. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KangarooTwelve.link.c +0 -1
  819. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakDuplexWidth1600.link.c +0 -1
  820. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-SnP.h +0 -37
  821. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times2-SnP.h +0 -45
  822. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times2-on1.c +0 -37
  823. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times4-SnP.h +0 -45
  824. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times4-on1.c +0 -37
  825. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times8-SnP.h +0 -45
  826. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times8-on1.c +0 -37
  827. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-x86-64-shld-gas.s +0 -1190
  828. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakSpongeWidth1600.link.c +0 -1
  829. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/PlSnP-Fallback.inc +0 -287
  830. data/ext/digest/kangarootwelve/keccak/avr8/KangarooTwelve.link.c +0 -1
  831. data/ext/digest/kangarootwelve/keccak/avr8/KeccakDuplexWidth1600.link.c +0 -1
  832. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-SnP.h +0 -37
  833. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-avr8-fast.s +0 -1116
  834. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times2-SnP.h +0 -45
  835. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times2-on1.c +0 -37
  836. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times4-SnP.h +0 -45
  837. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times4-on1.c +0 -37
  838. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times8-SnP.h +0 -45
  839. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times8-on1.c +0 -37
  840. data/ext/digest/kangarootwelve/keccak/avr8/KeccakSpongeWidth1600.link.c +0 -1
  841. data/ext/digest/kangarootwelve/keccak/avr8/PlSnP-Fallback.inc +0 -287
  842. data/ext/digest/kangarootwelve/keccak/bulldozer/KangarooTwelve.link.c +0 -1
  843. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakDuplexWidth1600.link.c +0 -1
  844. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-SnP.h +0 -39
  845. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-XOP.c +0 -473
  846. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times2-SIMD128.c +0 -954
  847. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times2-SnP.h +0 -47
  848. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times4-SnP.h +0 -45
  849. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times4-on2.c +0 -38
  850. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times8-SnP.h +0 -45
  851. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times8-on2.c +0 -38
  852. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-unrolling.macros +0 -302
  853. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakSpongeWidth1600.link.c +0 -1
  854. data/ext/digest/kangarootwelve/keccak/bulldozer/PlSnP-Fallback.inc +0 -287
  855. data/ext/digest/kangarootwelve/keccak/bulldozer/SnP-Relaned.h +0 -140
  856. data/ext/digest/kangarootwelve/keccak/common/KangarooTwelve.c +0 -271
  857. data/ext/digest/kangarootwelve/keccak/common/KangarooTwelve.h +0 -89
  858. data/ext/digest/kangarootwelve/keccak/common/KeccakDuplex-common.h +0 -37
  859. data/ext/digest/kangarootwelve/keccak/common/KeccakDuplex.inc +0 -192
  860. data/ext/digest/kangarootwelve/keccak/common/KeccakDuplexWidth1600.c +0 -34
  861. data/ext/digest/kangarootwelve/keccak/common/KeccakDuplexWidth1600.h +0 -25
  862. data/ext/digest/kangarootwelve/keccak/common/KeccakSponge-common.h +0 -35
  863. data/ext/digest/kangarootwelve/keccak/common/KeccakSponge.inc +0 -311
  864. data/ext/digest/kangarootwelve/keccak/common/KeccakSpongeWidth1600.c +0 -54
  865. data/ext/digest/kangarootwelve/keccak/common/KeccakSpongeWidth1600.h +0 -31
  866. data/ext/digest/kangarootwelve/keccak/common/Phases.h +0 -22
  867. data/ext/digest/kangarootwelve/keccak/common/align.h +0 -32
  868. data/ext/digest/kangarootwelve/keccak/common/brg_endian.h +0 -142
  869. data/ext/digest/kangarootwelve/keccak/compact/KangarooTwelve.link.c +0 -1
  870. data/ext/digest/kangarootwelve/keccak/compact/KeccakDuplexWidth1600.link.c +0 -1
  871. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-SnP.h +0 -35
  872. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-compact64.c +0 -416
  873. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times2-SnP.h +0 -45
  874. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times2-on1.c +0 -37
  875. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times4-SnP.h +0 -45
  876. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times4-on1.c +0 -37
  877. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times8-SnP.h +0 -45
  878. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times8-on1.c +0 -37
  879. data/ext/digest/kangarootwelve/keccak/compact/KeccakSpongeWidth1600.link.c +0 -1
  880. data/ext/digest/kangarootwelve/keccak/compact/PlSnP-Fallback.inc +0 -287
  881. data/ext/digest/kangarootwelve/keccak/compact/SnP-Relaned.h +0 -140
  882. data/ext/digest/kangarootwelve/keccak/generic32/KangarooTwelve.link.c +0 -1
  883. data/ext/digest/kangarootwelve/keccak/generic32/KeccakDuplexWidth1600.link.c +0 -1
  884. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-SnP.h +0 -38
  885. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-inplace32BI.c +0 -1162
  886. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times2-SnP.h +0 -45
  887. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times2-on1.c +0 -37
  888. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times4-SnP.h +0 -45
  889. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times4-on1.c +0 -37
  890. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times8-SnP.h +0 -45
  891. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times8-on1.c +0 -37
  892. data/ext/digest/kangarootwelve/keccak/generic32/KeccakSpongeWidth1600.link.c +0 -1
  893. data/ext/digest/kangarootwelve/keccak/generic32/PlSnP-Fallback.inc +0 -287
  894. data/ext/digest/kangarootwelve/keccak/generic32/SnP-Relaned.h +0 -140
  895. data/ext/digest/kangarootwelve/keccak/generic32lc/KangarooTwelve.link.c +0 -1
  896. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakDuplexWidth1600.link.c +0 -1
  897. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-SnP.h +0 -38
  898. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-inplace32BI.c +0 -1162
  899. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times2-SnP.h +0 -45
  900. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times2-on1.c +0 -37
  901. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times4-SnP.h +0 -45
  902. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times4-on1.c +0 -37
  903. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times8-SnP.h +0 -45
  904. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times8-on1.c +0 -37
  905. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakSpongeWidth1600.link.c +0 -1
  906. data/ext/digest/kangarootwelve/keccak/generic32lc/PlSnP-Fallback.inc +0 -287
  907. data/ext/digest/kangarootwelve/keccak/generic32lc/SnP-Relaned.h +0 -140
  908. data/ext/digest/kangarootwelve/keccak/generic64/KangarooTwelve.link.c +0 -1
  909. data/ext/digest/kangarootwelve/keccak/generic64/KeccakDuplexWidth1600.link.c +0 -1
  910. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-64.macros +0 -2195
  911. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-SnP.h +0 -49
  912. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-opt64.c +0 -541
  913. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times2-SnP.h +0 -45
  914. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times2-on1.c +0 -37
  915. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times4-SnP.h +0 -45
  916. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times4-on1.c +0 -37
  917. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times8-SnP.h +0 -45
  918. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times8-on1.c +0 -37
  919. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-unrolling.macros +0 -302
  920. data/ext/digest/kangarootwelve/keccak/generic64/KeccakSpongeWidth1600.link.c +0 -1
  921. data/ext/digest/kangarootwelve/keccak/generic64/PlSnP-Fallback.inc +0 -287
  922. data/ext/digest/kangarootwelve/keccak/generic64/SnP-Relaned.h +0 -140
  923. data/ext/digest/kangarootwelve/keccak/generic64lc/KangarooTwelve.link.c +0 -1
  924. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakDuplexWidth1600.link.c +0 -1
  925. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-64.macros +0 -2195
  926. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-SnP.h +0 -49
  927. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-opt64.c +0 -541
  928. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times2-SnP.h +0 -45
  929. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times2-on1.c +0 -37
  930. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times4-SnP.h +0 -45
  931. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times4-on1.c +0 -37
  932. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times8-SnP.h +0 -45
  933. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times8-on1.c +0 -37
  934. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-unrolling.macros +0 -302
  935. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakSpongeWidth1600.link.c +0 -1
  936. data/ext/digest/kangarootwelve/keccak/generic64lc/PlSnP-Fallback.inc +0 -287
  937. data/ext/digest/kangarootwelve/keccak/generic64lc/SnP-Relaned.h +0 -140
  938. data/ext/digest/kangarootwelve/keccak/haswell/KangarooTwelve.link.c +0 -1
  939. data/ext/digest/kangarootwelve/keccak/haswell/KeccakDuplexWidth1600.link.c +0 -1
  940. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-AVX2.s +0 -993
  941. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-SnP.h +0 -41
  942. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times2-SIMD128.c +0 -954
  943. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times2-SnP.h +0 -47
  944. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times4-SIMD256.c +0 -1303
  945. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times4-SnP.h +0 -53
  946. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times8-SnP.h +0 -45
  947. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times8-on4.c +0 -38
  948. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-unrolling.macros +0 -302
  949. data/ext/digest/kangarootwelve/keccak/haswell/KeccakSpongeWidth1600.link.c +0 -1
  950. data/ext/digest/kangarootwelve/keccak/haswell/PlSnP-Fallback.inc +0 -287
  951. data/ext/digest/kangarootwelve/keccak/haswell/SIMD128-config.h +0 -8
  952. data/ext/digest/kangarootwelve/keccak/nehalem/KangarooTwelve.link.c +0 -1
  953. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakDuplexWidth1600.link.c +0 -1
  954. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-64.macros +0 -2195
  955. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-SnP.h +0 -49
  956. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-opt64-config.h +0 -7
  957. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-opt64.c +0 -541
  958. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times2-SIMD128.c +0 -954
  959. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times2-SnP.h +0 -47
  960. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times4-SnP.h +0 -45
  961. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times4-on2.c +0 -38
  962. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times8-SnP.h +0 -45
  963. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times8-on2.c +0 -38
  964. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-unrolling.macros +0 -302
  965. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakSpongeWidth1600.link.c +0 -1
  966. data/ext/digest/kangarootwelve/keccak/nehalem/PlSnP-Fallback.inc +0 -287
  967. data/ext/digest/kangarootwelve/keccak/nehalem/SIMD128-config.h +0 -8
  968. data/ext/digest/kangarootwelve/keccak/nehalem/SnP-Relaned.h +0 -140
  969. data/ext/digest/kangarootwelve/keccak/reference/KangarooTwelve.link.c +0 -1
  970. data/ext/digest/kangarootwelve/keccak/reference/KeccakDuplexWidth1600.link.c +0 -1
  971. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-SnP.h +0 -41
  972. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-reference.c +0 -424
  973. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-reference.h +0 -20
  974. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times2-SnP.h +0 -45
  975. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times2-on1.c +0 -37
  976. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times4-SnP.h +0 -45
  977. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times4-on1.c +0 -37
  978. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times8-SnP.h +0 -45
  979. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times8-on1.c +0 -37
  980. data/ext/digest/kangarootwelve/keccak/reference/KeccakSpongeWidth1600.link.c +0 -1
  981. data/ext/digest/kangarootwelve/keccak/reference/PlSnP-Fallback.inc +0 -287
  982. data/ext/digest/kangarootwelve/keccak/reference/displayIntermediateValues.c +0 -176
  983. data/ext/digest/kangarootwelve/keccak/reference/displayIntermediateValues.h +0 -29
  984. data/ext/digest/kangarootwelve/keccak/reference32bits/KangarooTwelve.link.c +0 -1
  985. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakDuplexWidth1600.link.c +0 -1
  986. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-SnP.h +0 -41
  987. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-reference.h +0 -20
  988. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-reference32BI.c +0 -612
  989. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times2-SnP.h +0 -45
  990. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times2-on1.c +0 -37
  991. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times4-SnP.h +0 -45
  992. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times4-on1.c +0 -37
  993. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times8-SnP.h +0 -45
  994. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times8-on1.c +0 -37
  995. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakSpongeWidth1600.link.c +0 -1
  996. data/ext/digest/kangarootwelve/keccak/reference32bits/PlSnP-Fallback.inc +0 -287
  997. data/ext/digest/kangarootwelve/keccak/reference32bits/displayIntermediateValues.c +0 -176
  998. data/ext/digest/kangarootwelve/keccak/reference32bits/displayIntermediateValues.h +0 -29
  999. data/ext/digest/kangarootwelve/keccak/sandybridge/KangarooTwelve.link.c +0 -1
  1000. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakDuplexWidth1600.link.c +0 -1
  1001. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-64.macros +0 -2195
  1002. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-SnP.h +0 -49
  1003. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-opt64.c +0 -541
  1004. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times2-SIMD128.c +0 -954
  1005. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times2-SnP.h +0 -47
  1006. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times4-SnP.h +0 -45
  1007. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times4-on2.c +0 -38
  1008. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times8-SnP.h +0 -45
  1009. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times8-on2.c +0 -38
  1010. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-unrolling.macros +0 -302
  1011. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakSpongeWidth1600.link.c +0 -1
  1012. data/ext/digest/kangarootwelve/keccak/sandybridge/PlSnP-Fallback.inc +0 -287
  1013. data/ext/digest/kangarootwelve/keccak/sandybridge/SIMD128-config.h +0 -8
  1014. data/ext/digest/kangarootwelve/keccak/sandybridge/SnP-Relaned.h +0 -140
  1015. data/ext/digest/kangarootwelve/keccak/skylakex/KangarooTwelve.link.c +0 -1
  1016. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakDuplexWidth1600.link.c +0 -1
  1017. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-AVX512.c +0 -621
  1018. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-SnP.h +0 -42
  1019. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times2-SIMD512.c +0 -852
  1020. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times2-SnP.h +0 -49
  1021. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times4-SIMD512.c +0 -883
  1022. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times4-SnP.h +0 -49
  1023. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times8-SIMD512.c +0 -1473
  1024. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times8-SnP.h +0 -53
  1025. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakSpongeWidth1600.link.c +0 -1
@@ -0,0 +1,1615 @@
1
+ /*
2
+ The Keccak-p permutations, designed by Guido Bertoni, Joan Daemen, Michaël Peeters and Gilles Van Assche.
3
+
4
+ Implementation by Ronny Van Keer, hereby denoted as "the implementer".
5
+
6
+ For more information, feedback or questions, please refer to the Keccak Team website:
7
+ https://keccak.team/
8
+
9
+ To the extent possible under law, the implementer has waived all copyright
10
+ and related or neighboring rights to the source code in this file.
11
+ http://creativecommons.org/publicdomain/zero/1.0/
12
+
13
+ ---
14
+
15
+ This file implements Keccak-p[1600]×8 in a PlSnP-compatible way.
16
+ Please refer to PlSnP-documentation.h for more details.
17
+
18
+ This implementation comes with KeccakP-1600-times8-SnP.h in the same folder.
19
+ Please refer to LowLevel.build for the exact list of other files it must be combined with.
20
+ */
21
+
22
+ #include <stdio.h>
23
+ #include <stdlib.h>
24
+ #include <string.h>
25
+ #include <stdint.h>
26
+ #include <smmintrin.h>
27
+ #include <wmmintrin.h>
28
+ #include <immintrin.h>
29
+ #include <emmintrin.h>
30
+ #include "align.h"
31
+ #include "KeccakP-1600-times8-SnP.h"
32
+ #include "SIMD512-config.h"
33
+
34
+ #include "brg_endian.h"
35
+ #if (PLATFORM_BYTE_ORDER != IS_LITTLE_ENDIAN)
36
+ #error Expecting a little-endian platform
37
+ #endif
38
+
39
+ /*
40
+ ** Uncomment the define hereunder when compiling for a CPU without AVX-512 SIMD.
41
+ #define SIMULATE_AVX512
42
+ */
43
+
44
+ #define VERBOSE 0
45
+
46
+ #if defined(SIMULATE_AVX512)
47
+
48
+ typedef struct
49
+ {
50
+ uint64_t x[8];
51
+ } __m512i;
52
+
53
+ static __m512i _mm512_and_si512( __m512i a, __m512i b)
54
+ {
55
+ __m512i r;
56
+ unsigned int i;
57
+
58
+ for ( i = 0; i < 8; ++i )
59
+ r.x[i] = a.x[i] & b.x[i];
60
+ return(r);
61
+ }
62
+
63
+ static __m512i _mm512_xor_si512( __m512i a, __m512i b)
64
+ {
65
+ __m512i r;
66
+ unsigned int i;
67
+
68
+ for ( i = 0; i < 8; ++i )
69
+ r.x[i] = a.x[i] ^ b.x[i];
70
+ return(r);
71
+ }
72
+
73
+ static __m512i _mm512_ternarylogic_epi64(__m512i a, __m512i b, __m512i c, int imm)
74
+ {
75
+
76
+ if (imm == 0x96)
77
+ return ( _mm512_xor_si512( _mm512_xor_si512( a, b ), c ) );
78
+ if (imm == 0xD2) {
79
+ __m512i t;
80
+ unsigned int i;
81
+
82
+ for ( i = 0; i < 8; ++i )
83
+ t.x[i] = ~b.x[i] & c.x[i];
84
+ return ( _mm512_xor_si512( a, t ) );
85
+ }
86
+ printf( "_mm512_ternarylogic_epi64( a, b, c, %02X) not implemented!\n", imm );
87
+ exit(1);
88
+
89
+ }
90
+
91
+ static __m512i _mm512_rol_epi64(__m512i a, int offset)
92
+ {
93
+ __m512i r;
94
+ unsigned int i;
95
+
96
+ for ( i = 0; i < 8; ++i )
97
+ r.x[i] = (a.x[i] << offset) | (a.x[i] >> (64-offset));
98
+ return(r);
99
+ }
100
+
101
+ static __m512i _mm512_srli_epi64(__m512i a, int offset)
102
+ {
103
+ __m512i r;
104
+ unsigned int i;
105
+
106
+ for ( i = 0; i < 8; ++i )
107
+ r.x[i] = (a.x[i] >> offset);
108
+ return(r);
109
+ }
110
+
111
+
112
+ static __m512i _mm512_broadcast_f64x4(__m256d a)
113
+ {
114
+ __m512i r;
115
+ unsigned int i;
116
+ uint64_t t[4];
117
+
118
+ _mm256_store_si256( (__m256i*)t, (__m256i)a );
119
+ for ( i = 0; i < 4; ++i )
120
+ r.x[i+4] = r.x[i] = t[i];
121
+ return(r);
122
+ }
123
+
124
+ static __m512i _mm512_set_epi64(uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e, uint64_t f, uint64_t g, uint64_t h)
125
+ {
126
+ __m512i r;
127
+
128
+ r.x[0] = h;
129
+ r.x[1] = g;
130
+ r.x[2] = f;
131
+ r.x[3] = e;
132
+ r.x[4] = d;
133
+ r.x[5] = c;
134
+ r.x[6] = b;
135
+ r.x[7] = a;
136
+ return(r);
137
+ }
138
+
139
+ static __m512i _mm512_i32gather_epi64(__m256i idx, const void *p, int scale)
140
+ {
141
+ __m512i r;
142
+ unsigned int i;
143
+ uint32_t offset[8];
144
+
145
+ _mm256_store_si256( (__m256i*)offset, idx );
146
+ for ( i = 0; i < 8; ++i )
147
+ r.x[i] = *(const uint64_t*)((const char*)p + offset[i] * scale);
148
+ return(r);
149
+ }
150
+
151
+ static void _mm512_i32scatter_epi64( void *p, __m256i idx, __m512i value, int scale)
152
+ {
153
+ unsigned int i;
154
+ uint32_t offset[8];
155
+
156
+ _mm256_store_si256( (__m256i*)offset, idx );
157
+ for ( i = 0; i < 8; ++i )
158
+ *(uint64_t*)((char*)p + offset[i] * scale) = value.x[i];
159
+ }
160
+
161
+ static __m512i _mm512_permutex2var_epi64(__m512i a, __m512i idx, __m512i b)
162
+ {
163
+ __m512i r;
164
+ unsigned int i;
165
+ for ( i = 0; i < 8; ++i )
166
+ r.x[i] = (idx.x[i] & 8) ? b.x[idx.x[i] & 7] : a.x[idx.x[i] & 7];
167
+ return(r);
168
+ }
169
+
170
+ static __m512i _mm512_maskz_loadu_epi64(uint8_t k, const void *mem_addr)
171
+ {
172
+ __m512i r;
173
+ const uint64_t *p64 = (const uint64_t *)mem_addr;
174
+ unsigned int i;
175
+
176
+ for ( i = 0; i < 8; ++i ) {
177
+ if ((k & (1 << i)) != 0) {
178
+ r.x[i] = p64[i];
179
+ }
180
+ else {
181
+ r.x[i] = 0;
182
+ }
183
+ }
184
+ return(r);
185
+ }
186
+
187
+ #define _mm512_maskz_load_epi64 _mm512_maskz_loadu_epi64
188
+
189
+ static void _mm512_storeu_si512(__m512i * mem_addr, __m512i a)
190
+ {
191
+ uint64_t *p64 = (uint64_t *)mem_addr;
192
+ unsigned int i;
193
+
194
+ for ( i = 0; i < 8; ++i )
195
+ p64[i] = a.x[i];
196
+ }
197
+
198
+ #define _mm512_store_si512 _mm512_storeu_si512
199
+
200
+ static __m512i _mm512_loadu_si512(const __m512i * mem_addr)
201
+ {
202
+ __m512i r;
203
+ const uint64_t *p64 = (const uint64_t *)mem_addr;
204
+ unsigned int i;
205
+
206
+ for ( i = 0; i < 8; ++i )
207
+ r.x[i] = p64[i];
208
+ return(r);
209
+ }
210
+
211
+ #define _mm512_load_si512 _mm512_loadu_si512
212
+
213
+ static void _mm512_mask_storeu_epi64(void *mem_addr, uint8_t k, __m512i a)
214
+ {
215
+ uint64_t *p64 = (uint64_t *)mem_addr;
216
+ unsigned int i;
217
+
218
+ for ( i = 0; i < 8; ++i ) {
219
+ if ((k & (1 << i)) != 0)
220
+ p64[i] = a.x[i];
221
+ }
222
+ }
223
+
224
+ #define _mm512_mask_store_epi64 _mm512_mask_storeu_epi64
225
+
226
+ static __m512i _mm512_setzero_si512(void)
227
+ {
228
+ __m512i r;
229
+ unsigned int i;
230
+
231
+ for ( i = 0; i < 8; ++i )
232
+ r.x[i] = 0;
233
+ return(r);
234
+ }
235
+
236
+ static __m256i _mm512_extracti64x4_epi64(__m512i a, int imm8)
237
+ {
238
+ uint64_t buf[8];
239
+ __m256i r;
240
+
241
+ _mm512_storeu_si512((__m512i*)buf, a);
242
+ r = *(__m256i*)&buf[((imm8 == 0) ? 0 : 4)];
243
+ return(r);
244
+ }
245
+
246
+ #endif
247
+
248
+ typedef __m128i V128;
249
+ typedef __m256i V256;
250
+ typedef __m512i V512;
251
+
252
+ #if defined(KeccakP1600times8_useAVX512)
253
+
254
+ #define XOR(a,b) _mm512_xor_si512(a,b)
255
+ #define XOR3(a,b,c) _mm512_ternarylogic_epi64(a,b,c,0x96)
256
+ #define XOR5(a,b,c,d,e) XOR3(XOR3(a,b,c),d,e)
257
+ #define XOReq512(a, b) a = XOR(a,b)
258
+
259
+ #define ROL(a,offset) _mm512_rol_epi64(a,offset)
260
+ #define Chi(a,b,c) _mm512_ternarylogic_epi64(a,b,c,0xD2)
261
+
262
+ #define CONST8_64(a) _mm512_set1_epi64(a)
263
+
264
+ #define LOAD512(a) _mm512_load_si512((const V512 *)&(a))
265
+ #define LOAD512u(a) _mm512_loadu_si512((const V512 *)&(a))
266
+ #define LOAD8_32(a,b,c,d,e,f,g,h) _mm256_set_epi32((uint64_t)(a), (uint32_t)(b), (uint32_t)(c), (uint32_t)(d), (uint32_t)(e), (uint32_t)(f), (uint32_t)(g), (uint32_t)(h))
267
+ #define LOAD8_64(a,b,c,d,e,f,g,h) _mm512_set_epi64((uint64_t)(a), (uint64_t)(b), (uint64_t)(c), (uint64_t)(d), (uint64_t)(e), (uint64_t)(f), (uint64_t)(g), (uint64_t)(h))
268
+ #define LOAD_GATHER8_64(idx,p) _mm512_i32gather_epi64( idx, (const void*)(p), 8)
269
+
270
+ #define STORE_SCATTER8_64(p,idx, v) _mm512_i32scatter_epi64( (void*)(p), idx, v, 8)
271
+
272
+ #endif
273
+
274
+ #if (VERBOSE > 0)
275
+ #define DumpMem(__t, buf, __n) { \
276
+ uint32_t i; \
277
+ printf("%s ", __t); \
278
+ for (i = 0; i < __n; ++i) { \
279
+ printf("%016lx ", (buf)[i]); \
280
+ /*if ((i%5) == 4) printf("\n"); */\
281
+ } \
282
+ printf("\n"); \
283
+ }
284
+
285
+ #define DumpOne(__v,__i) { \
286
+ uint64_t buf[8]; \
287
+ _mm512_storeu_si512((V512*)buf, __v##__i); \
288
+ printf("%016lx %016lx %016lx %016lx %016lx %016lx %016lx %016lx\n", \
289
+ buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]); \
290
+ }
291
+
292
+ #define Dump(__t,__v) { \
293
+ printf("%s\n", __t); \
294
+ DumpOne(__v, ba); \
295
+ DumpOne(__v, be); \
296
+ DumpOne(__v, bi); \
297
+ DumpOne(__v, bo); \
298
+ DumpOne(__v, bu); \
299
+ DumpOne(__v, ga); \
300
+ DumpOne(__v, ge); \
301
+ DumpOne(__v, gi); \
302
+ DumpOne(__v, go); \
303
+ DumpOne(__v, gu); \
304
+ DumpOne(__v, ka); \
305
+ DumpOne(__v, ke); \
306
+ DumpOne(__v, ki); \
307
+ DumpOne(__v, ko); \
308
+ DumpOne(__v, ku); \
309
+ DumpOne(__v, ma); \
310
+ DumpOne(__v, me); \
311
+ DumpOne(__v, mi); \
312
+ DumpOne(__v, mo); \
313
+ DumpOne(__v, mu); \
314
+ DumpOne(__v, sa); \
315
+ DumpOne(__v, se); \
316
+ DumpOne(__v, si); \
317
+ DumpOne(__v, so); \
318
+ DumpOne(__v, su); \
319
+ printf("\n"); \
320
+ }
321
+
322
+ #define DumpReg(__t,__v,__i) printf("%s ", __t); DumpOne(__v,__i)
323
+
324
+ #else
325
+ #define DumpMem(__t, buf,len)
326
+ #define DumpOne(__v,__i)
327
+ #define Dump(__t,__v)
328
+ #define DumpReg(__t,__v,__i)
329
+ #endif
330
+
331
+
332
+ #define laneIndex(instanceIndex, lanePosition) ((lanePosition)*8 + instanceIndex)
333
+ #define SnP_laneLengthInBytes 8
334
+
335
+ void KeccakP1600times8_InitializeAll(void *states)
336
+ {
337
+ memset(states, 0, KeccakP1600times8_statesSizeInBytes);
338
+ }
339
+
340
+ void KeccakP1600times8_AddBytes(void *states, unsigned int instanceIndex, const unsigned char *data, unsigned int offset, unsigned int length)
341
+ {
342
+ unsigned int sizeLeft = length;
343
+ unsigned int lanePosition = offset/SnP_laneLengthInBytes;
344
+ unsigned int offsetInLane = offset%SnP_laneLengthInBytes;
345
+ const unsigned char *curData = data;
346
+ uint64_t *statesAsLanes = states;
347
+
348
+ if ((sizeLeft > 0) && (offsetInLane != 0)) {
349
+ unsigned int bytesInLane = SnP_laneLengthInBytes - offsetInLane;
350
+ uint64_t lane = 0;
351
+ if (bytesInLane > sizeLeft)
352
+ bytesInLane = sizeLeft;
353
+ memcpy((unsigned char*)&lane + offsetInLane, curData, bytesInLane);
354
+ statesAsLanes[laneIndex(instanceIndex, lanePosition)] ^= lane;
355
+ sizeLeft -= bytesInLane;
356
+ lanePosition++;
357
+ curData += bytesInLane;
358
+ }
359
+
360
+ while(sizeLeft >= SnP_laneLengthInBytes) {
361
+ uint64_t lane = *((const uint64_t*)curData);
362
+ statesAsLanes[laneIndex(instanceIndex, lanePosition)] ^= lane;
363
+ sizeLeft -= SnP_laneLengthInBytes;
364
+ lanePosition++;
365
+ curData += SnP_laneLengthInBytes;
366
+ }
367
+
368
+ if (sizeLeft > 0) {
369
+ uint64_t lane = 0;
370
+ memcpy(&lane, curData, sizeLeft);
371
+ statesAsLanes[laneIndex(instanceIndex, lanePosition)] ^= lane;
372
+ }
373
+ }
374
+
375
+ void KeccakP1600times8_AddLanesAll(void *states, const unsigned char *data, unsigned int laneCount, unsigned int laneOffset)
376
+ {
377
+ V512 *stateAsLanes = states;
378
+ const uint64_t *dataAsLanes = (const uint64_t *)data;
379
+ unsigned int i;
380
+ V256 index;
381
+
382
+ #define Add_In( argIndex ) stateAsLanes[argIndex] = XOR(stateAsLanes[argIndex], LOAD_GATHER8_64(index, dataAsLanes+argIndex))
383
+ index = LOAD8_32(7*laneOffset, 6*laneOffset, 5*laneOffset, 4*laneOffset, 3*laneOffset, 2*laneOffset, 1*laneOffset, 0*laneOffset);
384
+ if ( laneCount >= 16 ) {
385
+ Add_In( 0 );
386
+ Add_In( 1 );
387
+ Add_In( 2 );
388
+ Add_In( 3 );
389
+ Add_In( 4 );
390
+ Add_In( 5 );
391
+ Add_In( 6 );
392
+ Add_In( 7 );
393
+ Add_In( 8 );
394
+ Add_In( 9 );
395
+ Add_In( 10 );
396
+ Add_In( 11 );
397
+ Add_In( 12 );
398
+ Add_In( 13 );
399
+ Add_In( 14 );
400
+ Add_In( 15 );
401
+ if ( laneCount >= 20 ) {
402
+ Add_In( 16 );
403
+ Add_In( 17 );
404
+ Add_In( 18 );
405
+ Add_In( 19 );
406
+ for(i=20; i<laneCount; i++)
407
+ Add_In( i );
408
+ }
409
+ else {
410
+ for(i=16; i<laneCount; i++)
411
+ Add_In( i );
412
+ }
413
+ }
414
+ else {
415
+ for(i=0; i<laneCount; i++)
416
+ Add_In( i );
417
+ }
418
+ #undef Add_In
419
+ }
420
+
421
+ void KeccakP1600times8_OverwriteBytes(void *states, unsigned int instanceIndex, const unsigned char *data, unsigned int offset, unsigned int length)
422
+ {
423
+ unsigned int sizeLeft = length;
424
+ unsigned int lanePosition = offset/SnP_laneLengthInBytes;
425
+ unsigned int offsetInLane = offset%SnP_laneLengthInBytes;
426
+ const unsigned char *curData = data;
427
+ uint64_t *statesAsLanes = states;
428
+
429
+ if ((sizeLeft > 0) && (offsetInLane != 0)) {
430
+ unsigned int bytesInLane = SnP_laneLengthInBytes - offsetInLane;
431
+ if (bytesInLane > sizeLeft)
432
+ bytesInLane = sizeLeft;
433
+ memcpy( ((unsigned char *)&statesAsLanes[laneIndex(instanceIndex, lanePosition)]) + offsetInLane, curData, bytesInLane);
434
+ sizeLeft -= bytesInLane;
435
+ lanePosition++;
436
+ curData += bytesInLane;
437
+ }
438
+
439
+ while(sizeLeft >= SnP_laneLengthInBytes) {
440
+ uint64_t lane = *((const uint64_t*)curData);
441
+ statesAsLanes[laneIndex(instanceIndex, lanePosition)] = lane;
442
+ sizeLeft -= SnP_laneLengthInBytes;
443
+ lanePosition++;
444
+ curData += SnP_laneLengthInBytes;
445
+ }
446
+
447
+ if (sizeLeft > 0) {
448
+ memcpy(&statesAsLanes[laneIndex(instanceIndex, lanePosition)], curData, sizeLeft);
449
+ }
450
+ }
451
+
452
+ void KeccakP1600times8_OverwriteLanesAll(void *states, const unsigned char *data, unsigned int laneCount, unsigned int laneOffset)
453
+ {
454
+ V512 *stateAsLanes = states;
455
+ const uint64_t *dataAsLanes = (const uint64_t *)data;
456
+ unsigned int i;
457
+ V256 index;
458
+
459
+ #define OverWr( argIndex ) stateAsLanes[argIndex] = LOAD_GATHER8_64(index, dataAsLanes+argIndex)
460
+ index = LOAD8_32(7*laneOffset, 6*laneOffset, 5*laneOffset, 4*laneOffset, 3*laneOffset, 2*laneOffset, 1*laneOffset, 0*laneOffset);
461
+ if ( laneCount >= 16 ) {
462
+ OverWr( 0 );
463
+ OverWr( 1 );
464
+ OverWr( 2 );
465
+ OverWr( 3 );
466
+ OverWr( 4 );
467
+ OverWr( 5 );
468
+ OverWr( 6 );
469
+ OverWr( 7 );
470
+ OverWr( 8 );
471
+ OverWr( 9 );
472
+ OverWr( 10 );
473
+ OverWr( 11 );
474
+ OverWr( 12 );
475
+ OverWr( 13 );
476
+ OverWr( 14 );
477
+ OverWr( 15 );
478
+ if ( laneCount >= 20 ) {
479
+ OverWr( 16 );
480
+ OverWr( 17 );
481
+ OverWr( 18 );
482
+ OverWr( 19 );
483
+ for(i=20; i<laneCount; i++)
484
+ OverWr( i );
485
+ }
486
+ else {
487
+ for(i=16; i<laneCount; i++)
488
+ OverWr( i );
489
+ }
490
+ }
491
+ else {
492
+ for(i=0; i<laneCount; i++)
493
+ OverWr( i );
494
+ }
495
+ #undef OverWr
496
+ }
497
+
498
+ void KeccakP1600times8_OverwriteWithZeroes(void *states, unsigned int instanceIndex, unsigned int byteCount)
499
+ {
500
+ unsigned int sizeLeft = byteCount;
501
+ unsigned int lanePosition = 0;
502
+ uint64_t *statesAsLanes = states;
503
+
504
+ while(sizeLeft >= SnP_laneLengthInBytes) {
505
+ statesAsLanes[laneIndex(instanceIndex, lanePosition)] = 0;
506
+ sizeLeft -= SnP_laneLengthInBytes;
507
+ lanePosition++;
508
+ }
509
+
510
+ if (sizeLeft > 0) {
511
+ memset(&statesAsLanes[laneIndex(instanceIndex, lanePosition)], 0, sizeLeft);
512
+ }
513
+ }
514
+
515
+ void KeccakP1600times8_ExtractBytes(const void *states, unsigned int instanceIndex, unsigned char *data, unsigned int offset, unsigned int length)
516
+ {
517
+ unsigned int sizeLeft = length;
518
+ unsigned int lanePosition = offset/SnP_laneLengthInBytes;
519
+ unsigned int offsetInLane = offset%SnP_laneLengthInBytes;
520
+ unsigned char *curData = data;
521
+ const uint64_t *statesAsLanes = states;
522
+
523
+ if ((sizeLeft > 0) && (offsetInLane != 0)) {
524
+ unsigned int bytesInLane = SnP_laneLengthInBytes - offsetInLane;
525
+ if (bytesInLane > sizeLeft)
526
+ bytesInLane = sizeLeft;
527
+ memcpy( curData, ((unsigned char *)&statesAsLanes[laneIndex(instanceIndex, lanePosition)]) + offsetInLane, bytesInLane);
528
+ sizeLeft -= bytesInLane;
529
+ lanePosition++;
530
+ curData += bytesInLane;
531
+ }
532
+
533
+ while(sizeLeft >= SnP_laneLengthInBytes) {
534
+ *(uint64_t*)curData = statesAsLanes[laneIndex(instanceIndex, lanePosition)];
535
+ sizeLeft -= SnP_laneLengthInBytes;
536
+ lanePosition++;
537
+ curData += SnP_laneLengthInBytes;
538
+ }
539
+
540
+ if (sizeLeft > 0) {
541
+ memcpy( curData, &statesAsLanes[laneIndex(instanceIndex, lanePosition)], sizeLeft);
542
+ }
543
+ }
544
+
545
+ void KeccakP1600times8_ExtractLanesAll(const void *states, unsigned char *data, unsigned int laneCount, unsigned int laneOffset)
546
+ {
547
+ const V512 *stateAsLanes = states;
548
+ uint64_t *dataAsLanes = (uint64_t *)data;
549
+ unsigned int i;
550
+ V256 index;
551
+
552
+ #define Extr( argIndex ) STORE_SCATTER8_64(dataAsLanes+argIndex, index, stateAsLanes[argIndex])
553
+ index = LOAD8_32(7*laneOffset, 6*laneOffset, 5*laneOffset, 4*laneOffset, 3*laneOffset, 2*laneOffset, 1*laneOffset, 0*laneOffset);
554
+ if ( laneCount >= 16 ) {
555
+ Extr( 0 );
556
+ Extr( 1 );
557
+ Extr( 2 );
558
+ Extr( 3 );
559
+ Extr( 4 );
560
+ Extr( 5 );
561
+ Extr( 6 );
562
+ Extr( 7 );
563
+ Extr( 8 );
564
+ Extr( 9 );
565
+ Extr( 10 );
566
+ Extr( 11 );
567
+ Extr( 12 );
568
+ Extr( 13 );
569
+ Extr( 14 );
570
+ Extr( 15 );
571
+ if ( laneCount >= 20 ) {
572
+ Extr( 16 );
573
+ Extr( 17 );
574
+ Extr( 18 );
575
+ Extr( 19 );
576
+ for(i=20; i<laneCount; i++)
577
+ Extr( i );
578
+ }
579
+ else {
580
+ for(i=16; i<laneCount; i++)
581
+ Extr( i );
582
+ }
583
+ }
584
+ else {
585
+ for(i=0; i<laneCount; i++)
586
+ Extr( i );
587
+ }
588
+ #undef Extr
589
+ }
590
+
591
+ void KeccakP1600times8_ExtractAndAddBytes(const void *states, unsigned int instanceIndex, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length)
592
+ {
593
+ unsigned int sizeLeft = length;
594
+ unsigned int lanePosition = offset/SnP_laneLengthInBytes;
595
+ unsigned int offsetInLane = offset%SnP_laneLengthInBytes;
596
+ const unsigned char *curInput = input;
597
+ unsigned char *curOutput = output;
598
+ const uint64_t *statesAsLanes = states;
599
+
600
+ if ((sizeLeft > 0) && (offsetInLane != 0)) {
601
+ unsigned int bytesInLane = SnP_laneLengthInBytes - offsetInLane;
602
+ uint64_t lane = statesAsLanes[laneIndex(instanceIndex, lanePosition)] >> (8 * offsetInLane);
603
+ if (bytesInLane > sizeLeft)
604
+ bytesInLane = sizeLeft;
605
+ sizeLeft -= bytesInLane;
606
+ do {
607
+ *(curOutput++) = *(curInput++) ^ (unsigned char)lane;
608
+ lane >>= 8;
609
+ } while ( --bytesInLane != 0);
610
+ lanePosition++;
611
+ }
612
+
613
+ while(sizeLeft >= SnP_laneLengthInBytes) {
614
+ *((uint64_t*)curOutput) = *((uint64_t*)curInput) ^ statesAsLanes[laneIndex(instanceIndex, lanePosition)];
615
+ sizeLeft -= SnP_laneLengthInBytes;
616
+ lanePosition++;
617
+ curInput += SnP_laneLengthInBytes;
618
+ curOutput += SnP_laneLengthInBytes;
619
+ }
620
+
621
+ if (sizeLeft != 0) {
622
+ uint64_t lane = statesAsLanes[laneIndex(instanceIndex, lanePosition)];
623
+ do {
624
+ *(curOutput++) = *(curInput++) ^ (unsigned char)lane;
625
+ lane >>= 8;
626
+ } while ( --sizeLeft != 0);
627
+ }
628
+ }
629
+
630
+ void KeccakP1600times8_ExtractAndAddLanesAll(const void *states, const unsigned char *input, unsigned char *output, unsigned int laneCount, unsigned int laneOffset)
631
+ {
632
+ const V512 *stateAsLanes = states;
633
+ const uint64_t *inAsLanes = (const uint64_t *)input;
634
+ uint64_t *outAsLanes = (uint64_t *)output;
635
+ unsigned int i;
636
+ V256 index;
637
+
638
+ #define ExtrAdd( argIndex ) STORE_SCATTER8_64(outAsLanes+argIndex, index, XOR(stateAsLanes[argIndex], LOAD_GATHER8_64(index, inAsLanes+argIndex)))
639
+ index = LOAD8_32(7*laneOffset, 6*laneOffset, 5*laneOffset, 4*laneOffset, 3*laneOffset, 2*laneOffset, 1*laneOffset, 0*laneOffset);
640
+ if ( laneCount >= 16 ) {
641
+ ExtrAdd( 0 );
642
+ ExtrAdd( 1 );
643
+ ExtrAdd( 2 );
644
+ ExtrAdd( 3 );
645
+ ExtrAdd( 4 );
646
+ ExtrAdd( 5 );
647
+ ExtrAdd( 6 );
648
+ ExtrAdd( 7 );
649
+ ExtrAdd( 8 );
650
+ ExtrAdd( 9 );
651
+ ExtrAdd( 10 );
652
+ ExtrAdd( 11 );
653
+ ExtrAdd( 12 );
654
+ ExtrAdd( 13 );
655
+ ExtrAdd( 14 );
656
+ ExtrAdd( 15 );
657
+ if ( laneCount >= 20 ) {
658
+ ExtrAdd( 16 );
659
+ ExtrAdd( 17 );
660
+ ExtrAdd( 18 );
661
+ ExtrAdd( 19 );
662
+ for(i=20; i<laneCount; i++)
663
+ ExtrAdd( i );
664
+ }
665
+ else {
666
+ for(i=16; i<laneCount; i++)
667
+ ExtrAdd( i );
668
+ }
669
+ }
670
+ else {
671
+ for(i=0; i<laneCount; i++)
672
+ ExtrAdd( i );
673
+ }
674
+ #undef ExtrAdd
675
+
676
+ }
677
+
678
+ static ALIGN(KeccakP1600times8_statesAlignment) const uint64_t KeccakP1600RoundConstants[24] = {
679
+ 0x0000000000000001ULL,
680
+ 0x0000000000008082ULL,
681
+ 0x800000000000808aULL,
682
+ 0x8000000080008000ULL,
683
+ 0x000000000000808bULL,
684
+ 0x0000000080000001ULL,
685
+ 0x8000000080008081ULL,
686
+ 0x8000000000008009ULL,
687
+ 0x000000000000008aULL,
688
+ 0x0000000000000088ULL,
689
+ 0x0000000080008009ULL,
690
+ 0x000000008000000aULL,
691
+ 0x000000008000808bULL,
692
+ 0x800000000000008bULL,
693
+ 0x8000000000008089ULL,
694
+ 0x8000000000008003ULL,
695
+ 0x8000000000008002ULL,
696
+ 0x8000000000000080ULL,
697
+ 0x000000000000800aULL,
698
+ 0x800000008000000aULL,
699
+ 0x8000000080008081ULL,
700
+ 0x8000000000008080ULL,
701
+ 0x0000000080000001ULL,
702
+ 0x8000000080008008ULL};
703
+
704
+ #define KeccakP_DeclareVars \
705
+ V512 _Ba, _Be, _Bi, _Bo, _Bu; \
706
+ V512 _Da, _De, _Di, _Do, _Du; \
707
+ V512 _ba, _be, _bi, _bo, _bu; \
708
+ V512 _ga, _ge, _gi, _go, _gu; \
709
+ V512 _ka, _ke, _ki, _ko, _ku; \
710
+ V512 _ma, _me, _mi, _mo, _mu; \
711
+ V512 _sa, _se, _si, _so, _su
712
+
713
+ #define KeccakP_ThetaRhoPiChi( _L1, _L2, _L3, _L4, _L5, _Bb1, _Bb2, _Bb3, _Bb4, _Bb5, _Rr1, _Rr2, _Rr3, _Rr4, _Rr5 ) \
714
+ _Bb1 = XOR(_L1, _Da); \
715
+ _Bb2 = XOR(_L2, _De); \
716
+ _Bb3 = XOR(_L3, _Di); \
717
+ _Bb4 = XOR(_L4, _Do); \
718
+ _Bb5 = XOR(_L5, _Du); \
719
+ if (_Rr1 != 0) _Bb1 = ROL(_Bb1, _Rr1); \
720
+ _Bb2 = ROL(_Bb2, _Rr2); \
721
+ _Bb3 = ROL(_Bb3, _Rr3); \
722
+ _Bb4 = ROL(_Bb4, _Rr4); \
723
+ _Bb5 = ROL(_Bb5, _Rr5); \
724
+ _L1 = Chi( _Ba, _Be, _Bi); \
725
+ _L2 = Chi( _Be, _Bi, _Bo); \
726
+ _L3 = Chi( _Bi, _Bo, _Bu); \
727
+ _L4 = Chi( _Bo, _Bu, _Ba); \
728
+ _L5 = Chi( _Bu, _Ba, _Be);
729
+
730
+ #define KeccakP_ThetaRhoPiChiIota0( _L1, _L2, _L3, _L4, _L5, _rc ) \
731
+ _Ba = XOR5( _ba, _ga, _ka, _ma, _sa ); /* Theta effect */ \
732
+ _Be = XOR5( _be, _ge, _ke, _me, _se ); \
733
+ _Bi = XOR5( _bi, _gi, _ki, _mi, _si ); \
734
+ _Bo = XOR5( _bo, _go, _ko, _mo, _so ); \
735
+ _Bu = XOR5( _bu, _gu, _ku, _mu, _su ); \
736
+ _Da = ROL( _Be, 1 ); \
737
+ _De = ROL( _Bi, 1 ); \
738
+ _Di = ROL( _Bo, 1 ); \
739
+ _Do = ROL( _Bu, 1 ); \
740
+ _Du = ROL( _Ba, 1 ); \
741
+ _Da = XOR( _Da, _Bu ); \
742
+ _De = XOR( _De, _Ba ); \
743
+ _Di = XOR( _Di, _Be ); \
744
+ _Do = XOR( _Do, _Bi ); \
745
+ _Du = XOR( _Du, _Bo ); \
746
+ KeccakP_ThetaRhoPiChi( _L1, _L2, _L3, _L4, _L5, _Ba, _Be, _Bi, _Bo, _Bu, 0, 44, 43, 21, 14 ); \
747
+ _L1 = XOR(_L1, _rc) /* Iota */
748
+
749
+ #define KeccakP_ThetaRhoPiChi1( _L1, _L2, _L3, _L4, _L5 ) \
750
+ KeccakP_ThetaRhoPiChi( _L1, _L2, _L3, _L4, _L5, _Bi, _Bo, _Bu, _Ba, _Be, 3, 45, 61, 28, 20 )
751
+
752
+ #define KeccakP_ThetaRhoPiChi2( _L1, _L2, _L3, _L4, _L5 ) \
753
+ KeccakP_ThetaRhoPiChi( _L1, _L2, _L3, _L4, _L5, _Bu, _Ba, _Be, _Bi, _Bo, 18, 1, 6, 25, 8 )
754
+
755
+ #define KeccakP_ThetaRhoPiChi3( _L1, _L2, _L3, _L4, _L5 ) \
756
+ KeccakP_ThetaRhoPiChi( _L1, _L2, _L3, _L4, _L5, _Be, _Bi, _Bo, _Bu, _Ba, 36, 10, 15, 56, 27 )
757
+
758
+ #define KeccakP_ThetaRhoPiChi4( _L1, _L2, _L3, _L4, _L5 ) \
759
+ KeccakP_ThetaRhoPiChi( _L1, _L2, _L3, _L4, _L5, _Bo, _Bu, _Ba, _Be, _Bi, 41, 2, 62, 55, 39 )
760
+
761
+ #define KeccakP_4rounds( i ) \
762
+ KeccakP_ThetaRhoPiChiIota0(_ba, _ge, _ki, _mo, _su, CONST8_64(KeccakP1600RoundConstants[i]) ); \
763
+ KeccakP_ThetaRhoPiChi1( _ka, _me, _si, _bo, _gu ); \
764
+ KeccakP_ThetaRhoPiChi2( _sa, _be, _gi, _ko, _mu ); \
765
+ KeccakP_ThetaRhoPiChi3( _ga, _ke, _mi, _so, _bu ); \
766
+ KeccakP_ThetaRhoPiChi4( _ma, _se, _bi, _go, _ku ); \
767
+ \
768
+ KeccakP_ThetaRhoPiChiIota0(_ba, _me, _gi, _so, _ku, CONST8_64(KeccakP1600RoundConstants[i+1]) ); \
769
+ KeccakP_ThetaRhoPiChi1( _sa, _ke, _bi, _mo, _gu ); \
770
+ KeccakP_ThetaRhoPiChi2( _ma, _ge, _si, _ko, _bu ); \
771
+ KeccakP_ThetaRhoPiChi3( _ka, _be, _mi, _go, _su ); \
772
+ KeccakP_ThetaRhoPiChi4( _ga, _se, _ki, _bo, _mu ); \
773
+ \
774
+ KeccakP_ThetaRhoPiChiIota0(_ba, _ke, _si, _go, _mu, CONST8_64(KeccakP1600RoundConstants[i+2]) ); \
775
+ KeccakP_ThetaRhoPiChi1( _ma, _be, _ki, _so, _gu ); \
776
+ KeccakP_ThetaRhoPiChi2( _ga, _me, _bi, _ko, _su ); \
777
+ KeccakP_ThetaRhoPiChi3( _sa, _ge, _mi, _bo, _ku ); \
778
+ KeccakP_ThetaRhoPiChi4( _ka, _se, _gi, _mo, _bu ); \
779
+ \
780
+ KeccakP_ThetaRhoPiChiIota0(_ba, _be, _bi, _bo, _bu, CONST8_64(KeccakP1600RoundConstants[i+3]) ); \
781
+ KeccakP_ThetaRhoPiChi1( _ga, _ge, _gi, _go, _gu ); \
782
+ KeccakP_ThetaRhoPiChi2( _ka, _ke, _ki, _ko, _ku ); \
783
+ KeccakP_ThetaRhoPiChi3( _ma, _me, _mi, _mo, _mu ); \
784
+ KeccakP_ThetaRhoPiChi4( _sa, _se, _si, _so, _su )
785
+
786
+ #define KeccakP_2rounds( i ) \
787
+ KeccakP_ThetaRhoPiChiIota0(_ba, _ke, _si, _go, _mu, CONST8_64(KeccakP1600RoundConstants[i]) ); \
788
+ KeccakP_ThetaRhoPiChi1( _ma, _be, _ki, _so, _gu ); \
789
+ KeccakP_ThetaRhoPiChi2( _ga, _me, _bi, _ko, _su ); \
790
+ KeccakP_ThetaRhoPiChi3( _sa, _ge, _mi, _bo, _ku ); \
791
+ KeccakP_ThetaRhoPiChi4( _ka, _se, _gi, _mo, _bu ); \
792
+ \
793
+ KeccakP_ThetaRhoPiChiIota0(_ba, _be, _bi, _bo, _bu, CONST8_64(KeccakP1600RoundConstants[i+1]) ); \
794
+ KeccakP_ThetaRhoPiChi1( _ga, _ge, _gi, _go, _gu ); \
795
+ KeccakP_ThetaRhoPiChi2( _ka, _ke, _ki, _ko, _ku ); \
796
+ KeccakP_ThetaRhoPiChi3( _ma, _me, _mi, _mo, _mu ); \
797
+ KeccakP_ThetaRhoPiChi4( _sa, _se, _si, _so, _su )
798
+
799
+ #ifdef KeccakP1600times8_fullUnrolling
800
+
801
+ #define rounds12 \
802
+ KeccakP_4rounds( 12 ); \
803
+ KeccakP_4rounds( 16 ); \
804
+ KeccakP_4rounds( 20 )
805
+
806
+ #define rounds24 \
807
+ KeccakP_4rounds( 0 ); \
808
+ KeccakP_4rounds( 4 ); \
809
+ KeccakP_4rounds( 8 ); \
810
+ KeccakP_4rounds( 12 ); \
811
+ KeccakP_4rounds( 16 ); \
812
+ KeccakP_4rounds( 20 )
813
+
814
+ #elif (KeccakP1600times8_unrolling == 4)
815
+
816
+ #define rounds12 \
817
+ i = 12; \
818
+ do { \
819
+ KeccakP_4rounds( i ); \
820
+ } while( (i += 4) < 24 )
821
+
822
+ #define rounds24 \
823
+ i = 0; \
824
+ do { \
825
+ KeccakP_4rounds( i ); \
826
+ } while( (i += 4) < 24 )
827
+
828
+ #elif (KeccakP1600times8_unrolling == 12)
829
+
830
+ #define rounds12 \
831
+ KeccakP_4rounds( 12 ); \
832
+ KeccakP_4rounds( 16 ); \
833
+ KeccakP_4rounds( 20 )
834
+
835
+ #define rounds24 \
836
+ i = 0; \
837
+ do { \
838
+ KeccakP_4rounds( i ); \
839
+ KeccakP_4rounds( i+4 ); \
840
+ KeccakP_4rounds( i+8 ); \
841
+ } while( (i += 12) < 24 )
842
+
843
+ #else
844
+ #error "Unrolling is not correctly specified!"
845
+ #endif
846
+
847
+ #define rounds6 \
848
+ KeccakP_2rounds( 18 ); \
849
+ KeccakP_4rounds( 20 )
850
+
851
+ #define rounds4 \
852
+ KeccakP_4rounds( 20 )
853
+
854
+ #define copyFromState(pState) \
855
+ _ba = pState[ 0]; \
856
+ _be = pState[ 1]; \
857
+ _bi = pState[ 2]; \
858
+ _bo = pState[ 3]; \
859
+ _bu = pState[ 4]; \
860
+ _ga = pState[ 5]; \
861
+ _ge = pState[ 6]; \
862
+ _gi = pState[ 7]; \
863
+ _go = pState[ 8]; \
864
+ _gu = pState[ 9]; \
865
+ _ka = pState[10]; \
866
+ _ke = pState[11]; \
867
+ _ki = pState[12]; \
868
+ _ko = pState[13]; \
869
+ _ku = pState[14]; \
870
+ _ma = pState[15]; \
871
+ _me = pState[16]; \
872
+ _mi = pState[17]; \
873
+ _mo = pState[18]; \
874
+ _mu = pState[19]; \
875
+ _sa = pState[20]; \
876
+ _se = pState[21]; \
877
+ _si = pState[22]; \
878
+ _so = pState[23]; \
879
+ _su = pState[24]
880
+
881
+ #define copyFromState2rounds(pState) \
882
+ _ba = pState[ 0]; \
883
+ _be = pState[16]; /* me */ \
884
+ _bi = pState[ 7]; /* gi */ \
885
+ _bo = pState[23]; /* so */ \
886
+ _bu = pState[14]; /* ku */ \
887
+ _ga = pState[20]; /* sa */ \
888
+ _ge = pState[11]; /* ke */ \
889
+ _gi = pState[ 2]; /* bi */ \
890
+ _go = pState[18]; /* mo */ \
891
+ _gu = pState[ 9]; \
892
+ _ka = pState[15]; /* ma */ \
893
+ _ke = pState[ 6]; /* ge */ \
894
+ _ki = pState[22]; /* si */ \
895
+ _ko = pState[13]; \
896
+ _ku = pState[ 4]; /* bu */ \
897
+ _ma = pState[10]; /* ka */ \
898
+ _me = pState[ 1]; /* be */ \
899
+ _mi = pState[17]; \
900
+ _mo = pState[ 8]; /* go */ \
901
+ _mu = pState[24]; /* su */ \
902
+ _sa = pState[ 5]; /* ga */ \
903
+ _se = pState[21]; \
904
+ _si = pState[12]; /* ki */ \
905
+ _so = pState[ 3]; /* bo */ \
906
+ _su = pState[19] /* mu */
907
+
908
+ #define copyToState(pState) \
909
+ pState[ 0] = _ba; \
910
+ pState[ 1] = _be; \
911
+ pState[ 2] = _bi; \
912
+ pState[ 3] = _bo; \
913
+ pState[ 4] = _bu; \
914
+ pState[ 5] = _ga; \
915
+ pState[ 6] = _ge; \
916
+ pState[ 7] = _gi; \
917
+ pState[ 8] = _go; \
918
+ pState[ 9] = _gu; \
919
+ pState[10] = _ka; \
920
+ pState[11] = _ke; \
921
+ pState[12] = _ki; \
922
+ pState[13] = _ko; \
923
+ pState[14] = _ku; \
924
+ pState[15] = _ma; \
925
+ pState[16] = _me; \
926
+ pState[17] = _mi; \
927
+ pState[18] = _mo; \
928
+ pState[19] = _mu; \
929
+ pState[20] = _sa; \
930
+ pState[21] = _se; \
931
+ pState[22] = _si; \
932
+ pState[23] = _so; \
933
+ pState[24] = _su
934
+
935
+ void KeccakP1600times8_PermuteAll_24rounds(void *states)
936
+ {
937
+ V512 *statesAsLanes = states;
938
+ KeccakP_DeclareVars;
939
+ #ifndef KeccakP1600times8_fullUnrolling
940
+ unsigned int i;
941
+ #endif
942
+
943
+ copyFromState(statesAsLanes);
944
+ rounds24;
945
+ copyToState(statesAsLanes);
946
+ }
947
+
948
+ void KeccakP1600times8_PermuteAll_12rounds(void *states)
949
+ {
950
+ V512 *statesAsLanes = states;
951
+ KeccakP_DeclareVars;
952
+ #if (KeccakP1600times8_unrolling < 12)
953
+ unsigned int i;
954
+ #endif
955
+
956
+ copyFromState(statesAsLanes);
957
+ rounds12;
958
+ copyToState(statesAsLanes);
959
+ }
960
+
961
+ void KeccakP1600times8_PermuteAll_6rounds(void *states)
962
+ {
963
+ V512 *statesAsLanes = states;
964
+ KeccakP_DeclareVars;
965
+
966
+ copyFromState2rounds(statesAsLanes);
967
+ rounds6;
968
+ copyToState(statesAsLanes);
969
+ }
970
+
971
+ void KeccakP1600times8_PermuteAll_4rounds(void *states)
972
+ {
973
+ V512 *statesAsLanes = states;
974
+ KeccakP_DeclareVars;
975
+
976
+ copyFromState(statesAsLanes);
977
+ rounds4;
978
+ copyToState(statesAsLanes);
979
+ }
980
+
981
+ size_t KeccakF1600times8_FastLoop_Absorb(void *states, unsigned int laneCount, unsigned int laneOffsetParallel, unsigned int laneOffsetSerial, const unsigned char *data, size_t dataByteLen)
982
+ {
983
+ size_t dataMinimumSize = (laneOffsetParallel*7 + laneCount)*8;
984
+
985
+ if (laneCount == 21) {
986
+ #ifndef KeccakP1600times8_fullUnrolling
987
+ unsigned int i;
988
+ #endif
989
+ const unsigned char *dataStart = data;
990
+ V512 *statesAsLanes = states;
991
+ const uint64_t *dataAsLanes = (const uint64_t *)data;
992
+ KeccakP_DeclareVars;
993
+ V256 index;
994
+
995
+ copyFromState(statesAsLanes);
996
+ index = LOAD8_32(7*laneOffsetParallel, 6*laneOffsetParallel, 5*laneOffsetParallel, 4*laneOffsetParallel, 3*laneOffsetParallel, 2*laneOffsetParallel, 1*laneOffsetParallel, 0*laneOffsetParallel);
997
+ while(dataByteLen >= dataMinimumSize) {
998
+ #define Add_In( argLane, argIndex ) argLane = XOR(argLane, LOAD_GATHER8_64(index, dataAsLanes+argIndex))
999
+ Add_In( _ba, 0 );
1000
+ Add_In( _be, 1 );
1001
+ Add_In( _bi, 2 );
1002
+ Add_In( _bo, 3 );
1003
+ Add_In( _bu, 4 );
1004
+ Add_In( _ga, 5 );
1005
+ Add_In( _ge, 6 );
1006
+ Add_In( _gi, 7 );
1007
+ Add_In( _go, 8 );
1008
+ Add_In( _gu, 9 );
1009
+ Add_In( _ka, 10 );
1010
+ Add_In( _ke, 11 );
1011
+ Add_In( _ki, 12 );
1012
+ Add_In( _ko, 13 );
1013
+ Add_In( _ku, 14 );
1014
+ Add_In( _ma, 15 );
1015
+ Add_In( _me, 16 );
1016
+ Add_In( _mi, 17 );
1017
+ Add_In( _mo, 18 );
1018
+ Add_In( _mu, 19 );
1019
+ Add_In( _sa, 20 );
1020
+ #undef Add_In
1021
+ rounds24;
1022
+ dataAsLanes += laneOffsetSerial;
1023
+ dataByteLen -= laneOffsetSerial*8;
1024
+ }
1025
+ copyToState(statesAsLanes);
1026
+ return (const unsigned char *)dataAsLanes - dataStart;
1027
+ }
1028
+ else {
1029
+ const unsigned char *dataStart = data;
1030
+
1031
+ while(dataByteLen >= dataMinimumSize) {
1032
+ KeccakP1600times8_AddLanesAll(states, data, laneCount, laneOffsetParallel);
1033
+ KeccakP1600times8_PermuteAll_24rounds(states);
1034
+ data += laneOffsetSerial*8;
1035
+ dataByteLen -= laneOffsetSerial*8;
1036
+ }
1037
+ return data - dataStart;
1038
+ }
1039
+ }
1040
+
1041
+ size_t KeccakP1600times8_12rounds_FastLoop_Absorb(void *states, unsigned int laneCount, unsigned int laneOffsetParallel, unsigned int laneOffsetSerial, const unsigned char *data, size_t dataByteLen)
1042
+ {
1043
+ size_t dataMinimumSize = (laneOffsetParallel*7 + laneCount)*8;
1044
+
1045
+ if (laneCount == 21) {
1046
+ #if (KeccakP1600times8_unrolling < 12)
1047
+ unsigned int i;
1048
+ #endif
1049
+ const unsigned char *dataStart = data;
1050
+ V512 *statesAsLanes = states;
1051
+ const uint64_t *dataAsLanes = (const uint64_t *)data;
1052
+ KeccakP_DeclareVars;
1053
+ V256 index;
1054
+
1055
+ copyFromState(statesAsLanes);
1056
+ index = LOAD8_32(7*laneOffsetParallel, 6*laneOffsetParallel, 5*laneOffsetParallel, 4*laneOffsetParallel, 3*laneOffsetParallel, 2*laneOffsetParallel, 1*laneOffsetParallel, 0*laneOffsetParallel);
1057
+ while(dataByteLen >= dataMinimumSize) {
1058
+ #define Add_In( argLane, argIndex ) argLane = XOR(argLane, LOAD_GATHER8_64(index, dataAsLanes+argIndex))
1059
+ Add_In( _ba, 0 );
1060
+ Add_In( _be, 1 );
1061
+ Add_In( _bi, 2 );
1062
+ Add_In( _bo, 3 );
1063
+ Add_In( _bu, 4 );
1064
+ Add_In( _ga, 5 );
1065
+ Add_In( _ge, 6 );
1066
+ Add_In( _gi, 7 );
1067
+ Add_In( _go, 8 );
1068
+ Add_In( _gu, 9 );
1069
+ Add_In( _ka, 10 );
1070
+ Add_In( _ke, 11 );
1071
+ Add_In( _ki, 12 );
1072
+ Add_In( _ko, 13 );
1073
+ Add_In( _ku, 14 );
1074
+ Add_In( _ma, 15 );
1075
+ Add_In( _me, 16 );
1076
+ Add_In( _mi, 17 );
1077
+ Add_In( _mo, 18 );
1078
+ Add_In( _mu, 19 );
1079
+ Add_In( _sa, 20 );
1080
+ #undef Add_In
1081
+ rounds12;
1082
+ dataAsLanes += laneOffsetSerial;
1083
+ dataByteLen -= laneOffsetSerial*8;
1084
+ }
1085
+ copyToState(statesAsLanes);
1086
+ return (const unsigned char *)dataAsLanes - dataStart;
1087
+ }
1088
+ else {
1089
+ const unsigned char *dataStart = data;
1090
+
1091
+ while(dataByteLen >= dataMinimumSize) {
1092
+ KeccakP1600times8_AddLanesAll(states, data, laneCount, laneOffsetParallel);
1093
+ KeccakP1600times8_PermuteAll_12rounds(states);
1094
+ data += laneOffsetSerial*8;
1095
+ dataByteLen -= laneOffsetSerial*8;
1096
+ }
1097
+ return data - dataStart;
1098
+ }
1099
+ }
1100
+
1101
+ /* ------------------------------------------------------------------------- */
1102
+
1103
+ #define LOAD(p) _mm512_loadu_si512(p)
1104
+ #define XOReq(a,b) a = _mm512_xor_si512(a,b)
1105
+ #define ZERO() _mm512_setzero_si512()
1106
+ #define CONST_64(a) _mm512_set1_epi64(a)
1107
+
1108
+ #define chunkSize 8192
1109
+ #define rateInBytes 168
1110
+
1111
+ #define initializeState(X) \
1112
+ X##ba = ZERO(); \
1113
+ X##be = ZERO(); \
1114
+ X##bi = ZERO(); \
1115
+ X##bo = ZERO(); \
1116
+ X##bu = ZERO(); \
1117
+ X##ga = ZERO(); \
1118
+ X##ge = ZERO(); \
1119
+ X##gi = ZERO(); \
1120
+ X##go = ZERO(); \
1121
+ X##gu = ZERO(); \
1122
+ X##ka = ZERO(); \
1123
+ X##ke = ZERO(); \
1124
+ X##ki = ZERO(); \
1125
+ X##ko = ZERO(); \
1126
+ X##ku = ZERO(); \
1127
+ X##ma = ZERO(); \
1128
+ X##me = ZERO(); \
1129
+ X##mi = ZERO(); \
1130
+ X##mo = ZERO(); \
1131
+ X##mu = ZERO(); \
1132
+ X##sa = ZERO(); \
1133
+ X##se = ZERO(); \
1134
+ X##si = ZERO(); \
1135
+ X##so = ZERO(); \
1136
+ X##su = ZERO(); \
1137
+
1138
+ #define LoadAndTranspose8(dataAsLanes, offset) \
1139
+ t0 = LOAD((dataAsLanes) + (offset) + 0*chunkSize/8); \
1140
+ t1 = LOAD((dataAsLanes) + (offset) + 1*chunkSize/8); \
1141
+ t2 = LOAD((dataAsLanes) + (offset) + 2*chunkSize/8); \
1142
+ t3 = LOAD((dataAsLanes) + (offset) + 3*chunkSize/8); \
1143
+ t4 = LOAD((dataAsLanes) + (offset) + 4*chunkSize/8); \
1144
+ t5 = LOAD((dataAsLanes) + (offset) + 5*chunkSize/8); \
1145
+ t6 = LOAD((dataAsLanes) + (offset) + 6*chunkSize/8); \
1146
+ t7 = LOAD((dataAsLanes) + (offset) + 7*chunkSize/8); \
1147
+ r0 = _mm512_unpacklo_epi64(t0, t1); \
1148
+ r1 = _mm512_unpackhi_epi64(t0, t1); \
1149
+ r2 = _mm512_unpacklo_epi64(t2, t3); \
1150
+ r3 = _mm512_unpackhi_epi64(t2, t3); \
1151
+ r4 = _mm512_unpacklo_epi64(t4, t5); \
1152
+ r5 = _mm512_unpackhi_epi64(t4, t5); \
1153
+ r6 = _mm512_unpacklo_epi64(t6, t7); \
1154
+ r7 = _mm512_unpackhi_epi64(t6, t7); \
1155
+ t0 = _mm512_shuffle_i32x4(r0, r2, 0x88); \
1156
+ t1 = _mm512_shuffle_i32x4(r1, r3, 0x88); \
1157
+ t2 = _mm512_shuffle_i32x4(r0, r2, 0xdd); \
1158
+ t3 = _mm512_shuffle_i32x4(r1, r3, 0xdd); \
1159
+ t4 = _mm512_shuffle_i32x4(r4, r6, 0x88); \
1160
+ t5 = _mm512_shuffle_i32x4(r5, r7, 0x88); \
1161
+ t6 = _mm512_shuffle_i32x4(r4, r6, 0xdd); \
1162
+ t7 = _mm512_shuffle_i32x4(r5, r7, 0xdd); \
1163
+ r0 = _mm512_shuffle_i32x4(t0, t4, 0x88); \
1164
+ r1 = _mm512_shuffle_i32x4(t1, t5, 0x88); \
1165
+ r2 = _mm512_shuffle_i32x4(t2, t6, 0x88); \
1166
+ r3 = _mm512_shuffle_i32x4(t3, t7, 0x88); \
1167
+ r4 = _mm512_shuffle_i32x4(t0, t4, 0xdd); \
1168
+ r5 = _mm512_shuffle_i32x4(t1, t5, 0xdd); \
1169
+ r6 = _mm512_shuffle_i32x4(t2, t6, 0xdd); \
1170
+ r7 = _mm512_shuffle_i32x4(t3, t7, 0xdd); \
1171
+
1172
+ #define XORdata16(X, index, dataAsLanes) \
1173
+ LoadAndTranspose8(dataAsLanes, 0) \
1174
+ XOReq(X##ba, r0); \
1175
+ XOReq(X##be, r1); \
1176
+ XOReq(X##bi, r2); \
1177
+ XOReq(X##bo, r3); \
1178
+ XOReq(X##bu, r4); \
1179
+ XOReq(X##ga, r5); \
1180
+ XOReq(X##ge, r6); \
1181
+ XOReq(X##gi, r7); \
1182
+ LoadAndTranspose8(dataAsLanes, 8) \
1183
+ XOReq(X##go, r0); \
1184
+ XOReq(X##gu, r1); \
1185
+ XOReq(X##ka, r2); \
1186
+ XOReq(X##ke, r3); \
1187
+ XOReq(X##ki, r4); \
1188
+ XOReq(X##ko, r5); \
1189
+ XOReq(X##ku, r6); \
1190
+ XOReq(X##ma, r7); \
1191
+
1192
+ #define XORdata21(X, index, dataAsLanes) \
1193
+ XORdata16(X, index, dataAsLanes) \
1194
+ XOReq(X##me, LOAD_GATHER8_64(index, (dataAsLanes) + 16)); \
1195
+ XOReq(X##mi, LOAD_GATHER8_64(index, (dataAsLanes) + 17)); \
1196
+ XOReq(X##mo, LOAD_GATHER8_64(index, (dataAsLanes) + 18)); \
1197
+ XOReq(X##mu, LOAD_GATHER8_64(index, (dataAsLanes) + 19)); \
1198
+ XOReq(X##sa, LOAD_GATHER8_64(index, (dataAsLanes) + 20)); \
1199
+
1200
+ void KeccakP1600times8_K12ProcessLeaves(const unsigned char *input, unsigned char *output)
1201
+ {
1202
+ KeccakP_DeclareVars;
1203
+ unsigned int j;
1204
+ const uint64_t *outputAsLanes = (const uint64_t *)output;
1205
+ __m256i index;
1206
+ __m512i t0, t1, t2, t3, t4, t5, t6, t7;
1207
+ __m512i r0, r1, r2, r3, r4, r5, r6, r7;
1208
+
1209
+ initializeState(_);
1210
+
1211
+ index = LOAD8_32(7*(chunkSize / 8), 6*(chunkSize / 8), 5*(chunkSize / 8), 4*(chunkSize / 8), 3*(chunkSize / 8), 2*(chunkSize / 8), 1*(chunkSize / 8), 0*(chunkSize / 8));
1212
+ for(j = 0; j < (chunkSize - rateInBytes); j += rateInBytes) {
1213
+ XORdata21(_, index, (const uint64_t *)input);
1214
+ rounds12
1215
+ input += rateInBytes;
1216
+ }
1217
+
1218
+ XORdata16(_, index, (const uint64_t *)input);
1219
+ XOReq(_me, CONST_64(0x0BULL));
1220
+ XOReq(_sa, CONST_64(0x8000000000000000ULL));
1221
+ rounds12
1222
+
1223
+ index = LOAD8_32(7*4, 6*4, 5*4, 4*4, 3*4, 2*4, 1*4, 0*4);
1224
+ STORE_SCATTER8_64(outputAsLanes+0, index, _ba);
1225
+ STORE_SCATTER8_64(outputAsLanes+1, index, _be);
1226
+ STORE_SCATTER8_64(outputAsLanes+2, index, _bi);
1227
+ STORE_SCATTER8_64(outputAsLanes+3, index, _bo);
1228
+ }
1229
+
1230
+ #undef LOAD
1231
+ #undef XOReq
1232
+ #undef ZERO
1233
+ #undef CONST_64
1234
+ #undef chunkSize
1235
+ #undef rateInBytes
1236
+
1237
+ /* ------------------------------------------------------------------------- */
1238
+
1239
+ /* Remap lanes to start after two rounds */
1240
+ #define Iba _ba
1241
+ #define Ibe _me
1242
+ #define Ibi _gi
1243
+ #define Ibo _so
1244
+ #define Ibu _ku
1245
+ #define Iga _sa
1246
+ #define Ige _ke
1247
+ #define Igi _bi
1248
+ #define Igo _mo
1249
+ #define Igu _gu
1250
+ #define Ika _ma
1251
+ #define Ike _ge
1252
+ #define Iki _si
1253
+ #define Iko _ko
1254
+ #define Iku _bu
1255
+ #define Ima _ka
1256
+ #define Ime _be
1257
+ #define Imi _mi
1258
+ #define Imo _go
1259
+ #define Imu _su
1260
+ #define Isa _ga
1261
+ #define Ise _se
1262
+ #define Isi _ki
1263
+ #define Iso _bo
1264
+ #define Isu _mu
1265
+
1266
+ #define LoadInput(argIndex) _mm512_i32gather_epi64(gather, (const long long int *)&in64[argIndex], 8)
1267
+ #define AddInput(argIndex) XOR( LoadInput(argIndex), CONST8_64(kRoll[argIndex]))
1268
+
1269
+
1270
+ ALIGN(64) static const uint64_t oLow256[] = { 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3 };
1271
+ ALIGN(64) static const uint64_t oHigh256[] = { 4, 5, 6, 7, 8+4, 8+5, 8+6, 8+7 };
1272
+
1273
+ ALIGN(64) static const uint64_t oLow128[] = { 0, 1, 8+0, 8+1, 4, 5, 8+4, 8+5 };
1274
+ ALIGN(64) static const uint64_t oHigh128[] = { 2, 3, 8+2, 8+3, 6, 7, 8+6, 8+7 };
1275
+
1276
+ ALIGN(64) static const uint64_t oLow64[] = { 0, 8+0, 2, 8+2, 4, 8+4, 6, 8+6 };
1277
+ ALIGN(64) static const uint64_t oHigh64[] = { 1, 8+1, 3, 8+3, 5, 8+5, 7, 8+7 };
1278
+
1279
+ ALIGN(64) static const uint64_t o01234_012[] = { 0, 1, 2, 3, 4, 8+0, 8+1, 8+2 };
1280
+ ALIGN(64) static const uint64_t o1234_0123[] = { 1, 2, 3, 4, 8+0, 8+1, 8+2, 8+3 };
1281
+ ALIGN(64) static const uint64_t o1234567_0[] = { 1, 2, 3, 4, 5, 6, 7, 8+0 };
1282
+ ALIGN(64) static const uint64_t o1234567_3[] = { 1, 2, 3, 4, 5, 6, 7, 8+3 };
1283
+ ALIGN(64) static const uint64_t o1234567_4[] = { 1, 2, 3, 4, 5, 6, 7, 8+4 };
1284
+ ALIGN(64) static const uint64_t o234567_45[] = { 2, 3, 4, 5, 6, 7, 8+4, 8+5 };
1285
+ ALIGN(64) static const uint64_t o34567_456[] = { 3, 4, 5, 6, 7, 8+4, 8+5, 8+6 };
1286
+
1287
+ ALIGN(32) static const uint32_t oGatherScatter[]= {0*25, 1*25, 2*25, 3*25, 4*25, 5*25, 6*25, 7*25};
1288
+
1289
+ #if defined(__i386__) || defined(_M_IX86)
1290
+ #define _mm256_extract_epi64(a, index) \
1291
+ ((uint64_t)_mm256_extract_epi32((a), (index)*2) || ((uint64_t)_mm256_extract_epi32((a), (index)*2+1) << 32))
1292
+ #endif
1293
+
1294
+ size_t KeccakP1600times8_KravatteCompress(uint64_t *xAccu, uint64_t *kRoll, const unsigned char *input, size_t inputByteLen)
1295
+ {
1296
+ #if !defined(KeccakP1600times4_fullUnrolling)
1297
+ unsigned int i;
1298
+ #endif
1299
+ uint64_t *in64 = (uint64_t *)input;
1300
+ size_t nBlocks = inputByteLen / (8 * 200);
1301
+ KeccakP_DeclareVars;
1302
+ V512 x01234567, x12345678;
1303
+ V512 Xba, Xbe, Xbi, Xbo, Xbu;
1304
+ V512 Xga, Xge, Xgi, Xgo, Xgu;
1305
+ V512 Xka, Xke, Xki, Xko, Xku;
1306
+ V512 Xma, Xme, Xmi, Xmo, Xmu;
1307
+ V512 Xsa, Xse, Xsi, Xso, Xsu;
1308
+ V256 v1;
1309
+ V512 p1, p2;
1310
+ V256 gather = *(V256*)oGatherScatter;
1311
+
1312
+ /* Clear internal X accu */
1313
+ Xba = _mm512_setzero_si512();
1314
+ Xbe = _mm512_setzero_si512();
1315
+ Xbi = _mm512_setzero_si512();
1316
+ Xbo = _mm512_setzero_si512();
1317
+ Xbu = _mm512_setzero_si512();
1318
+ Xga = _mm512_setzero_si512();
1319
+ Xge = _mm512_setzero_si512();
1320
+ Xgi = _mm512_setzero_si512();
1321
+ Xgo = _mm512_setzero_si512();
1322
+ Xgu = _mm512_setzero_si512();
1323
+ Xka = _mm512_setzero_si512();
1324
+ Xke = _mm512_setzero_si512();
1325
+ Xki = _mm512_setzero_si512();
1326
+ Xko = _mm512_setzero_si512();
1327
+ Xku = _mm512_setzero_si512();
1328
+ Xma = _mm512_setzero_si512();
1329
+ Xme = _mm512_setzero_si512();
1330
+ Xmi = _mm512_setzero_si512();
1331
+ Xmo = _mm512_setzero_si512();
1332
+ Xmu = _mm512_setzero_si512();
1333
+ Xsa = _mm512_setzero_si512();
1334
+ Xse = _mm512_setzero_si512();
1335
+ Xsi = _mm512_setzero_si512();
1336
+ Xso = _mm512_setzero_si512();
1337
+ Xsu = _mm512_setzero_si512();
1338
+
1339
+ /* prepare 8 lanes for roll-c */
1340
+ x01234567 = _mm512_maskz_loadu_epi64(0x1F, &kRoll[20]); /* 5 lanes ok */
1341
+ _ba = _mm512_maskz_loadu_epi64(0x0F, &kRoll[21]); /* 4 lanes ok */
1342
+ _be = XOR3(ROL(x01234567, 7), _ba, _mm512_srli_epi64(_ba, 3));
1343
+ x01234567 = _mm512_permutex2var_epi64(x01234567, *(V512*)o01234_012, _be);
1344
+ x12345678 = _mm512_permutex2var_epi64(x01234567, *(V512*)o1234_0123, _be);
1345
+
1346
+ do {
1347
+ Iba = AddInput( 0);
1348
+ Ibe = AddInput( 1);
1349
+ Ibi = AddInput( 2);
1350
+ Ibo = AddInput( 3);
1351
+ Ibu = AddInput( 4);
1352
+ Iga = AddInput( 5);
1353
+ Ige = AddInput( 6);
1354
+ Igi = AddInput( 7);
1355
+ Igo = AddInput( 8);
1356
+ Igu = AddInput( 9);
1357
+ Ika = AddInput(10);
1358
+ Ike = AddInput(11);
1359
+ Iki = AddInput(12);
1360
+ Iko = AddInput(13);
1361
+ Iku = AddInput(14);
1362
+ Ima = AddInput(15);
1363
+ Ime = AddInput(16);
1364
+ Imi = AddInput(17);
1365
+ Imo = AddInput(18);
1366
+ Imu = AddInput(19);
1367
+
1368
+ /* Roll-c */
1369
+ Isa = x01234567;
1370
+ Ise = x12345678;
1371
+ Isu = XOR3(ROL(x01234567, 7), x12345678, _mm512_srli_epi64(x12345678, 3));
1372
+ Ise = _mm512_permutex2var_epi64(x01234567, *(V512*)o1234567_3, Isu);
1373
+ Isi = _mm512_permutex2var_epi64(Ise, *(V512*)o1234567_4, Isu);
1374
+ Iso = _mm512_permutex2var_epi64(Ise, *(V512*)o234567_45, Isu);
1375
+ Isu = _mm512_permutex2var_epi64(Ise, *(V512*)o34567_456, Isu);
1376
+
1377
+ x01234567 = XOR3(ROL(Iso, 7), Isu, _mm512_srli_epi64(Isu, 3));
1378
+ x12345678 = _mm512_permutex2var_epi64(x01234567, *(V512*)o1234567_4, x01234567);
1379
+
1380
+ XOReq512(Isa, LoadInput(20));
1381
+ XOReq512(Ise, LoadInput(21));
1382
+ XOReq512(Isi, LoadInput(22));
1383
+ XOReq512(Iso, LoadInput(23));
1384
+ XOReq512(Isu, LoadInput(24));
1385
+
1386
+ rounds6
1387
+ Dump( "P-out", _);
1388
+
1389
+ /* Accumulate in X */
1390
+ XOReq512(Xba, _ba);
1391
+ XOReq512(Xbe, _be);
1392
+ XOReq512(Xbi, _bi);
1393
+ XOReq512(Xbo, _bo);
1394
+ XOReq512(Xbu, _bu);
1395
+ XOReq512(Xga, _ga);
1396
+ XOReq512(Xge, _ge);
1397
+ XOReq512(Xgi, _gi);
1398
+ XOReq512(Xgo, _go);
1399
+ XOReq512(Xgu, _gu);
1400
+ XOReq512(Xka, _ka);
1401
+ XOReq512(Xke, _ke);
1402
+ XOReq512(Xki, _ki);
1403
+ XOReq512(Xko, _ko);
1404
+ XOReq512(Xku, _ku);
1405
+ XOReq512(Xma, _ma);
1406
+ XOReq512(Xme, _me);
1407
+ XOReq512(Xmi, _mi);
1408
+ XOReq512(Xmo, _mo);
1409
+ XOReq512(Xmu, _mu);
1410
+ XOReq512(Xsa, _sa);
1411
+ XOReq512(Xse, _se);
1412
+ XOReq512(Xsi, _si);
1413
+ XOReq512(Xso, _so);
1414
+ XOReq512(Xsu, _su);
1415
+ Dump( "X", X);
1416
+
1417
+ in64 += 8 * 25;
1418
+ }
1419
+ while(--nBlocks != 0);
1420
+
1421
+ /* Add horizontally Xba ... Xgi Reduce from lanes 8 to 4 */
1422
+ p1 = *(V512*)oLow256;
1423
+ p2 = *(V512*)oHigh256;
1424
+ Xba = XOR(_mm512_permutex2var_epi64(Xba, p1, Xbu), _mm512_permutex2var_epi64(Xba, p2, Xbu));
1425
+ Xbe = XOR(_mm512_permutex2var_epi64(Xbe, p1, Xga), _mm512_permutex2var_epi64(Xbe, p2, Xga));
1426
+ Xbi = XOR(_mm512_permutex2var_epi64(Xbi, p1, Xge), _mm512_permutex2var_epi64(Xbi, p2, Xge));
1427
+ Xbo = XOR(_mm512_permutex2var_epi64(Xbo, p1, Xgi), _mm512_permutex2var_epi64(Xbo, p2, Xgi));
1428
+
1429
+ /* Add horizontally Xgo ... Xma Reduce from lanes 8 to 4 */
1430
+ Xgo = XOR(_mm512_permutex2var_epi64(Xgo, p1, Xki), _mm512_permutex2var_epi64(Xgo, p2, Xki));
1431
+ Xgu = XOR(_mm512_permutex2var_epi64(Xgu, p1, Xko), _mm512_permutex2var_epi64(Xgu, p2, Xko));
1432
+ Xka = XOR(_mm512_permutex2var_epi64(Xka, p1, Xku), _mm512_permutex2var_epi64(Xka, p2, Xku));
1433
+ Xke = XOR(_mm512_permutex2var_epi64(Xke, p1, Xma), _mm512_permutex2var_epi64(Xke, p2, Xma));
1434
+
1435
+ /* Add horizontally Xme ... Xso Reduce from lanes 8 to 4 */
1436
+ Xme = XOR(_mm512_permutex2var_epi64(Xme, p1, Xsa), _mm512_permutex2var_epi64(Xme, p2, Xsa));
1437
+ Xmi = XOR(_mm512_permutex2var_epi64(Xmi, p1, Xse), _mm512_permutex2var_epi64(Xmi, p2, Xse));
1438
+ Xmo = XOR(_mm512_permutex2var_epi64(Xmo, p1, Xsi), _mm512_permutex2var_epi64(Xmo, p2, Xsi));
1439
+ Xmu = XOR(_mm512_permutex2var_epi64(Xmu, p1, Xso), _mm512_permutex2var_epi64(Xmu, p2, Xso));
1440
+
1441
+ /* Add horizontally Xba ... Xbo Reduce from lanes 4 to 2 */
1442
+ p1 = *(V512*)oLow128;
1443
+ p2 = *(V512*)oHigh128;
1444
+ Xba = XOR(_mm512_permutex2var_epi64(Xba, p1, Xbi), _mm512_permutex2var_epi64(Xba, p2, Xbi));
1445
+ Xbe = XOR(_mm512_permutex2var_epi64(Xbe, p1, Xbo), _mm512_permutex2var_epi64(Xbe, p2, Xbo));
1446
+
1447
+ /* Add horizontally Xgo ... Xke Reduce from lanes 4 to 2 */
1448
+ Xgo = XOR(_mm512_permutex2var_epi64(Xgo, p1, Xka), _mm512_permutex2var_epi64(Xgo, p2, Xka));
1449
+ Xgu = XOR(_mm512_permutex2var_epi64(Xgu, p1, Xke), _mm512_permutex2var_epi64(Xgu, p2, Xke));
1450
+
1451
+ /* Add horizontally Xme ... Xmu Reduce from lanes 4 to 2 */
1452
+ Xme = XOR(_mm512_permutex2var_epi64(Xme, p1, Xmo), _mm512_permutex2var_epi64(Xme, p2, Xmo));
1453
+ Xmi = XOR(_mm512_permutex2var_epi64(Xmi, p1, Xmu), _mm512_permutex2var_epi64(Xmi, p2, Xmu));
1454
+
1455
+ /* Add horizontally Xba ... Xbe Reduce from lanes 2 to 1 */
1456
+ p1 = *(V512*)oLow64;
1457
+ p2 = *(V512*)oHigh64;
1458
+ Xba = XOR(_mm512_permutex2var_epi64(Xba, p1, Xbe), _mm512_permutex2var_epi64(Xba, p2, Xbe));
1459
+
1460
+ /* Add horizontally Xgo ... Xgu Reduce from lanes 2 to 1 */
1461
+ Xgo = XOR(_mm512_permutex2var_epi64(Xgo, p1, Xgu), _mm512_permutex2var_epi64(Xgo, p2, Xgu));
1462
+
1463
+ /* Add horizontally Xme ... Xmi Reduce from lanes 2 to 1 */
1464
+ Xme = XOR(_mm512_permutex2var_epi64(Xme, p1, Xmi), _mm512_permutex2var_epi64(Xme, p2, Xmi));
1465
+
1466
+ /* Add and store in xAccu */
1467
+ Xba = XOR( Xba, LOAD512u(xAccu[0]));
1468
+ Xgo = XOR( Xgo, LOAD512u(xAccu[8]));
1469
+ Xme = XOR( Xme, LOAD512u(xAccu[16]));
1470
+ _mm512_storeu_si512((V512*)&xAccu[0], Xba);
1471
+ _mm512_storeu_si512((V512*)&xAccu[8], Xgo);
1472
+ _mm512_storeu_si512((V512*)&xAccu[16], Xme);
1473
+
1474
+ /* Add horizontally Xsu */
1475
+ v1 = _mm256_xor_si256( _mm512_extracti64x4_epi64(Xsu, 0), _mm512_extracti64x4_epi64(Xsu, 1));
1476
+ v1 = _mm256_xor_si256( v1, _mm256_permute4x64_epi64(v1, 0xEE));
1477
+ xAccu[24] ^= _mm256_extract_epi64(v1, 0) ^ _mm256_extract_epi64(v1, 1);
1478
+ DumpMem("xAccu", xAccu, 5*5);
1479
+
1480
+ /* Store new kRoll */
1481
+ _mm512_mask_storeu_epi64(&kRoll[20], 0x1F, x01234567);
1482
+ DumpMem("Next kRoll", kRoll+20, 5);
1483
+
1484
+ return (size_t)in64 - (size_t)input;
1485
+ }
1486
+
1487
+ #undef LoadInput
1488
+ #undef AddInput
1489
+
1490
+ ALIGN(64) static const uint64_t o1234567_6[] = { 1, 2, 3, 4, 5, 6, 7, 8+6 };
1491
+ ALIGN(64) static const uint64_t o234567_01[] = { 2, 3, 4, 5, 6, 7, 8+0, 8+1 };
1492
+ ALIGN(64) static const uint64_t o34567_012[] = { 3, 4, 5, 6, 7, 8+0, 8+1, 8+2 };
1493
+ ALIGN(64) static const uint64_t o4567_0123[] = { 4, 5, 6, 7, 8+0, 8+1, 8+2, 8+3 };
1494
+ ALIGN(64) static const uint64_t o567_01234[] = { 5, 6, 7, 8+0, 8+1, 8+2, 8+3, 8+4 };
1495
+ ALIGN(64) static const uint64_t o67_012345[] = { 6, 7, 8+0, 8+1, 8+2, 8+3, 8+4, 8+5 };
1496
+ ALIGN(64) static const uint64_t o7_0123456[] = { 7, 8+0, 8+1, 8+2, 8+3, 8+4, 8+5, 8+6 };
1497
+
1498
+ size_t KeccakP1600times8_KravatteExpand(uint64_t *yAccu, const uint64_t *kRoll, unsigned char *output, size_t outputByteLen)
1499
+ {
1500
+ uint64_t *o64 = (uint64_t *)output;
1501
+ size_t nBlocks = outputByteLen / (8 * 200);
1502
+ KeccakP_DeclareVars;
1503
+ #if !defined(KeccakP1600times4_fullUnrolling)
1504
+ unsigned int i;
1505
+ #endif
1506
+ V512 x01234567, x23456789;
1507
+ V256 scatter = *(V256*)oGatherScatter;
1508
+
1509
+ x01234567 = LOAD512u(yAccu[15]);
1510
+ x23456789 = LOAD512u(yAccu[17]);
1511
+
1512
+ do {
1513
+ Iba = CONST8_64(yAccu[0]);
1514
+ Ibe = CONST8_64(yAccu[1]);
1515
+ Ibi = CONST8_64(yAccu[2]);
1516
+ Ibo = CONST8_64(yAccu[3]);
1517
+ Ibu = CONST8_64(yAccu[4]);
1518
+
1519
+ Iga = CONST8_64(yAccu[5]);
1520
+ Ige = CONST8_64(yAccu[6]);
1521
+ Igi = CONST8_64(yAccu[7]);
1522
+ Igo = CONST8_64(yAccu[8]);
1523
+ Igu = CONST8_64(yAccu[9]);
1524
+
1525
+ Ika = CONST8_64(yAccu[10]);
1526
+ Ike = CONST8_64(yAccu[11]);
1527
+ Iki = CONST8_64(yAccu[12]);
1528
+ Iko = CONST8_64(yAccu[13]);
1529
+ Iku = CONST8_64(yAccu[14]);
1530
+
1531
+ /* roll-e */
1532
+ Ima = x01234567;
1533
+ Ime = _mm512_permutex2var_epi64(x01234567, *(V512*)o1234567_6, x23456789);
1534
+ Imi = x23456789;
1535
+
1536
+ x23456789 = XOR3(ROL(Ima, 7), ROL(Ime, 18), _mm512_and_si512(Imi, _mm512_srli_epi64(Ime, 1)));
1537
+ Imo = _mm512_permutex2var_epi64(Imi, *(V512*)o1234567_0, x23456789);
1538
+ Imu = _mm512_permutex2var_epi64(Imi, *(V512*)o234567_01, x23456789);
1539
+ Isa = _mm512_permutex2var_epi64(Imi, *(V512*)o34567_012, x23456789);
1540
+ Ise = _mm512_permutex2var_epi64(Imi, *(V512*)o4567_0123, x23456789);
1541
+ Isi = _mm512_permutex2var_epi64(Imi, *(V512*)o567_01234, x23456789);
1542
+ Iso = _mm512_permutex2var_epi64(Imi, *(V512*)o67_012345, x23456789);
1543
+ Isu = _mm512_permutex2var_epi64(Imi, *(V512*)o7_0123456, x23456789);
1544
+ x01234567 = Iso;
1545
+ Dump( "After roll-e", I);
1546
+
1547
+ rounds6
1548
+
1549
+ /* Add kRoll */
1550
+ _ba = XOR(_ba, CONST8_64(kRoll[0]));
1551
+ _be = XOR(_be, CONST8_64(kRoll[1]));
1552
+ _bi = XOR(_bi, CONST8_64(kRoll[2]));
1553
+ _bo = XOR(_bo, CONST8_64(kRoll[3]));
1554
+ _bu = XOR(_bu, CONST8_64(kRoll[4]));
1555
+ _ga = XOR(_ga, CONST8_64(kRoll[5]));
1556
+ _ge = XOR(_ge, CONST8_64(kRoll[6]));
1557
+ _gi = XOR(_gi, CONST8_64(kRoll[7]));
1558
+ _go = XOR(_go, CONST8_64(kRoll[8]));
1559
+ _gu = XOR(_gu, CONST8_64(kRoll[9]));
1560
+ _ka = XOR(_ka, CONST8_64(kRoll[10]));
1561
+ _ke = XOR(_ke, CONST8_64(kRoll[11]));
1562
+ _ki = XOR(_ki, CONST8_64(kRoll[12]));
1563
+ _ko = XOR(_ko, CONST8_64(kRoll[13]));
1564
+ _ku = XOR(_ku, CONST8_64(kRoll[14]));
1565
+ _ma = XOR(_ma, CONST8_64(kRoll[15]));
1566
+ _me = XOR(_me, CONST8_64(kRoll[16]));
1567
+ _mi = XOR(_mi, CONST8_64(kRoll[17]));
1568
+ _mo = XOR(_mo, CONST8_64(kRoll[18]));
1569
+ _mu = XOR(_mu, CONST8_64(kRoll[19]));
1570
+ _sa = XOR(_sa, CONST8_64(kRoll[20]));
1571
+ _se = XOR(_se, CONST8_64(kRoll[21]));
1572
+ _si = XOR(_si, CONST8_64(kRoll[22]));
1573
+ _so = XOR(_so, CONST8_64(kRoll[23]));
1574
+ _su = XOR(_su, CONST8_64(kRoll[24]));
1575
+ Dump( "After add kRoll", _);
1576
+
1577
+ /* Extract */
1578
+ STORE_SCATTER8_64(o64+0, scatter, _ba);
1579
+ STORE_SCATTER8_64(o64+1, scatter, _be);
1580
+ STORE_SCATTER8_64(o64+2, scatter, _bi);
1581
+ STORE_SCATTER8_64(o64+3, scatter, _bo);
1582
+ STORE_SCATTER8_64(o64+4, scatter, _bu);
1583
+ STORE_SCATTER8_64(o64+5, scatter, _ga);
1584
+ STORE_SCATTER8_64(o64+6, scatter, _ge);
1585
+ STORE_SCATTER8_64(o64+7, scatter, _gi);
1586
+ STORE_SCATTER8_64(o64+8, scatter, _go);
1587
+ STORE_SCATTER8_64(o64+9, scatter, _gu);
1588
+ STORE_SCATTER8_64(o64+10, scatter, _ka);
1589
+ STORE_SCATTER8_64(o64+11, scatter, _ke);
1590
+ STORE_SCATTER8_64(o64+12, scatter, _ki);
1591
+ STORE_SCATTER8_64(o64+13, scatter, _ko);
1592
+ STORE_SCATTER8_64(o64+14, scatter, _ku);
1593
+ STORE_SCATTER8_64(o64+15, scatter, _ma);
1594
+ STORE_SCATTER8_64(o64+16, scatter, _me);
1595
+ STORE_SCATTER8_64(o64+17, scatter, _mi);
1596
+ STORE_SCATTER8_64(o64+18, scatter, _mo);
1597
+ STORE_SCATTER8_64(o64+19, scatter, _mu);
1598
+ STORE_SCATTER8_64(o64+20, scatter, _sa);
1599
+ STORE_SCATTER8_64(o64+21, scatter, _se);
1600
+ STORE_SCATTER8_64(o64+22, scatter, _si);
1601
+ STORE_SCATTER8_64(o64+23, scatter, _so);
1602
+ STORE_SCATTER8_64(o64+24, scatter, _su);
1603
+ DumpMem("Output", o64, 8*25);
1604
+
1605
+ o64 += 8 * 25;
1606
+ }
1607
+ while(--nBlocks != 0);
1608
+
1609
+ /* Store new yAccu */
1610
+ _mm512_mask_storeu_epi64(&yAccu[15], 0xFF, x01234567);
1611
+ _mm512_mask_storeu_epi64(&yAccu[17], 0xC0, x23456789);
1612
+ DumpMem("yAccu", yAccu, 25);
1613
+
1614
+ return (size_t)o64 - (size_t)output;
1615
+ }