sha3-ruby 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +29 -0
  5. data/Rakefile +7 -0
  6. data/ext/sha3/KeccakReferenceAndOptimized/KeccakCompact.vcproj +207 -0
  7. data/ext/sha3/KeccakReferenceAndOptimized/KeccakCompact8.vcproj +207 -0
  8. data/ext/sha3/KeccakReferenceAndOptimized/KeccakInplace.vcproj +203 -0
  9. data/ext/sha3/KeccakReferenceAndOptimized/KeccakInplace32BI.vcproj +201 -0
  10. data/ext/sha3/KeccakReferenceAndOptimized/KeccakOptimized32.vcproj +267 -0
  11. data/ext/sha3/KeccakReferenceAndOptimized/KeccakOptimized64.vcproj +267 -0
  12. data/ext/sha3/KeccakReferenceAndOptimized/KeccakReference.vcproj +243 -0
  13. data/ext/sha3/KeccakReferenceAndOptimized/KeccakReference32BI.vcproj +243 -0
  14. data/ext/sha3/KeccakReferenceAndOptimized/KeccakReferenceAndOptimized.sln +62 -0
  15. data/ext/sha3/KeccakReferenceAndOptimized/KeccakSimple.vcproj +203 -0
  16. data/ext/sha3/KeccakReferenceAndOptimized/KeccakSimple32BI.vcproj +201 -0
  17. data/ext/sha3/KeccakReferenceAndOptimized/Sources/AVR8-rotate64.h +27 -0
  18. data/ext/sha3/KeccakReferenceAndOptimized/Sources/AVR8-rotate64.s +285 -0
  19. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8-settings.h +2 -0
  20. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8-test.c +142 -0
  21. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8-util.h +15 -0
  22. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8-util.s +119 -0
  23. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8.c +184 -0
  24. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8.h +25 -0
  25. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact-settings.h +3 -0
  26. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact-test.c +317 -0
  27. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact.c +341 -0
  28. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact.h +50 -0
  29. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact8-settings.h +2 -0
  30. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact8-test.c +192 -0
  31. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact8.c +375 -0
  32. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact8.h +47 -0
  33. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-crypto_hash-inplace-armgcc-ARMv7A-NEON.s +406 -0
  34. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace-minimal-test.c +231 -0
  35. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace-settings.h +3 -0
  36. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace-test.c +221 -0
  37. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace.c +445 -0
  38. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace32BI-armgcc-ARMv6M.s +844 -0
  39. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace32BI-armgcc-ARMv7A.s +687 -0
  40. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace32BI-armgcc-ARMv7M.s +687 -0
  41. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace32BI.c +849 -0
  42. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-simple-settings.h +3 -0
  43. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-simple-test.c +221 -0
  44. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-simple.c +403 -0
  45. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-simple32BI.c +673 -0
  46. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakDuplex.c +68 -0
  47. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakDuplex.h +59 -0
  48. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-32-rvk.macros +555 -0
  49. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-32-s1.macros +1187 -0
  50. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-32-s2.macros +1187 -0
  51. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-32.macros +26 -0
  52. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-64.macros +728 -0
  53. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-arm.c +123 -0
  54. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-armcc.s +653 -0
  55. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-armgcc.s +686 -0
  56. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-avr8.c +163 -0
  57. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-avr8asm-compact.s +647 -0
  58. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-avr8asm-fast.s +934 -0
  59. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-inplace-armgcc-ARMv7A-NEON.s +446 -0
  60. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-int-set.h +6 -0
  61. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-interface.h +46 -0
  62. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-opt32-settings.h +4 -0
  63. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-opt32.c +524 -0
  64. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-opt64-settings.h +7 -0
  65. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-opt64.c +504 -0
  66. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-reference.c +300 -0
  67. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-reference.h +20 -0
  68. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-reference.o +0 -0
  69. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-reference32BI.c +371 -0
  70. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-simd128.macros +651 -0
  71. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-simd64.macros +517 -0
  72. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-unrolling.macros +124 -0
  73. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-x86-64-asm.c +62 -0
  74. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-x86-64-gas.s +766 -0
  75. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-x86-64-shld-gas.s +766 -0
  76. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-xop.macros +573 -0
  77. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.c +81 -0
  78. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.h +70 -0
  79. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.o +0 -0
  80. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakSponge.c +266 -0
  81. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakSponge.h +76 -0
  82. data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakSponge.o +0 -0
  83. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccakc1024-crypto_hash-inplace-armgcc-ARMv7A-NEON.s +296 -0
  84. data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccakc512-crypto_hash-inplace-armgcc-ARMv7A-NEON.s +429 -0
  85. data/ext/sha3/KeccakReferenceAndOptimized/Sources/brg_endian.h +142 -0
  86. data/ext/sha3/KeccakReferenceAndOptimized/Sources/crypto_hash.h +0 -0
  87. data/ext/sha3/KeccakReferenceAndOptimized/Sources/displayIntermediateValues.c +117 -0
  88. data/ext/sha3/KeccakReferenceAndOptimized/Sources/displayIntermediateValues.h +29 -0
  89. data/ext/sha3/KeccakReferenceAndOptimized/Sources/displayIntermediateValues.o +0 -0
  90. data/ext/sha3/KeccakReferenceAndOptimized/Sources/genKAT.c +692 -0
  91. data/ext/sha3/KeccakReferenceAndOptimized/Sources/mainARM.c +88 -0
  92. data/ext/sha3/KeccakReferenceAndOptimized/Sources/mainOptimized.c +23 -0
  93. data/ext/sha3/KeccakReferenceAndOptimized/Sources/mainReference.c +381 -0
  94. data/ext/sha3/KeccakReferenceAndOptimized/Sources/timing.c +436 -0
  95. data/ext/sha3/KeccakReferenceAndOptimized/Sources/timing.h +13 -0
  96. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/DoublePermutation-config.h +2 -0
  97. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/DoublePermutation.c +572 -0
  98. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/DoublePermutation.h +38 -0
  99. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/KeccakF-1600-unrolling.macros +124 -0
  100. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/Keccakc256TreeD2.c +81 -0
  101. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/Keccakc256TreeD2.h +18 -0
  102. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/Keccakc512TreeD2.c +81 -0
  103. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/Keccakc512TreeD2.h +18 -0
  104. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/crypto_hash.h +0 -0
  105. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/mainOptimized.c +112 -0
  106. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/timing-Double.c +225 -0
  107. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/timing-Double.h +20 -0
  108. data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/makefile +68 -0
  109. data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakCompact +0 -0
  110. data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakOptimized32 +0 -0
  111. data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakOptimized64 +0 -0
  112. data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakReference +0 -0
  113. data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakReference32BI +0 -0
  114. data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakSimple +0 -0
  115. data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakSimple32BI +0 -0
  116. data/ext/sha3/KeccakReferenceAndOptimized/bin/compact/Keccak-compact-test.o +0 -0
  117. data/ext/sha3/KeccakReferenceAndOptimized/bin/compact/Keccak-compact.o +0 -0
  118. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/KeccakDuplex.o +0 -0
  119. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/KeccakF-1600-opt32.o +0 -0
  120. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/KeccakNISTInterface.o +0 -0
  121. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/KeccakSponge.o +0 -0
  122. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/genKAT.o +0 -0
  123. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/mainOptimized.o +0 -0
  124. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/timing.o +0 -0
  125. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/KeccakDuplex.o +0 -0
  126. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/KeccakF-1600-opt64.o +0 -0
  127. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/KeccakNISTInterface.o +0 -0
  128. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/KeccakSponge.o +0 -0
  129. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/genKAT.o +0 -0
  130. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/mainOptimized.o +0 -0
  131. data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/timing.o +0 -0
  132. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/KeccakDuplex.o +0 -0
  133. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/KeccakF-1600-reference.o +0 -0
  134. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/KeccakNISTInterface.o +0 -0
  135. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/KeccakSponge.o +0 -0
  136. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/displayIntermediateValues.o +0 -0
  137. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/genKAT.o +0 -0
  138. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/mainReference.o +0 -0
  139. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/KeccakDuplex.o +0 -0
  140. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/KeccakF-1600-reference32BI.o +0 -0
  141. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/KeccakNISTInterface.o +0 -0
  142. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/KeccakSponge.o +0 -0
  143. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/displayIntermediateValues.o +0 -0
  144. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/genKAT.o +0 -0
  145. data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/mainReference.o +0 -0
  146. data/ext/sha3/KeccakReferenceAndOptimized/bin/simple/Keccak-simple-test.o +0 -0
  147. data/ext/sha3/KeccakReferenceAndOptimized/bin/simple/Keccak-simple.o +0 -0
  148. data/ext/sha3/KeccakReferenceAndOptimized/bin/simple32BI/Keccak-simple-test.o +0 -0
  149. data/ext/sha3/KeccakReferenceAndOptimized/bin/simple32BI/Keccak-simple32BI.o +0 -0
  150. data/ext/sha3/KeccakReferenceAndOptimized/compile64.bat +1 -0
  151. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccak +1 -0
  152. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc1024 +1 -0
  153. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc256 +1 -0
  154. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc256treed2 +1 -0
  155. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc448 +1 -0
  156. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc512 +1 -0
  157. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc512treed2 +1 -0
  158. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc768 +1 -0
  159. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccak.c +11 -0
  160. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccakc1024.c +11 -0
  161. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccakc256.c +11 -0
  162. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccakc448.c +11 -0
  163. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccakc512.c +11 -0
  164. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccakc768.c +11 -0
  165. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccak.h +1 -0
  166. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccakc1024.h +1 -0
  167. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccakc256.h +1 -0
  168. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccakc448.h +1 -0
  169. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccakc512.h +1 -0
  170. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccakc768.h +1 -0
  171. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/populate.py +506 -0
  172. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccak.h +2 -0
  173. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccakc1024.h +2 -0
  174. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccakc256.h +2 -0
  175. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccakc448.h +2 -0
  176. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccakc512.h +2 -0
  177. data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccakc768.h +2 -0
  178. data/ext/sha3/KeccakReferenceAndOptimized/makefile +327 -0
  179. data/ext/sha3/Makefile +240 -0
  180. data/ext/sha3/depend +28 -0
  181. data/ext/sha3/extconf.rb +21 -0
  182. data/ext/sha3/sha3.c +95 -0
  183. data/lib/sha3-ruby.rb +27 -0
  184. data/lib/sha3-ruby/version.rb +5 -0
  185. data/sha3-ruby.gemspec +21 -0
  186. metadata +233 -0
