digest-kangarootwelve 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +51 -11
  3. data/Rakefile +2 -2
  4. data/digest-kangarootwelve.gemspec +322 -42
  5. data/ext/digest/kangarootwelve/ext.c +1 -1
  6. data/ext/digest/kangarootwelve/extconf.rb +13 -1
  7. data/ext/digest/kangarootwelve/keccak/armv6m/KangarooTwelve.link.c +1 -0
  8. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakDuplexWidth1600.link.c +1 -0
  9. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakP-1600-SnP.h +36 -0
  10. data/ext/digest/kangarootwelve/{KeccakP-1600-times2-SnP.h → keccak/armv6m/KeccakP-1600-times2-SnP.h} +10 -10
  11. data/ext/digest/kangarootwelve/{KeccakP-1600-times2-on1.c → keccak/armv6m/KeccakP-1600-times2-on1.c} +13 -7
  12. data/ext/digest/kangarootwelve/{KeccakP-1600-times4-SnP.h → keccak/armv6m/KeccakP-1600-times4-SnP.h} +10 -10
  13. data/ext/digest/kangarootwelve/{KeccakP-1600-times4-on1.c → keccak/armv6m/KeccakP-1600-times4-on1.c} +13 -7
  14. data/ext/digest/kangarootwelve/{KeccakP-1600-times8-SnP.h → keccak/armv6m/KeccakP-1600-times8-SnP.h} +10 -10
  15. data/ext/digest/kangarootwelve/{KeccakP-1600-times8-on1.c → keccak/armv6m/KeccakP-1600-times8-on1.c} +13 -7
  16. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakP-1600-u2-32bi-armv6m-le-gcc.s +1334 -0
  17. data/ext/digest/kangarootwelve/keccak/armv6m/KeccakSpongeWidth1600.link.c +1 -0
  18. data/ext/digest/kangarootwelve/{PlSnP-Fallback.inc → keccak/armv6m/PlSnP-Fallback.inc} +11 -7
  19. data/ext/digest/kangarootwelve/keccak/armv6m/ext.link.c +1 -0
  20. data/ext/digest/kangarootwelve/keccak/armv7a/KangarooTwelve.link.c +1 -0
  21. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakDuplexWidth1600.link.c +1 -0
  22. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-SnP.h +37 -0
  23. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-armv7a-le-neon-gcc.s +826 -0
  24. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-inplace-pl2-armv7a-neon-le-gcc.s +1245 -0
  25. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-times2-SnP.h +38 -0
  26. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-times4-SnP.h +45 -0
  27. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-times4-on2.c +38 -0
  28. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-times8-SnP.h +45 -0
  29. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakP-1600-times8-on2.c +38 -0
  30. data/ext/digest/kangarootwelve/keccak/armv7a/KeccakSpongeWidth1600.link.c +1 -0
  31. data/ext/digest/kangarootwelve/keccak/armv7a/PlSnP-Fallback.inc +287 -0
  32. data/ext/digest/kangarootwelve/keccak/armv7a/ext.link.c +1 -0
  33. data/ext/digest/kangarootwelve/keccak/armv7m/KangarooTwelve.link.c +1 -0
  34. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakDuplexWidth1600.link.c +1 -0
  35. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-SnP.h +36 -0
  36. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-inplace-32bi-armv7m-le-gcc.s +1170 -0
  37. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times2-SnP.h +45 -0
  38. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times2-on1.c +37 -0
  39. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times4-SnP.h +45 -0
  40. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times4-on1.c +37 -0
  41. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times8-SnP.h +45 -0
  42. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakP-1600-times8-on1.c +37 -0
  43. data/ext/digest/kangarootwelve/keccak/armv7m/KeccakSpongeWidth1600.link.c +1 -0
  44. data/ext/digest/kangarootwelve/keccak/armv7m/PlSnP-Fallback.inc +287 -0
  45. data/ext/digest/kangarootwelve/keccak/armv7m/ext.link.c +1 -0
  46. data/ext/digest/kangarootwelve/keccak/armv8a/KangarooTwelve.link.c +1 -0
  47. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakDuplexWidth1600.link.c +1 -0
  48. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-SnP.h +28 -0
  49. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-armv8a-neon.s +537 -0
  50. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times2-SnP.h +45 -0
  51. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times2-on1.c +37 -0
  52. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times4-SnP.h +45 -0
  53. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times4-on1.c +37 -0
  54. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times8-SnP.h +45 -0
  55. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakP-1600-times8-on1.c +37 -0
  56. data/ext/digest/kangarootwelve/keccak/armv8a/KeccakSpongeWidth1600.link.c +1 -0
  57. data/ext/digest/kangarootwelve/keccak/armv8a/PlSnP-Fallback.inc +287 -0
  58. data/ext/digest/kangarootwelve/keccak/armv8a/ext.link.c +1 -0
  59. data/ext/digest/kangarootwelve/keccak/asmx86-64/KangarooTwelve.link.c +1 -0
  60. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakDuplexWidth1600.link.c +1 -0
  61. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-SnP.h +37 -0
  62. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times2-SnP.h +45 -0
  63. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times2-on1.c +37 -0
  64. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times4-SnP.h +45 -0
  65. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times4-on1.c +37 -0
  66. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times8-SnP.h +45 -0
  67. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-times8-on1.c +37 -0
  68. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakP-1600-x86-64-gas.s +1190 -0
  69. data/ext/digest/kangarootwelve/keccak/asmx86-64/KeccakSpongeWidth1600.link.c +1 -0
  70. data/ext/digest/kangarootwelve/keccak/asmx86-64/PlSnP-Fallback.inc +287 -0
  71. data/ext/digest/kangarootwelve/keccak/asmx86-64/ext.link.c +1 -0
  72. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KangarooTwelve.link.c +1 -0
  73. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakDuplexWidth1600.link.c +1 -0
  74. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-SnP.h +37 -0
  75. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times2-SnP.h +45 -0
  76. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times2-on1.c +37 -0
  77. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times4-SnP.h +45 -0
  78. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times4-on1.c +37 -0
  79. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times8-SnP.h +45 -0
  80. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-times8-on1.c +37 -0
  81. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakP-1600-x86-64-shld-gas.s +1190 -0
  82. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/KeccakSpongeWidth1600.link.c +1 -0
  83. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/PlSnP-Fallback.inc +287 -0
  84. data/ext/digest/kangarootwelve/keccak/asmx86-64shld/ext.link.c +1 -0
  85. data/ext/digest/kangarootwelve/keccak/avr8/KangarooTwelve.link.c +1 -0
  86. data/ext/digest/kangarootwelve/keccak/avr8/KeccakDuplexWidth1600.link.c +1 -0
  87. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-SnP.h +37 -0
  88. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-avr8-fast.s +1116 -0
  89. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times2-SnP.h +45 -0
  90. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times2-on1.c +37 -0
  91. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times4-SnP.h +45 -0
  92. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times4-on1.c +37 -0
  93. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times8-SnP.h +45 -0
  94. data/ext/digest/kangarootwelve/keccak/avr8/KeccakP-1600-times8-on1.c +37 -0
  95. data/ext/digest/kangarootwelve/keccak/avr8/KeccakSpongeWidth1600.link.c +1 -0
  96. data/ext/digest/kangarootwelve/keccak/avr8/PlSnP-Fallback.inc +287 -0
  97. data/ext/digest/kangarootwelve/keccak/avr8/ext.link.c +1 -0
  98. data/ext/digest/kangarootwelve/keccak/bulldozer/KangarooTwelve.link.c +1 -0
  99. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakDuplexWidth1600.link.c +1 -0
  100. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-SnP.h +39 -0
  101. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-XOP-config.h +6 -0
  102. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-XOP.c +473 -0
  103. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times2-SIMD128.c +954 -0
  104. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times2-SnP.h +47 -0
  105. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times4-SnP.h +45 -0
  106. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times4-on2.c +38 -0
  107. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times8-SnP.h +45 -0
  108. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-times8-on2.c +38 -0
  109. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakP-1600-unrolling.macros +302 -0
  110. data/ext/digest/kangarootwelve/keccak/bulldozer/KeccakSpongeWidth1600.link.c +1 -0
  111. data/ext/digest/kangarootwelve/keccak/bulldozer/PlSnP-Fallback.inc +287 -0
  112. data/ext/digest/kangarootwelve/keccak/bulldozer/SIMD128-config.h +9 -0
  113. data/ext/digest/kangarootwelve/{SnP-Relaned.h → keccak/bulldozer/SnP-Relaned.h} +13 -7
  114. data/ext/digest/kangarootwelve/keccak/bulldozer/ext.link.c +1 -0
  115. data/ext/digest/kangarootwelve/{KangarooTwelve.c → keccak/common/KangarooTwelve.c} +6 -10
  116. data/ext/digest/kangarootwelve/{KangarooTwelve.h → keccak/common/KangarooTwelve.h} +3 -7
  117. data/ext/digest/kangarootwelve/keccak/common/KeccakDuplex-common.h +37 -0
  118. data/ext/digest/kangarootwelve/keccak/common/KeccakDuplex.inc +192 -0
  119. data/ext/digest/kangarootwelve/keccak/common/KeccakDuplexWidth1600.c +34 -0
  120. data/ext/digest/kangarootwelve/keccak/common/KeccakDuplexWidth1600.h +25 -0
  121. data/ext/digest/kangarootwelve/{KeccakSponge-common.h → keccak/common/KeccakSponge-common.h} +5 -7
  122. data/ext/digest/kangarootwelve/{KeccakSponge.inc → keccak/common/KeccakSponge.inc} +6 -8
  123. data/ext/digest/kangarootwelve/{KeccakSpongeWidth1600.c → keccak/common/KeccakSpongeWidth1600.c} +6 -8
  124. data/ext/digest/kangarootwelve/{KeccakSpongeWidth1600.h → keccak/common/KeccakSpongeWidth1600.h} +5 -7
  125. data/ext/digest/kangarootwelve/{Phases.h → keccak/common/Phases.h} +3 -7
  126. data/ext/digest/kangarootwelve/{align.h → keccak/common/align.h} +5 -7
  127. data/ext/digest/kangarootwelve/{brg_endian.h → keccak/common/brg_endian.h} +0 -0
  128. data/ext/digest/kangarootwelve/keccak/compact/KangarooTwelve.link.c +1 -0
  129. data/ext/digest/kangarootwelve/keccak/compact/KeccakDuplexWidth1600.link.c +1 -0
  130. data/ext/digest/kangarootwelve/{KeccakP-1600-SnP.h → keccak/compact/KeccakP-1600-SnP.h} +7 -10
  131. data/ext/digest/kangarootwelve/{KeccakP-1600-compact64.c → keccak/compact/KeccakP-1600-compact64.c} +11 -7
  132. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times2-SnP.h +45 -0
  133. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times2-on1.c +37 -0
  134. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times4-SnP.h +45 -0
  135. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times4-on1.c +37 -0
  136. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times8-SnP.h +45 -0
  137. data/ext/digest/kangarootwelve/keccak/compact/KeccakP-1600-times8-on1.c +37 -0
  138. data/ext/digest/kangarootwelve/keccak/compact/KeccakSpongeWidth1600.link.c +1 -0
  139. data/ext/digest/kangarootwelve/keccak/compact/PlSnP-Fallback.inc +287 -0
  140. data/ext/digest/kangarootwelve/keccak/compact/SnP-Relaned.h +140 -0
  141. data/ext/digest/kangarootwelve/keccak/compact/ext.link.c +1 -0
  142. data/ext/digest/kangarootwelve/keccak/generic32/KangarooTwelve.link.c +1 -0
  143. data/ext/digest/kangarootwelve/keccak/generic32/KeccakDuplexWidth1600.link.c +1 -0
  144. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-SnP.h +38 -0
  145. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-inplace32BI.c +1162 -0
  146. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times2-SnP.h +45 -0
  147. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times2-on1.c +37 -0
  148. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times4-SnP.h +45 -0
  149. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times4-on1.c +37 -0
  150. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times8-SnP.h +45 -0
  151. data/ext/digest/kangarootwelve/keccak/generic32/KeccakP-1600-times8-on1.c +37 -0
  152. data/ext/digest/kangarootwelve/keccak/generic32/KeccakSpongeWidth1600.link.c +1 -0
  153. data/ext/digest/kangarootwelve/keccak/generic32/PlSnP-Fallback.inc +287 -0
  154. data/ext/digest/kangarootwelve/keccak/generic32/SnP-Relaned.h +140 -0
  155. data/ext/digest/kangarootwelve/keccak/generic32/ext.link.c +1 -0
  156. data/ext/digest/kangarootwelve/keccak/generic32lc/KangarooTwelve.link.c +1 -0
  157. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakDuplexWidth1600.link.c +1 -0
  158. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-SnP.h +38 -0
  159. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-inplace32BI.c +1162 -0
  160. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times2-SnP.h +45 -0
  161. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times2-on1.c +37 -0
  162. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times4-SnP.h +45 -0
  163. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times4-on1.c +37 -0
  164. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times8-SnP.h +45 -0
  165. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakP-1600-times8-on1.c +37 -0
  166. data/ext/digest/kangarootwelve/keccak/generic32lc/KeccakSpongeWidth1600.link.c +1 -0
  167. data/ext/digest/kangarootwelve/keccak/generic32lc/PlSnP-Fallback.inc +287 -0
  168. data/ext/digest/kangarootwelve/keccak/generic32lc/SnP-Relaned.h +140 -0
  169. data/ext/digest/kangarootwelve/keccak/generic32lc/ext.link.c +1 -0
  170. data/ext/digest/kangarootwelve/keccak/generic64/KangarooTwelve.link.c +1 -0
  171. data/ext/digest/kangarootwelve/keccak/generic64/KeccakDuplexWidth1600.link.c +1 -0
  172. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-64.macros +2195 -0
  173. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-SnP.h +49 -0
  174. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-opt64-config.h +6 -0
  175. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-opt64.c +541 -0
  176. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times2-SnP.h +45 -0
  177. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times2-on1.c +37 -0
  178. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times4-SnP.h +45 -0
  179. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times4-on1.c +37 -0
  180. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times8-SnP.h +45 -0
  181. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-times8-on1.c +37 -0
  182. data/ext/digest/kangarootwelve/keccak/generic64/KeccakP-1600-unrolling.macros +302 -0
  183. data/ext/digest/kangarootwelve/keccak/generic64/KeccakSpongeWidth1600.link.c +1 -0
  184. data/ext/digest/kangarootwelve/keccak/generic64/PlSnP-Fallback.inc +287 -0
  185. data/ext/digest/kangarootwelve/keccak/generic64/SnP-Relaned.h +140 -0
  186. data/ext/digest/kangarootwelve/keccak/generic64/ext.link.c +1 -0
  187. data/ext/digest/kangarootwelve/keccak/generic64lc/KangarooTwelve.link.c +1 -0
  188. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakDuplexWidth1600.link.c +1 -0
  189. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-64.macros +2195 -0
  190. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-SnP.h +49 -0
  191. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-opt64-config.h +7 -0
  192. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-opt64.c +541 -0
  193. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times2-SnP.h +45 -0
  194. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times2-on1.c +37 -0
  195. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times4-SnP.h +45 -0
  196. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times4-on1.c +37 -0
  197. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times8-SnP.h +45 -0
  198. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-times8-on1.c +37 -0
  199. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakP-1600-unrolling.macros +302 -0
  200. data/ext/digest/kangarootwelve/keccak/generic64lc/KeccakSpongeWidth1600.link.c +1 -0
  201. data/ext/digest/kangarootwelve/keccak/generic64lc/PlSnP-Fallback.inc +287 -0
  202. data/ext/digest/kangarootwelve/keccak/generic64lc/SnP-Relaned.h +140 -0
  203. data/ext/digest/kangarootwelve/keccak/generic64lc/ext.link.c +1 -0
  204. data/ext/digest/kangarootwelve/keccak/haswell/KangarooTwelve.link.c +1 -0
  205. data/ext/digest/kangarootwelve/keccak/haswell/KeccakDuplexWidth1600.link.c +1 -0
  206. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-AVX2.s +993 -0
  207. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-SnP.h +41 -0
  208. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times2-SIMD128.c +954 -0
  209. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times2-SnP.h +47 -0
  210. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times4-SIMD256.c +1303 -0
  211. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times4-SnP.h +53 -0
  212. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times8-SnP.h +45 -0
  213. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-times8-on4.c +38 -0
  214. data/ext/digest/kangarootwelve/keccak/haswell/KeccakP-1600-unrolling.macros +302 -0
  215. data/ext/digest/kangarootwelve/keccak/haswell/KeccakSpongeWidth1600.link.c +1 -0
  216. data/ext/digest/kangarootwelve/keccak/haswell/PlSnP-Fallback.inc +287 -0
  217. data/ext/digest/kangarootwelve/keccak/haswell/SIMD128-config.h +8 -0
  218. data/ext/digest/kangarootwelve/keccak/haswell/SIMD256-config.h +7 -0
  219. data/ext/digest/kangarootwelve/keccak/haswell/ext.link.c +1 -0
  220. data/ext/digest/kangarootwelve/keccak/nehalem/KangarooTwelve.link.c +1 -0
  221. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakDuplexWidth1600.link.c +1 -0
  222. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-64.macros +2195 -0
  223. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-SnP.h +49 -0
  224. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-opt64-config.h +7 -0
  225. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-opt64.c +541 -0
  226. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times2-SIMD128.c +954 -0
  227. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times2-SnP.h +47 -0
  228. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times4-SnP.h +45 -0
  229. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times4-on2.c +38 -0
  230. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times8-SnP.h +45 -0
  231. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-times8-on2.c +38 -0
  232. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakP-1600-unrolling.macros +302 -0
  233. data/ext/digest/kangarootwelve/keccak/nehalem/KeccakSpongeWidth1600.link.c +1 -0
  234. data/ext/digest/kangarootwelve/keccak/nehalem/PlSnP-Fallback.inc +287 -0
  235. data/ext/digest/kangarootwelve/keccak/nehalem/SIMD128-config.h +8 -0
  236. data/ext/digest/kangarootwelve/keccak/nehalem/SnP-Relaned.h +140 -0
  237. data/ext/digest/kangarootwelve/keccak/nehalem/ext.link.c +1 -0
  238. data/ext/digest/kangarootwelve/keccak/reference/KangarooTwelve.link.c +1 -0
  239. data/ext/digest/kangarootwelve/keccak/reference/KeccakDuplexWidth1600.link.c +1 -0
  240. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-SnP.h +41 -0
  241. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-reference.c +424 -0
  242. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-reference.h +20 -0
  243. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times2-SnP.h +45 -0
  244. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times2-on1.c +37 -0
  245. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times4-SnP.h +45 -0
  246. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times4-on1.c +37 -0
  247. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times8-SnP.h +45 -0
  248. data/ext/digest/kangarootwelve/keccak/reference/KeccakP-1600-times8-on1.c +37 -0
  249. data/ext/digest/kangarootwelve/keccak/reference/KeccakSpongeWidth1600.link.c +1 -0
  250. data/ext/digest/kangarootwelve/keccak/reference/PlSnP-Fallback.inc +287 -0
  251. data/ext/digest/kangarootwelve/keccak/reference/displayIntermediateValues.c +176 -0
  252. data/ext/digest/kangarootwelve/keccak/reference/displayIntermediateValues.h +29 -0
  253. data/ext/digest/kangarootwelve/keccak/reference/ext.link.c +1 -0
  254. data/ext/digest/kangarootwelve/keccak/reference32bits/KangarooTwelve.link.c +1 -0
  255. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakDuplexWidth1600.link.c +1 -0
  256. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-SnP.h +41 -0
  257. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-reference.h +20 -0
  258. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-reference32BI.c +612 -0
  259. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times2-SnP.h +45 -0
  260. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times2-on1.c +37 -0
  261. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times4-SnP.h +45 -0
  262. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times4-on1.c +37 -0
  263. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times8-SnP.h +45 -0
  264. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakP-1600-times8-on1.c +37 -0
  265. data/ext/digest/kangarootwelve/keccak/reference32bits/KeccakSpongeWidth1600.link.c +1 -0
  266. data/ext/digest/kangarootwelve/keccak/reference32bits/PlSnP-Fallback.inc +287 -0
  267. data/ext/digest/kangarootwelve/keccak/reference32bits/displayIntermediateValues.c +176 -0
  268. data/ext/digest/kangarootwelve/keccak/reference32bits/displayIntermediateValues.h +29 -0
  269. data/ext/digest/kangarootwelve/keccak/reference32bits/ext.link.c +1 -0
  270. data/ext/digest/kangarootwelve/keccak/sandybridge/KangarooTwelve.link.c +1 -0
  271. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakDuplexWidth1600.link.c +1 -0
  272. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-64.macros +2195 -0
  273. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-SnP.h +49 -0
  274. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-opt64-config.h +8 -0
  275. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-opt64.c +541 -0
  276. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times2-SIMD128.c +954 -0
  277. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times2-SnP.h +47 -0
  278. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times4-SnP.h +45 -0
  279. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times4-on2.c +38 -0
  280. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times8-SnP.h +45 -0
  281. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-times8-on2.c +38 -0
  282. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakP-1600-unrolling.macros +302 -0
  283. data/ext/digest/kangarootwelve/keccak/sandybridge/KeccakSpongeWidth1600.link.c +1 -0
  284. data/ext/digest/kangarootwelve/keccak/sandybridge/PlSnP-Fallback.inc +287 -0
  285. data/ext/digest/kangarootwelve/keccak/sandybridge/SIMD128-config.h +8 -0
  286. data/ext/digest/kangarootwelve/keccak/sandybridge/SnP-Relaned.h +140 -0
  287. data/ext/digest/kangarootwelve/keccak/sandybridge/ext.link.c +1 -0
  288. data/ext/digest/kangarootwelve/keccak/skylakex/KangarooTwelve.link.c +1 -0
  289. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakDuplexWidth1600.link.c +1 -0
  290. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-AVX512-config.h +6 -0
  291. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-AVX512.c +621 -0
  292. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-SnP.h +42 -0
  293. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times2-SIMD512.c +852 -0
  294. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times2-SnP.h +49 -0
  295. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times4-SIMD512.c +883 -0
  296. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times4-SnP.h +49 -0
  297. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times8-SIMD512.c +1473 -0
  298. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakP-1600-times8-SnP.h +53 -0
  299. data/ext/digest/kangarootwelve/keccak/skylakex/KeccakSpongeWidth1600.link.c +1 -0
  300. data/ext/digest/kangarootwelve/keccak/skylakex/SIMD512-2-config.h +7 -0
  301. data/ext/digest/kangarootwelve/keccak/skylakex/SIMD512-4-config.h +7 -0
  302. data/ext/digest/kangarootwelve/keccak/skylakex/SIMD512-config.h +7 -0
  303. data/ext/digest/kangarootwelve/keccak/skylakex/ext.link.c +1 -0
  304. data/lib/digest/kangarootwelve/version.rb +1 -1
  305. metadata +299 -21