@@ -0,0 +1,686 @@
1
+ @ The Keccak sponge function, designed by Guido Bertoni, Joan Daemen,
2
+ @ Michaël Peeters and Gilles Van Assche. For more information, feedback or
3
+ @ questions, please refer to our website: http://keccak.noekeon.org/
4
+ @
5
+ @ Implementation by Ronny Van Keer,
6
+ @ hereby denoted as "the implementer".
7
+ @
8
+ @ To the extent possible under law, the implementer has waived all copyright
9
+ @ and related or neighboring rights to the source code in this file.
10
+ @ http://creativecommons.org/publicdomain/zero/1.0/
11
+
12
+ @ This file was created from a .asm file
13
+ @ using the ads2gas.pl script.
14
+ .equ DO1STROUNDING, 0
15
+
16
+ @ PRESERVE8
17
+ @ THUMB
18
+ .syntax unified
19
+ .cpu cortex-m3
20
+ .thumb
21
+
22
+
23
+ @// --- defines
24
+
25
+ .equ _ba0 , 0*4
26
+ .equ _ba1 , 1*4
27
+ .equ _be0 , 2*4
28
+ .equ _be1 , 3*4
29
+ .equ _bi0 , 4*4
30
+ .equ _bi1 , 5*4
31
+ .equ _bo0 , 6*4
32
+ .equ _bo1 , 7*4
33
+ .equ _bu0 , 8*4
34
+ .equ _bu1 , 9*4
35
+ .equ _ga0 , 10*4
36
+ .equ _ga1 , 11*4
37
+ .equ _ge0 , 12*4
38
+ .equ _ge1 , 13*4
39
+ .equ _gi0 , 14*4
40
+ .equ _gi1 , 15*4
41
+ .equ _go0 , 16*4
42
+ .equ _go1 , 17*4
43
+ .equ _gu0 , 18*4
44
+ .equ _gu1 , 19*4
45
+ .equ _ka0 , 20*4
46
+ .equ _ka1 , 21*4
47
+ .equ _ke0 , 22*4
48
+ .equ _ke1 , 23*4
49
+ .equ _ki0 , 24*4
50
+ .equ _ki1 , 25*4
51
+ .equ _ko0 , 26*4
52
+ .equ _ko1 , 27*4
53
+ .equ _ku0 , 28*4
54
+ .equ _ku1 , 29*4
55
+ .equ _ma0 , 30*4
56
+ .equ _ma1 , 31*4
57
+ .equ _me0 , 32*4
58
+ .equ _me1 , 33*4
59
+ .equ _mi0 , 34*4
60
+ .equ _mi1 , 35*4
61
+ .equ _mo0 , 36*4
62
+ .equ _mo1 , 37*4
63
+ .equ _mu0 , 38*4
64
+ .equ _mu1 , 39*4
65
+ .equ _sa0 , 40*4
66
+ .equ _sa1 , 41*4
67
+ .equ _se0 , 42*4
68
+ .equ _se1 , 43*4
69
+ .equ _si0 , 44*4
70
+ .equ _si1 , 45*4
71
+ .equ _so0 , 46*4
72
+ .equ _so1 , 47*4
73
+ .equ _su0 , 48*4
74
+ .equ _su1 , 49*4
75
+
76
+ .equ mDe1 , 50*4
77
+ .equ mDi0 , 51*4
78
+ .equ mDo0 , 52*4
79
+ .equ mDo1 , 53*4
80
+
81
+ @// --- macros
82
+
83
+ .macro xor5 result,ptr,b,g,k,m,s
84
+
85
+ ldr \result, [\ptr, #\b]
86
+ ldr r1, [\ptr, #\g]
87
+ ldr r2, [\ptr, #\k]
88
+ eor \result, \result, r1
89
+ ldr r1, [\ptr, #\m]
90
+ eor \result, \result, r2
91
+ ldr r2, [\ptr, #\s]
92
+ eor \result, \result, r1
93
+ eor \result, \result, r2
94
+ .endm
95
+
96
+ .macro xorrol b, yy, rr
97
+
98
+ eor \b, \b, \yy
99
+ ror \b, #32-\rr
100
+ .endm
101
+
102
+
103
+ .macro xandnot resptr, resofs, aa, bb, cc
104
+
105
+ bic r1, \cc, \bb
106
+ eor r1, r1, \aa
107
+ str r1, [\resptr, #\resofs]
108
+ .endm
109
+
110
+ .macro xandnotRC resptr, resofs, aa, bb, cc
111
+
112
+ ldr r1, [r3], #4
113
+ bic \cc, \cc, \bb
114
+ eor \cc, \cc, r1
115
+ eor \cc, \cc, \aa
116
+ str \cc, [\resptr, #\resofs]
117
+ .endm
118
+
119
+
120
+ .size KeccakPermutationOnWords, .-KeccakPermutationOnWords
121
+ .align 2
122
+ .global KeccakPermutationOnWordsAfterXoring_ARM_asm
123
+ .thumb
124
+ .thumb_func
125
+ .type KeccakPermutationOnWordsAfterXoring_ARM_asm, %function
126
+ KeccakPermutationOnWordsAfterXoring_ARM_asm:
127
+ @ args = 0, pretend = 0, frame = 408
128
+ @ frame_needed = 0, uses_anonymous_args = 0
129
+ @ link register save eliminated.
130
+
131
+ push {r4-r12,lr}
132
+ sub sp,sp,#4*(50+4)
133
+
134
+ movs r9, r2
135
+ beq interleaveDone
136
+ mov r8,r0
137
+ interleaveLoop:
138
+
139
+ ldr r4, [r1], #4
140
+ ldr r5, [r1], #4
141
+ ldrd r6, r7, [r8]
142
+
143
+ @// Credit: Henry S. Warren, Hacker's Delight, Addison-Wesley, 2002
144
+ and r3,r4,#0x55555555
145
+ orr r3,r3,r3, LSR #1
146
+ and r3,r3,#0x33333333
147
+ orr r3,r3,r3, LSR #2
148
+ and r3,r3,#0x0F0F0F0F
149
+ orr r3,r3,r3, LSR #4
150
+ and r3,r3,#0x00FF00FF
151
+ bfi r3,r3,#8, #8
152
+ eor r6,r6,r3, LSR #8
153
+
154
+ and r3,r5,#0x55555555
155
+ orr r3,r3,r3, LSR #1
156
+ and r3,r3,#0x33333333
157
+ orr r3,r3,r3, LSR #2
158
+ and r3,r3,#0x0F0F0F0F
159
+ orr r3,r3,r3, LSR #4
160
+ and r3,r3,#0x00FF00FF
161
+ orr r3,r3,r3, LSR #8
162
+ eor r6,r6,r3, LSL #16
163
+
164
+ and r3,r4,#0xAAAAAAAA
165
+ orr r3,r3,r3, LSL #1
166
+ and r3,r3,#0xCCCCCCCC
167
+ orr r3,r3,r3, LSL #2
168
+ and r3,r3,#0xF0F0F0F0
169
+ orr r3,r3,r3, LSL #4
170
+ and r3,r3,#0xFF00FF00
171
+ orr r3,r3,r3, LSL #8
172
+ eor r7,r7,r3, LSR #16
173
+
174
+ and r3,r5,#0xAAAAAAAA
175
+ orr r3,r3,r3, LSL #1
176
+ and r3,r3,#0xCCCCCCCC
177
+ orr r3,r3,r3, LSL #2
178
+ and r3,r3,#0xF0F0F0F0
179
+ orr r3,r3,r3, LSL #4
180
+ and r3,r3,#0xFF00FF00
181
+ orr r3,r3,r3, LSL #8
182
+ bfc r3, #0, #16
183
+ eor r7,r7,r3
184
+
185
+ strd r6,r7,[r8], #8
186
+
187
+ subs r9,r9,#1
188
+ bne interleaveLoop
189
+
190
+ interleaveDone:
191
+
192
+ ldr r3, =KeccakF1600RoundConstantsWithTerminator
193
+ b roundLoop @//jump over the table
194
+ .ltorg
195
+
196
+ @ ALIGN
197
+
198
+ KeccakF1600RoundConstantsWithTerminator:
199
+ @// 0 1
200
+ .word 0x00000001
201
+ .word 0x00000000
202
+ .word 0x00000000
203
+ .word 0x00000089
204
+ .word 0x00000000
205
+ .word 0x8000008b
206
+ .word 0x00000000
207
+ .word 0x80008080
208
+ .word 0x00000001
209
+ .word 0x0000008b
210
+ .word 0x00000001
211
+ .word 0x00008000
212
+ .word 0x00000001
213
+ .word 0x80008088
214
+ .word 0x00000001
215
+ .word 0x80000082
216
+ .word 0x00000000
217
+ .word 0x0000000b
218
+ .word 0x00000000
219
+ .word 0x0000000a
220
+ .word 0x00000001
221
+ .word 0x00008082
222
+ .word 0x00000000
223
+ .word 0x00008003
224
+ .word 0x00000001
225
+ .word 0x0000808b
226
+ .word 0x00000001
227
+ .word 0x8000000b
228
+ .word 0x00000001
229
+ .word 0x8000008a
230
+ .word 0x00000001
231
+ .word 0x80000081
232
+ .word 0x00000000
233
+ .word 0x80000081
234
+ .word 0x00000000
235
+ .word 0x80000008
236
+ .word 0x00000000
237
+ .word 0x00000083
238
+ .word 0x00000000
239
+ .word 0x80008003
240
+ .word 0x00000001
241
+ .word 0x80008088
242
+ .word 0x00000000
243
+ .word 0x80000088
244
+ .word 0x00000001
245
+ .word 0x00008000
246
+ .word 0x00000000
247
+ .word 0x80008082
248
+ .word 0xFFFFFFFF @//terminator
249
+
250
+ roundLoop:
251
+
252
+ @//prepTheta A
253
+ xor5 r10, r0,_bu0, _gu0, _ku0, _mu0, _su0
254
+ xor5 r6, r0,_be1, _ge1, _ke1, _me1, _se1
255
+ eor r5, r10, r6, ROR #31
256
+ xor5 r11, r0,_bu1, _gu1, _ku1, _mu1, _su1
257
+ xor5 r7, r0,_be0, _ge0, _ke0, _me0, _se0
258
+ eor r4, r11, r7
259
+
260
+ xor5 r8, r0,_bi0, _gi0, _ki0, _mi0, _si0
261
+ eor r1, r8, r11, ROR #31
262
+ str r1, [sp, #mDo0]
263
+ xor5 r9, r0,_bi1, _gi1, _ki1, _mi1, _si1
264
+ eor r1, r9, r10
265
+ str r1, [sp, #mDo1]
266
+
267
+ xor5 r10, r0,_ba0, _ga0, _ka0, _ma0, _sa0
268
+ eor lr, r10, r9, ROR #31
269
+ xor5 r11, r0,_ba1, _ga1, _ka1, _ma1, _sa1
270
+ eor r1, r11, r8
271
+ str r1, [sp, #mDe1]
272
+
273
+ xor5 r9, r0,_bo1, _go1, _ko1, _mo1, _so1
274
+ eor r1, r7, r9, ROR #31
275
+ str r1, [sp, #mDi0]
276
+ xor5 r8, r0,_bo0, _go0, _ko0, _mo0, _so0
277
+ eor r2, r6, r8
278
+
279
+ eor r7, r8, r11, ROR #31
280
+ eor r6, r9, r10
281
+
282
+ @//thetaRhoPiChiIota 0, in A, out E
283
+ ldr r8, [r0, #_ba0]
284
+ ldr r9, [r0, #_ge0]
285
+ ldr r10, [r0, #_ki1]
286
+ ldr r11, [r0, #_mo1]
287
+ ldr r12, [r0, #_su0]
288
+ ldr r1, [sp, #mDo1]
289
+ eor r8, r8, r5
290
+ xorrol r9, lr, 22
291
+ xorrol r10, r2, 22
292
+ xorrol r11, r1, 11
293
+ xorrol r12, r7, 7
294
+ xandnot sp, _be0, r9, r10, r11
295
+ xandnot sp, _bi0, r10, r11, r12
296
+ xandnot sp, _bo0, r11, r12, r8
297
+ xandnot sp, _bu0, r12, r8, r9
298
+ xandnotRC sp, _ba0, r8, r9, r10
299
+
300
+ ldr r8, [r0, #_bo0]
301
+ ldr r1, [sp, #mDo0]
302
+ ldr r9, [r0, #_gu0]
303
+ xorrol r8, r1, 14
304
+ ldr r1, [sp, #mDe1]
305
+ ldr r10, [r0, #_ka1]
306
+ ldr r11, [r0, #_me1]
307
+ ldr r12, [r0, #_si1]
308
+ xorrol r9, r7, 10
309
+ xorrol r10, r4, 2
310
+ xorrol r11, r1, 23
311
+ xorrol r12, r2, 31
312
+ xandnot sp, _ga0, r8, r9, r10
313
+ xandnot sp, _ge0, r9, r10, r11
314
+ xandnot sp, _gi0, r10, r11, r12
315
+ xandnot sp, _go0, r11, r12, r8
316
+ xandnot sp, _gu0, r12, r8, r9
317
+
318
+ ldr r8, [r0, #_be1]
319
+ ldr r1, [sp, #mDe1]
320
+ ldr r9, [r0, #_gi0]
321
+ xorrol r8, r1, 1
322
+ ldr r1, [sp, #mDi0]
323
+ ldr r10, [r0, #_ko1]
324
+ xorrol r9, r1, 3
325
+ ldr r1, [sp, #mDo1]
326
+ ldr r11, [r0, #_mu0]
327
+ ldr r12, [r0, #_sa0]
328
+ xorrol r10, r1, 13
329
+ xorrol r11, r7, 4
330
+ xorrol r12, r5, 9
331
+ xandnot sp, _ka0, r8, r9, r10
332
+ xandnot sp, _ke0, r9, r10, r11
333
+ xandnot sp, _ki0, r10, r11, r12
334
+ xandnot sp, _ko0, r11, r12, r8
335
+ xandnot sp, _ku0, r12, r8, r9
336
+
337
+ ldr r8, [r0, #_bu1]
338
+ ldr r9, [r0, #_ga0]
339
+ ldr r10, [r0, #_ke0]
340
+ ldr r11, [r0, #_mi1]
341
+ ldr r12, [r0, #_so0]
342
+ ldr r1, [sp, #mDo0]
343
+ xorrol r8, r6, 14
344
+ xorrol r9, r5, 18
345
+ xorrol r10, lr, 5
346
+ xorrol r11, r2, 8
347
+ xorrol r12, r1, 28
348
+ xandnot sp, _ma0, r8, r9, r10
349
+ xandnot sp, _me0, r9, r10, r11
350
+ xandnot sp, _mi0, r10, r11, r12
351
+ xandnot sp, _mo0, r11, r12, r8
352
+ xandnot sp, _mu0, r12, r8, r9
353
+
354
+ ldr r1, [sp, #mDi0]
355
+ ldr r8, [r0, #_bi0]
356
+ ldr r9, [r0, #_go1]
357
+ xorrol r8, r1, 31
358
+ ldr r1, [sp, #mDo1]
359
+ ldr r10, [r0, #_ku1]
360
+ xorrol r9, r1, 28
361
+ ldr r11, [r0, #_ma1]
362
+ ldr r12, [r0, #_se0]
363
+ xorrol r10, r6, 20
364
+ xorrol r11, r4, 21
365
+ xorrol r12, lr, 1
366
+ xandnot sp, _sa0, r8, r9, r10
367
+ xandnot sp, _se0, r9, r10, r11
368
+ xandnot sp, _si0, r10, r11, r12
369
+ xandnot sp, _so0, r11, r12, r8
370
+ xandnot sp, _su0, r12, r8, r9
371
+
372
+ @// thetaRhoPiChiIota 1, in A, out E
373
+ ldr r1, [sp, #mDe1]
374
+ ldr r9, [r0, #_ge1]
375
+ ldr r8, [r0, #_ba1]
376
+ xorrol r9, r1, 22
377
+ ldr r1, [sp, #mDi0]
378
+ ldr r10, [r0, #_ki0]
379
+ eor r8, r8, r4
380
+ xorrol r10, r1, 21
381
+ ldr r1, [sp, #mDo0]
382
+ ldr r11, [r0, #_mo0]
383
+ ldr r12, [r0, #_su1]
384
+ xorrol r11, r1, 10
385
+ xorrol r12, r6, 7
386
+ xandnot sp, _be1, r9, r10, r11
387
+ xandnot sp, _bi1, r10, r11, r12
388
+ xandnot sp, _bo1, r11, r12, r8
389
+ xandnot sp, _bu1, r12, r8, r9
390
+ xandnotRC sp, _ba1, r8, r9, r10
391
+
392
+ ldr r1, [sp, #mDo1]
393
+ ldr r8, [r0, #_bo1]
394
+ ldr r12, [r0, #_si0]
395
+ xorrol r8, r1, 14
396
+ ldr r1, [sp, #mDi0]
397
+ ldr r9, [r0, #_gu1]
398
+ xorrol r12, r1, 30
399
+ ldr r10, [r0, #_ka0]
400
+ ldr r11, [r0, #_me0]
401
+ xorrol r9, r6, 10
402
+ xorrol r10, r5, 1
403
+ xorrol r11, lr, 22
404
+ xandnot sp, _ga1, r8, r9, r10
405
+ xandnot sp, _ge1, r9, r10, r11
406
+ xandnot sp, _gi1, r10, r11, r12
407
+ xandnot sp, _go1, r11, r12, r8
408
+ xandnot sp, _gu1, r12, r8, r9
409
+
410
+ ldr r1, [sp, #mDo0]
411
+ ldr r10, [r0, #_ko0]
412
+ ldr r8, [r0, #_be0]
413
+ xorrol r10, r1, 12
414
+ ldr r9, [r0, #_gi1]
415
+ ldr r11, [r0, #_mu1]
416
+ ldr r12, [r0, #_sa1]
417
+ eor r8, r8, lr
418
+ xorrol r9, r2, 3
419
+ xorrol r11, r6, 4
420
+ xorrol r12, r4, 9
421
+ xandnot sp, _ka1, r8, r9, r10
422
+ xandnot sp, _ke1, r9, r10, r11
423
+ xandnot sp, _ki1, r10, r11, r12
424
+ xandnot sp, _ko1, r11, r12, r8
425
+ xandnot sp, _ku1, r12, r8, r9
426
+
427
+ ldr r1, [sp, #mDe1]
428
+ ldr r10, [r0, #_ke1]
429
+ ldr r11, [r0, #_mi0]
430
+ xorrol r10, r1, 5
431
+ ldr r1, [sp, #mDi0]
432
+ ldr r12, [r0, #_so1]
433
+ xorrol r11, r1, 7
434
+ ldr r1, [sp, #mDo1]
435
+ ldr r8, [r0, #_bu0]
436
+ ldr r9, [r0, #_ga1]
437
+ xorrol r8, r7, 13
438
+ xorrol r9, r4, 18
439
+ xorrol r12, r1, 28
440
+ xandnot sp, _ma1, r8, r9, r10
441
+ xandnot sp, _me1, r9, r10, r11
442
+ xandnot sp, _mi1, r10, r11, r12
443
+ xandnot sp, _mo1, r11, r12, r8
444
+ xandnot sp, _mu1, r12, r8, r9
445
+
446
+ ldr r1, [sp, #mDo0]
447
+ ldr r9, [r0, #_go0]
448
+ ldr r8, [r0, #_bi1]
449
+ xorrol r9, r1, 27
450
+ ldr r10, [r0, #_ku0]
451
+ ldr r11, [r0, #_ma0]
452
+ ldr r12, [r0, #_se1]
453
+ ldr r1, [sp, #mDe1]
454
+ xorrol r8, r2, 31
455
+ xorrol r10, r7, 19
456
+ xorrol r11, r5, 20
457
+ xorrol r12, r1, 1
458
+ xandnot sp, _sa1, r8, r9, r10
459
+ xandnot sp, _se1, r9, r10, r11
460
+ xandnot sp, _si1, r10, r11, r12
461
+ xandnot sp, _so1, r11, r12, r8
462
+ xandnot sp, _su1, r12, r8, r9
463
+
464
+ @//prepTheta E
465
+ xor5 r10, sp,_bu0, _gu0, _ku0, _mu0, _su0
466
+ xor5 r6, sp,_be1, _ge1, _ke1, _me1, _se1
467
+ eor r5, r10, r6, ROR #31
468
+ xor5 r11, sp,_bu1, _gu1, _ku1, _mu1, _su1
469
+ xor5 r7, sp,_be0, _ge0, _ke0, _me0, _se0
470
+ eor r4, r11, r7
471
+
472
+ xor5 r8, sp,_bi0, _gi0, _ki0, _mi0, _si0
473
+ eor r1, r8, r11, ROR #31
474
+ str r1, [sp, #mDo0]
475
+ xor5 r9, sp,_bi1, _gi1, _ki1, _mi1, _si1
476
+ eor r1, r9, r10
477
+ str r1, [sp, #mDo1]
478
+
479
+ xor5 r10, sp,_ba0, _ga0, _ka0, _ma0, _sa0
480
+ eor lr, r10, r9, ROR #31
481
+ xor5 r11, sp,_ba1, _ga1, _ka1, _ma1, _sa1
482
+ eor r1, r11, r8
483
+ str r1, [sp, #mDe1]
484
+
485
+ xor5 r9, sp,_bo1, _go1, _ko1, _mo1, _so1
486
+ eor r1, r7, r9, ROR #31
487
+ str r1, [sp, #mDi0]
488
+ xor5 r8, sp,_bo0, _go0, _ko0, _mo0, _so0
489
+ eor r2, r6, r8
490
+
491
+ eor r7, r8, r11, ROR #31
492
+ eor r6, r9, r10
493
+
494
+ @//thetaRhoPiChiIota 0, in E, out A
495
+ ldr r8, [sp, #_ba0]
496
+ ldr r9, [sp, #_ge0]
497
+ ldr r10, [sp, #_ki1]
498
+ ldr r11, [sp, #_mo1]
499
+ ldr r12, [sp, #_su0]
500
+ ldr r1, [sp, #mDo1]
501
+ eor r8, r8, r5
502
+ xorrol r9, lr, 22
503
+ xorrol r10, r2, 22
504
+ xorrol r11, r1, 11
505
+ xorrol r12, r7, 7
506
+ xandnot r0, _be0, r9, r10, r11
507
+ xandnot r0, _bi0, r10, r11, r12
508
+ xandnot r0, _bo0, r11, r12, r8
509
+ xandnot r0, _bu0, r12, r8, r9
510
+ xandnotRC r0, _ba0, r8, r9, r10
511
+
512
+ ldr r8, [sp, #_bo0]
513
+ ldr r1, [sp, #mDo0]
514
+ ldr r9, [sp, #_gu0]
515
+ xorrol r8, r1, 14
516
+ ldr r1, [sp, #mDe1]
517
+ ldr r10, [sp, #_ka1]
518
+ ldr r11, [sp, #_me1]
519
+ ldr r12, [sp, #_si1]
520
+ xorrol r9, r7, 10
521
+ xorrol r10, r4, 2
522
+ xorrol r11, r1, 23
523
+ xorrol r12, r2, 31
524
+ xandnot r0, _ga0, r8, r9, r10
525
+ xandnot r0, _ge0, r9, r10, r11
526
+ xandnot r0, _gi0, r10, r11, r12
527
+ xandnot r0, _go0, r11, r12, r8
528
+ xandnot r0, _gu0, r12, r8, r9
529
+
530
+ ldr r8, [sp, #_be1]
531
+ ldr r1, [sp, #mDe1]
532
+ ldr r9, [sp, #_gi0]
533
+ xorrol r8, r1, 1
534
+ ldr r1, [sp, #mDi0]
535
+ ldr r10, [sp, #_ko1]
536
+ xorrol r9, r1, 3
537
+ ldr r1, [sp, #mDo1]
538
+ ldr r11, [sp, #_mu0]
539
+ ldr r12, [sp, #_sa0]
540
+ xorrol r10, r1, 13
541
+ xorrol r11, r7, 4
542
+ xorrol r12, r5, 9
543
+ xandnot r0, _ka0, r8, r9, r10
544
+ xandnot r0, _ke0, r9, r10, r11
545
+ xandnot r0, _ki0, r10, r11, r12
546
+ xandnot r0, _ko0, r11, r12, r8
547
+ xandnot r0, _ku0, r12, r8, r9
548
+
549
+ ldr r8, [sp, #_bu1]
550
+ ldr r9, [sp, #_ga0]
551
+ ldr r10, [sp, #_ke0]
552
+ ldr r11, [sp, #_mi1]
553
+ ldr r12, [sp, #_so0]
554
+ ldr r1, [sp, #mDo0]
555
+ xorrol r8, r6, 14
556
+ xorrol r9, r5, 18
557
+ xorrol r10, lr, 5
558
+ xorrol r11, r2, 8
559
+ xorrol r12, r1, 28
560
+ xandnot r0, _ma0, r8, r9, r10
561
+ xandnot r0, _me0, r9, r10, r11
562
+ xandnot r0, _mi0, r10, r11, r12
563
+ xandnot r0, _mo0, r11, r12, r8
564
+ xandnot r0, _mu0, r12, r8, r9
565
+
566
+ ldr r1, [sp, #mDi0]
567
+ ldr r8, [sp, #_bi0]
568
+ ldr r9, [sp, #_go1]
569
+ xorrol r8, r1, 31
570
+ ldr r1, [sp, #mDo1]
571
+ ldr r10, [sp, #_ku1]
572
+ xorrol r9, r1, 28
573
+ ldr r11, [sp, #_ma1]
574
+ ldr r12, [sp, #_se0]
575
+ xorrol r10, r6, 20
576
+ xorrol r11, r4, 21
577
+ xorrol r12, lr, 1
578
+ xandnot r0, _sa0, r8, r9, r10
579
+ xandnot r0, _se0, r9, r10, r11
580
+ xandnot r0, _si0, r10, r11, r12
581
+ xandnot r0, _so0, r11, r12, r8
582
+ xandnot r0, _su0, r12, r8, r9
583
+
584
+ @// thetaRhoPiChiIota 1, in A, out E
585
+ ldr r1, [sp, #mDe1]
586
+ ldr r9, [sp, #_ge1]
587
+ ldr r8, [sp, #_ba1]
588
+ xorrol r9, r1, 22
589
+ ldr r1, [sp, #mDi0]
590
+ ldr r10, [sp, #_ki0]
591
+ eor r8, r8, r4
592
+ xorrol r10, r1, 21
593
+ ldr r1, [sp, #mDo0]
594
+ ldr r11, [sp, #_mo0]
595
+ ldr r12, [sp, #_su1]
596
+ xorrol r11, r1, 10
597
+ xorrol r12, r6, 7
598
+ xandnot r0, _be1, r9, r10, r11
599
+ xandnot r0, _bi1, r10, r11, r12
600
+ xandnot r0, _bo1, r11, r12, r8
601
+ xandnot r0, _bu1, r12, r8, r9
602
+ xandnotRC r0, _ba1, r8, r9, r10
603
+
604
+ ldr r1, [sp, #mDo1]
605
+ ldr r8, [sp, #_bo1]
606
+ ldr r12, [sp, #_si0]
607
+ xorrol r8, r1, 14
608
+ ldr r1, [sp, #mDi0]
609
+ ldr r9, [sp, #_gu1]
610
+ xorrol r12, r1, 30
611
+ ldr r10, [sp, #_ka0]
612
+ ldr r11, [sp, #_me0]
613
+ xorrol r9, r6, 10
614
+ xorrol r10, r5, 1
615
+ xorrol r11, lr, 22
616
+ xandnot r0, _ga1, r8, r9, r10
617
+ xandnot r0, _ge1, r9, r10, r11
618
+ xandnot r0, _gi1, r10, r11, r12
619
+ xandnot r0, _go1, r11, r12, r8
620
+ xandnot r0, _gu1, r12, r8, r9
621
+
622
+ ldr r1, [sp, #mDo0]
623
+ ldr r10, [sp, #_ko0]
624
+ ldr r8, [sp, #_be0]
625
+ xorrol r10, r1, 12
626
+ ldr r9, [sp, #_gi1]
627
+ ldr r11, [sp, #_mu1]
628
+ ldr r12, [sp, #_sa1]
629
+ eor r8, r8, lr
630
+ xorrol r9, r2, 3
631
+ xorrol r11, r6, 4
632
+ xorrol r12, r4, 9
633
+ xandnot r0, _ka1, r8, r9, r10
634
+ xandnot r0, _ke1, r9, r10, r11
635
+ xandnot r0, _ki1, r10, r11, r12
636
+ xandnot r0, _ko1, r11, r12, r8
637
+ xandnot r0, _ku1, r12, r8, r9
638
+
639
+ ldr r1, [sp, #mDe1]
640
+ ldr r10, [sp, #_ke1]
641
+ ldr r11, [sp, #_mi0]
642
+ xorrol r10, r1, 5
643
+ ldr r1, [sp, #mDi0]
644
+ ldr r12, [sp, #_so1]
645
+ xorrol r11, r1, 7
646
+ ldr r1, [sp, #mDo1]
647
+ ldr r8, [sp, #_bu0]
648
+ ldr r9, [sp, #_ga1]
649
+ xorrol r8, r7, 13
650
+ xorrol r9, r4, 18
651
+ xorrol r12, r1, 28
652
+ xandnot r0, _ma1, r8, r9, r10
653
+ xandnot r0, _me1, r9, r10, r11
654
+ xandnot r0, _mi1, r10, r11, r12
655
+ xandnot r0, _mo1, r11, r12, r8
656
+ xandnot r0, _mu1, r12, r8, r9
657
+
658
+ ldr r1, [sp, #mDo0]
659
+ ldr r9, [sp, #_go0]
660
+ ldr r8, [sp, #_bi1]
661
+ xorrol r9, r1, 27
662
+ ldr r10, [sp, #_ku0]
663
+ ldr r11, [sp, #_ma0]
664
+ ldr r12, [sp, #_se1]
665
+ ldr r1, [sp, #mDe1]
666
+ xorrol r8, r2, 31
667
+ xorrol r10, r7, 19
668
+ xorrol r11, r5, 20
669
+ xorrol r12, r1, 1
670
+ xandnot r0, _sa1, r8, r9, r10
671
+ xandnot r0, _se1, r9, r10, r11
672
+ xandnot r0, _si1, r10, r11, r12
673
+ xandnot r0, _so1, r11, r12, r8
674
+ ldr r10, [r3]
675
+ xandnot r0, _su1, r12, r8, r9
676
+
677
+ cmp r10, #0xFFFFFFFF
678
+ bne roundLoop
679
+
680
+ add sp,sp,#4*(50+4)
681
+ pop {r4-r12,pc}
682
+
683
+ @
684
+
685
+ @ ALIGN
686
+