@@ -0,0 +1,47 @@
1
+ /*
2
+ Implementation by Gilles Van Assche, hereby denoted as "the implementer".
3
+
4
+ For more information, feedback or questions, please refer to our website:
5
+ https://keccak.team/
6
+
7
+ To the extent possible under law, the implementer has waived all copyright
8
+ and related or neighboring rights to the source code in this file.
9
+ http://creativecommons.org/publicdomain/zero/1.0/
10
+
11
+ ---
12
+
13
+ Please refer to PlSnP-documentation.h for more details.
14
+ */
15
+
16
+ #ifndef _KeccakP_1600_times2_SnP_h_
17
+ #define _KeccakP_1600_times2_SnP_h_
18
+
19
+ #include "SIMD128-config.h"
20
+
21
+ #define KeccakP1600times2_implementation "128-bit SIMD implementation (" KeccakP1600times2_implementation_config ")"
22
+ #define KeccakP1600times2_statesSizeInBytes 400
23
+ #define KeccakP1600times2_statesAlignment 16
24
+ #define KeccakF1600times2_FastLoop_supported
25
+
26
+ #include <stddef.h>
27
+
28
+ #define KeccakP1600times2_StaticInitialize()
29
+ void KeccakP1600times2_InitializeAll(void *states);
30
+ #define KeccakP1600times2_AddByte(states, instanceIndex, byte, offset) \
31
+ ((unsigned char*)(states))[(instanceIndex)*8 + ((offset)/8)*2*8 + (offset)%8] ^= (byte)
32
+ void KeccakP1600times2_AddBytes(void *states, unsigned int instanceIndex, const unsigned char *data, unsigned int offset, unsigned int length);
33
+ void KeccakP1600times2_AddLanesAll(void *states, const unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
34
+ void KeccakP1600times2_OverwriteBytes(void *states, unsigned int instanceIndex, const unsigned char *data, unsigned int offset, unsigned int length);
35
+ void KeccakP1600times2_OverwriteLanesAll(void *states, const unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
36
+ void KeccakP1600times2_OverwriteWithZeroes(void *states, unsigned int instanceIndex, unsigned int byteCount);
37
+ void KeccakP1600times2_PermuteAll_4rounds(void *states);
38
+ void KeccakP1600times2_PermuteAll_6rounds(void *states);
39
+ void KeccakP1600times2_PermuteAll_12rounds(void *states);
40
+ void KeccakP1600times2_PermuteAll_24rounds(void *states);
41
+ void KeccakP1600times2_ExtractBytes(const void *states, unsigned int instanceIndex, unsigned char *data, unsigned int offset, unsigned int length);
42
+ void KeccakP1600times2_ExtractLanesAll(const void *states, unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
43
+ void KeccakP1600times2_ExtractAndAddBytes(const void *states, unsigned int instanceIndex, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length);
44
+ void KeccakP1600times2_ExtractAndAddLanesAll(const void *states, const unsigned char *input, unsigned char *output, unsigned int laneCount, unsigned int laneOffset);
45
+ size_t KeccakF1600times2_FastLoop_Absorb(void *states, unsigned int laneCount, unsigned int laneOffsetParallel, unsigned int laneOffsetSerial, const unsigned char *data, size_t dataByteLen);
46
+
47
+ #endif
@@ -0,0 +1,45 @@
1
+ /*
2
+ Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen,
3
+ Michaël Peeters, Gilles Van Assche and Ronny Van Keer,
4
+ hereby denoted as "the implementer".
5
+
6
+ For more information, feedback or questions, please refer to our 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
+ Please refer to PlSnP-documentation.h for more details.
16
+ */
17
+
18
+ #ifndef _KeccakP_1600_times4_SnP_h_
19
+ #define _KeccakP_1600_times4_SnP_h_
20
+
21
+ #include "KeccakP-1600-times2-SnP.h"
22
+
23
+ #define KeccakP1600times4_implementation "fallback on times-2 implementation (" KeccakP1600times2_implementation ")"
24
+ #define KeccakP1600times4_statesSizeInBytes (((KeccakP1600times2_statesSizeInBytes+(KeccakP1600times2_statesAlignment-1))/KeccakP1600times2_statesAlignment)*KeccakP1600times2_statesAlignment*2)
25
+ #define KeccakP1600times4_statesAlignment KeccakP1600times2_statesAlignment
26
+ #define KeccakP1600times4_isFallback
27
+
28
+ void KeccakP1600times4_StaticInitialize( void );
29
+ void KeccakP1600times4_InitializeAll(void *states);
30
+ void KeccakP1600times4_AddByte(void *states, unsigned int instanceIndex, unsigned char data, unsigned int offset);
31
+ void KeccakP1600times4_AddBytes(void *states, unsigned int instanceIndex, const unsigned char *data, unsigned int offset, unsigned int length);
32
+ void KeccakP1600times4_AddLanesAll(void *states, const unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
33
+ void KeccakP1600times4_OverwriteBytes(void *states, unsigned int instanceIndex, const unsigned char *data, unsigned int offset, unsigned int length);
34
+ void KeccakP1600times4_OverwriteLanesAll(void *states, const unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
35
+ void KeccakP1600times4_OverwriteWithZeroes(void *states, unsigned int instanceIndex, unsigned int byteCount);
36
+ void KeccakP1600times4_PermuteAll_4rounds(void *states);
37
+ void KeccakP1600times4_PermuteAll_6rounds(void *states);
38
+ void KeccakP1600times4_PermuteAll_12rounds(void *states);
39
+ void KeccakP1600times4_PermuteAll_24rounds(void *states);
40
+ void KeccakP1600times4_ExtractBytes(const void *states, unsigned int instanceIndex, unsigned char *data, unsigned int offset, unsigned int length);
41
+ void KeccakP1600times4_ExtractLanesAll(const void *states, unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
42
+ void KeccakP1600times4_ExtractAndAddBytes(const void *states, unsigned int instanceIndex, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length);
43
+ void KeccakP1600times4_ExtractAndAddLanesAll(const void *states, const unsigned char *input, unsigned char *output, unsigned int laneCount, unsigned int laneOffset);
44
+
45
+ #endif
@@ -0,0 +1,38 @@
1
+ /*
2
+ Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen,
3
+ Michaël Peeters, Gilles Van Assche and Ronny Van Keer,
4
+ hereby denoted as "the implementer".
5
+
6
+ For more information, feedback or questions, please refer to our 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]×4 in a PlSnP-compatible way.
16
+ Please refer to PlSnP-documentation.h for more details.
17
+
18
+ This implementation comes with KeccakP-1600-times4-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 "KeccakP-1600-times2-SnP.h"
23
+
24
+ #define prefix KeccakP1600times4
25
+ #define PlSnP_baseParallelism 2
26
+ #define PlSnP_targetParallelism 4
27
+ #define SnP_laneLengthInBytes 8
28
+ #define SnP KeccakP1600times2
29
+ #define SnP_PermuteAll KeccakP1600times2_PermuteAll_24rounds
30
+ #define SnP_PermuteAll_12rounds KeccakP1600times2_PermuteAll_12rounds
31
+ #define SnP_PermuteAll_6rounds KeccakP1600times2_PermuteAll_6rounds
32
+ #define SnP_PermuteAll_4rounds KeccakP1600times2_PermuteAll_4rounds
33
+ #define PlSnP_PermuteAll KeccakP1600times4_PermuteAll_24rounds
34
+ #define PlSnP_PermuteAll_12rounds KeccakP1600times4_PermuteAll_12rounds
35
+ #define PlSnP_PermuteAll_6rounds KeccakP1600times4_PermuteAll_6rounds
36
+ #define PlSnP_PermuteAll_4rounds KeccakP1600times4_PermuteAll_4rounds
37
+
38
+ #include "PlSnP-Fallback.inc"
@@ -0,0 +1,45 @@
1
+ /*
2
+ Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen,
3
+ Michaël Peeters, Gilles Van Assche and Ronny Van Keer,
4
+ hereby denoted as "the implementer".
5
+
6
+ For more information, feedback or questions, please refer to our 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
+ Please refer to PlSnP-documentation.h for more details.
16
+ */
17
+
18
+ #ifndef _KeccakP_1600_times8_SnP_h_
19
+ #define _KeccakP_1600_times8_SnP_h_
20
+
21
+ #include "KeccakP-1600-times2-SnP.h"
22
+
23
+ #define KeccakP1600times8_implementation "fallback on times-2 implementation (" KeccakP1600times2_implementation ")"
24
+ #define KeccakP1600times8_statesSizeInBytes (((KeccakP1600times2_statesSizeInBytes+(KeccakP1600times2_statesAlignment-1))/KeccakP1600times2_statesAlignment)*KeccakP1600times2_statesAlignment*4)
25
+ #define KeccakP1600times8_statesAlignment KeccakP1600times2_statesAlignment
26
+ #define KeccakP1600times8_isFallback
27
+
28
+ void KeccakP1600times8_StaticInitialize( void );
29
+ void KeccakP1600times8_InitializeAll(void *states);
30
+ void KeccakP1600times8_AddByte(void *states, unsigned int instanceIndex, unsigned char data, unsigned int offset);
31
+ void KeccakP1600times8_AddBytes(void *states, unsigned int instanceIndex, const unsigned char *data, unsigned int offset, unsigned int length);
32
+ void KeccakP1600times8_AddLanesAll(void *states, const unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
33
+ void KeccakP1600times8_OverwriteBytes(void *states, unsigned int instanceIndex, const unsigned char *data, unsigned int offset, unsigned int length);
34
+ void KeccakP1600times8_OverwriteLanesAll(void *states, const unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
35
+ void KeccakP1600times8_OverwriteWithZeroes(void *states, unsigned int instanceIndex, unsigned int byteCount);
36
+ void KeccakP1600times8_PermuteAll_4rounds(void *states);
37
+ void KeccakP1600times8_PermuteAll_6rounds(void *states);
38
+ void KeccakP1600times8_PermuteAll_12rounds(void *states);
39
+ void KeccakP1600times8_PermuteAll_24rounds(void *states);
40
+ void KeccakP1600times8_ExtractBytes(const void *states, unsigned int instanceIndex, unsigned char *data, unsigned int offset, unsigned int length);
41
+ void KeccakP1600times8_ExtractLanesAll(const void *states, unsigned char *data, unsigned int laneCount, unsigned int laneOffset);
42
+ void KeccakP1600times8_ExtractAndAddBytes(const void *states, unsigned int instanceIndex, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length);
43
+ void KeccakP1600times8_ExtractAndAddLanesAll(const void *states, const unsigned char *input, unsigned char *output, unsigned int laneCount, unsigned int laneOffset);
44
+
45
+ #endif
@@ -0,0 +1,38 @@
1
+ /*
2
+ Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen,
3
+ Michaël Peeters, Gilles Van Assche and Ronny Van Keer,
4
+ hereby denoted as "the implementer".
5
+
6
+ For more information, feedback or questions, please refer to our 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 "KeccakP-1600-times2-SnP.h"
23
+
24
+ #define prefix KeccakP1600times8
25
+ #define PlSnP_baseParallelism 2
26
+ #define PlSnP_targetParallelism 8
27
+ #define SnP_laneLengthInBytes 8
28
+ #define SnP KeccakP1600times2
29
+ #define SnP_PermuteAll KeccakP1600times2_PermuteAll_24rounds
30
+ #define SnP_PermuteAll_12rounds KeccakP1600times2_PermuteAll_12rounds
31
+ #define SnP_PermuteAll_6rounds KeccakP1600times2_PermuteAll_6rounds
32
+ #define SnP_PermuteAll_4rounds KeccakP1600times2_PermuteAll_4rounds
33
+ #define PlSnP_PermuteAll KeccakP1600times8_PermuteAll_24rounds
34
+ #define PlSnP_PermuteAll_12rounds KeccakP1600times8_PermuteAll_12rounds
35
+ #define PlSnP_PermuteAll_6rounds KeccakP1600times8_PermuteAll_6rounds
36
+ #define PlSnP_PermuteAll_4rounds KeccakP1600times8_PermuteAll_4rounds
37
+
38
+ #include "PlSnP-Fallback.inc"
@@ -0,0 +1,302 @@
1
+ /*
2
+ Implementation by the Keccak Team, namely, Guido Bertoni, Joan Daemen,
3
+ Michaël Peeters, Gilles Van Assche and Ronny Van Keer,
4
+ hereby denoted as "the implementer".
5
+
6
+ For more information, feedback or questions, please refer to our 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
+ #if (defined(FullUnrolling))
15
+ #define rounds24 \
16
+ prepareTheta \
17
+ thetaRhoPiChiIotaPrepareTheta( 0, A, E) \
18
+ thetaRhoPiChiIotaPrepareTheta( 1, E, A) \
19
+ thetaRhoPiChiIotaPrepareTheta( 2, A, E) \
20
+ thetaRhoPiChiIotaPrepareTheta( 3, E, A) \
21
+ thetaRhoPiChiIotaPrepareTheta( 4, A, E) \
22
+ thetaRhoPiChiIotaPrepareTheta( 5, E, A) \
23
+ thetaRhoPiChiIotaPrepareTheta( 6, A, E) \
24
+ thetaRhoPiChiIotaPrepareTheta( 7, E, A) \
25
+ thetaRhoPiChiIotaPrepareTheta( 8, A, E) \
26
+ thetaRhoPiChiIotaPrepareTheta( 9, E, A) \
27
+ thetaRhoPiChiIotaPrepareTheta(10, A, E) \
28
+ thetaRhoPiChiIotaPrepareTheta(11, E, A) \
29
+ thetaRhoPiChiIotaPrepareTheta(12, A, E) \
30
+ thetaRhoPiChiIotaPrepareTheta(13, E, A) \
31
+ thetaRhoPiChiIotaPrepareTheta(14, A, E) \
32
+ thetaRhoPiChiIotaPrepareTheta(15, E, A) \
33
+ thetaRhoPiChiIotaPrepareTheta(16, A, E) \
34
+ thetaRhoPiChiIotaPrepareTheta(17, E, A) \
35
+ thetaRhoPiChiIotaPrepareTheta(18, A, E) \
36
+ thetaRhoPiChiIotaPrepareTheta(19, E, A) \
37
+ thetaRhoPiChiIotaPrepareTheta(20, A, E) \
38
+ thetaRhoPiChiIotaPrepareTheta(21, E, A) \
39
+ thetaRhoPiChiIotaPrepareTheta(22, A, E) \
40
+ thetaRhoPiChiIota(23, E, A) \
41
+
42
+ #define rounds12 \
43
+ prepareTheta \
44
+ thetaRhoPiChiIotaPrepareTheta(12, A, E) \
45
+ thetaRhoPiChiIotaPrepareTheta(13, E, A) \
46
+ thetaRhoPiChiIotaPrepareTheta(14, A, E) \
47
+ thetaRhoPiChiIotaPrepareTheta(15, E, A) \
48
+ thetaRhoPiChiIotaPrepareTheta(16, A, E) \
49
+ thetaRhoPiChiIotaPrepareTheta(17, E, A) \
50
+ thetaRhoPiChiIotaPrepareTheta(18, A, E) \
51
+ thetaRhoPiChiIotaPrepareTheta(19, E, A) \
52
+ thetaRhoPiChiIotaPrepareTheta(20, A, E) \
53
+ thetaRhoPiChiIotaPrepareTheta(21, E, A) \
54
+ thetaRhoPiChiIotaPrepareTheta(22, A, E) \
55
+ thetaRhoPiChiIota(23, E, A) \
56
+
57
+ #define rounds6 \
58
+ prepareTheta \
59
+ thetaRhoPiChiIotaPrepareTheta(18, A, E) \
60
+ thetaRhoPiChiIotaPrepareTheta(19, E, A) \
61
+ thetaRhoPiChiIotaPrepareTheta(20, A, E) \
62
+ thetaRhoPiChiIotaPrepareTheta(21, E, A) \
63
+ thetaRhoPiChiIotaPrepareTheta(22, A, E) \
64
+ thetaRhoPiChiIota(23, E, A) \
65
+
66
+ #define rounds4 \
67
+ prepareTheta \
68
+ thetaRhoPiChiIotaPrepareTheta(20, A, E) \
69
+ thetaRhoPiChiIotaPrepareTheta(21, E, A) \
70
+ thetaRhoPiChiIotaPrepareTheta(22, A, E) \
71
+ thetaRhoPiChiIota(23, E, A) \
72
+
73
+ #elif (Unrolling == 12)
74
+ #define rounds24 \
75
+ prepareTheta \
76
+ for(i=0; i<24; i+=12) { \
77
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
78
+ thetaRhoPiChiIotaPrepareTheta(i+ 1, E, A) \
79
+ thetaRhoPiChiIotaPrepareTheta(i+ 2, A, E) \
80
+ thetaRhoPiChiIotaPrepareTheta(i+ 3, E, A) \
81
+ thetaRhoPiChiIotaPrepareTheta(i+ 4, A, E) \
82
+ thetaRhoPiChiIotaPrepareTheta(i+ 5, E, A) \
83
+ thetaRhoPiChiIotaPrepareTheta(i+ 6, A, E) \
84
+ thetaRhoPiChiIotaPrepareTheta(i+ 7, E, A) \
85
+ thetaRhoPiChiIotaPrepareTheta(i+ 8, A, E) \
86
+ thetaRhoPiChiIotaPrepareTheta(i+ 9, E, A) \
87
+ thetaRhoPiChiIotaPrepareTheta(i+10, A, E) \
88
+ thetaRhoPiChiIotaPrepareTheta(i+11, E, A) \
89
+ } \
90
+
91
+ #define rounds12 \
92
+ prepareTheta \
93
+ thetaRhoPiChiIotaPrepareTheta(12, A, E) \
94
+ thetaRhoPiChiIotaPrepareTheta(13, E, A) \
95
+ thetaRhoPiChiIotaPrepareTheta(14, A, E) \
96
+ thetaRhoPiChiIotaPrepareTheta(15, E, A) \
97
+ thetaRhoPiChiIotaPrepareTheta(16, A, E) \
98
+ thetaRhoPiChiIotaPrepareTheta(17, E, A) \
99
+ thetaRhoPiChiIotaPrepareTheta(18, A, E) \
100
+ thetaRhoPiChiIotaPrepareTheta(19, E, A) \
101
+ thetaRhoPiChiIotaPrepareTheta(20, A, E) \
102
+ thetaRhoPiChiIotaPrepareTheta(21, E, A) \
103
+ thetaRhoPiChiIotaPrepareTheta(22, A, E) \
104
+ thetaRhoPiChiIota(23, E, A) \
105
+
106
+ #define rounds6 \
107
+ prepareTheta \
108
+ thetaRhoPiChiIotaPrepareTheta(18, A, E) \
109
+ thetaRhoPiChiIotaPrepareTheta(19, E, A) \
110
+ thetaRhoPiChiIotaPrepareTheta(20, A, E) \
111
+ thetaRhoPiChiIotaPrepareTheta(21, E, A) \
112
+ thetaRhoPiChiIotaPrepareTheta(22, A, E) \
113
+ thetaRhoPiChiIota(23, E, A) \
114
+
115
+ #define rounds4 \
116
+ prepareTheta \
117
+ thetaRhoPiChiIotaPrepareTheta(20, A, E) \
118
+ thetaRhoPiChiIotaPrepareTheta(21, E, A) \
119
+ thetaRhoPiChiIotaPrepareTheta(22, A, E) \
120
+ thetaRhoPiChiIota(23, E, A) \
121
+
122
+ #elif (Unrolling == 6)
123
+ #define rounds24 \
124
+ prepareTheta \
125
+ for(i=0; i<24; i+=6) { \
126
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
127
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
128
+ thetaRhoPiChiIotaPrepareTheta(i+2, A, E) \
129
+ thetaRhoPiChiIotaPrepareTheta(i+3, E, A) \
130
+ thetaRhoPiChiIotaPrepareTheta(i+4, A, E) \
131
+ thetaRhoPiChiIotaPrepareTheta(i+5, E, A) \
132
+ } \
133
+
134
+ #define rounds12 \
135
+ prepareTheta \
136
+ for(i=12; i<24; i+=6) { \
137
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
138
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
139
+ thetaRhoPiChiIotaPrepareTheta(i+2, A, E) \
140
+ thetaRhoPiChiIotaPrepareTheta(i+3, E, A) \
141
+ thetaRhoPiChiIotaPrepareTheta(i+4, A, E) \
142
+ thetaRhoPiChiIotaPrepareTheta(i+5, E, A) \
143
+ } \
144
+
145
+ #define rounds6 \
146
+ prepareTheta \
147
+ thetaRhoPiChiIotaPrepareTheta(18, A, E) \
148
+ thetaRhoPiChiIotaPrepareTheta(19, E, A) \
149
+ thetaRhoPiChiIotaPrepareTheta(20, A, E) \
150
+ thetaRhoPiChiIotaPrepareTheta(21, E, A) \
151
+ thetaRhoPiChiIotaPrepareTheta(22, A, E) \
152
+ thetaRhoPiChiIota(23, E, A) \
153
+
154
+ #define rounds4 \
155
+ prepareTheta \
156
+ thetaRhoPiChiIotaPrepareTheta(20, A, E) \
157
+ thetaRhoPiChiIotaPrepareTheta(21, E, A) \
158
+ thetaRhoPiChiIotaPrepareTheta(22, A, E) \
159
+ thetaRhoPiChiIota(23, E, A) \
160
+
161
+ #elif (Unrolling == 4)
162
+ #define rounds24 \
163
+ prepareTheta \
164
+ for(i=0; i<24; i+=4) { \
165
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
166
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
167
+ thetaRhoPiChiIotaPrepareTheta(i+2, A, E) \
168
+ thetaRhoPiChiIotaPrepareTheta(i+3, E, A) \
169
+ } \
170
+
171
+ #define rounds12 \
172
+ prepareTheta \
173
+ for(i=12; i<24; i+=4) { \
174
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
175
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
176
+ thetaRhoPiChiIotaPrepareTheta(i+2, A, E) \
177
+ thetaRhoPiChiIotaPrepareTheta(i+3, E, A) \
178
+ } \
179
+
180
+ #define rounds6 \
181
+ prepareTheta \
182
+ for(i=18; i<24; i+=2) { \
183
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
184
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
185
+ } \
186
+
187
+ #define rounds4 \
188
+ prepareTheta \
189
+ thetaRhoPiChiIotaPrepareTheta(20, A, E) \
190
+ thetaRhoPiChiIotaPrepareTheta(21, E, A) \
191
+ thetaRhoPiChiIotaPrepareTheta(22, A, E) \
192
+ thetaRhoPiChiIota(23, E, A) \
193
+
194
+ #elif (Unrolling == 3)
195
+ #define rounds24 \
196
+ prepareTheta \
197
+ for(i=0; i<24; i+=3) { \
198
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
199
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
200
+ thetaRhoPiChiIotaPrepareTheta(i+2, A, E) \
201
+ copyStateVariables(A, E) \
202
+ } \
203
+
204
+ #define rounds12 \
205
+ prepareTheta \
206
+ for(i=12; i<24; i+=3) { \
207
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
208
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
209
+ thetaRhoPiChiIotaPrepareTheta(i+2, A, E) \
210
+ copyStateVariables(A, E) \
211
+ } \
212
+
213
+ #define rounds6 \
214
+ prepareTheta \
215
+ for(i=18; i<24; i+=3) { \
216
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
217
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
218
+ thetaRhoPiChiIotaPrepareTheta(i+2, A, E) \
219
+ copyStateVariables(A, E) \
220
+ } \
221
+
222
+ #define rounds4 \
223
+ prepareTheta \
224
+ for(i=20; i<24; i+=2) { \
225
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
226
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
227
+ } \
228
+
229
+ #elif (Unrolling == 2)
230
+ #define rounds24 \
231
+ prepareTheta \
232
+ for(i=0; i<24; i+=2) { \
233
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
234
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
235
+ } \
236
+
237
+ #define rounds12 \
238
+ prepareTheta \
239
+ for(i=12; i<24; i+=2) { \
240
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
241
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
242
+ } \
243
+
244
+ #define rounds6 \
245
+ prepareTheta \
246
+ for(i=18; i<24; i+=2) { \
247
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
248
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
249
+ } \
250
+
251
+ #define rounds4 \
252
+ prepareTheta \
253
+ for(i=20; i<24; i+=2) { \
254
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
255
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
256
+ } \
257
+
258
+ #elif (Unrolling == 1)
259
+ #define rounds24 \
260
+ prepareTheta \
261
+ for(i=0; i<24; i++) { \
262
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
263
+ copyStateVariables(A, E) \
264
+ } \
265
+
266
+ #define rounds12 \
267
+ prepareTheta \
268
+ for(i=12; i<24; i++) { \
269
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
270
+ copyStateVariables(A, E) \
271
+ } \
272
+
273
+ #define rounds6 \
274
+ prepareTheta \
275
+ for(i=18; i<24; i++) { \
276
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
277
+ copyStateVariables(A, E) \
278
+ } \
279
+
280
+ #define rounds4 \
281
+ prepareTheta \
282
+ for(i=20; i<24; i++) { \
283
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
284
+ copyStateVariables(A, E) \
285
+ } \
286
+
287
+ #else
288
+ #error "Unrolling is not correctly specified!"
289
+ #endif
290
+
291
+ #define roundsN(__nrounds) \
292
+ prepareTheta \
293
+ i = 24 - (__nrounds); \
294
+ if ((i&1) != 0) { \
295
+ thetaRhoPiChiIotaPrepareTheta(i, A, E) \
296
+ copyStateVariables(A, E) \
297
+ ++i; \
298
+ } \
299
+ for( /* empty */; i<24; i+=2) { \
300
+ thetaRhoPiChiIotaPrepareTheta(i , A, E) \
301
+ thetaRhoPiChiIotaPrepareTheta(i+1, E, A) \
302
+ }