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,201 @@
1
+ <?xml version="1.0" encoding="Windows-1252"?>
2
+ <VisualStudioProject
3
+ ProjectType="Visual C++"
4
+ Version="9,00"
5
+ Name="KeccakSimple32BI"
6
+ ProjectGUID="{C0704E89-9D64-4BD9-B1D0-122983950296}"
7
+ RootNamespace="KeccakSimple32BI"
8
+ Keyword="Win32Proj"
9
+ TargetFrameworkVersion="196613"
10
+ >
11
+ <Platforms>
12
+ <Platform
13
+ Name="Win32"
14
+ />
15
+ </Platforms>
16
+ <ToolFiles>
17
+ </ToolFiles>
18
+ <Configurations>
19
+ <Configuration
20
+ Name="Debug|Win32"
21
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
22
+ IntermediateDirectory="$(ConfigurationName)"
23
+ ConfigurationType="1"
24
+ CharacterSet="1"
25
+ >
26
+ <Tool
27
+ Name="VCPreBuildEventTool"
28
+ />
29
+ <Tool
30
+ Name="VCCustomBuildTool"
31
+ />
32
+ <Tool
33
+ Name="VCXMLDataGeneratorTool"
34
+ />
35
+ <Tool
36
+ Name="VCWebServiceProxyGeneratorTool"
37
+ />
38
+ <Tool
39
+ Name="VCMIDLTool"
40
+ />
41
+ <Tool
42
+ Name="VCCLCompilerTool"
43
+ Optimization="0"
44
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
45
+ MinimalRebuild="true"
46
+ BasicRuntimeChecks="3"
47
+ RuntimeLibrary="3"
48
+ UsePrecompiledHeader="0"
49
+ WarningLevel="3"
50
+ DebugInformationFormat="4"
51
+ />
52
+ <Tool
53
+ Name="VCManagedResourceCompilerTool"
54
+ />
55
+ <Tool
56
+ Name="VCResourceCompilerTool"
57
+ />
58
+ <Tool
59
+ Name="VCPreLinkEventTool"
60
+ />
61
+ <Tool
62
+ Name="VCLinkerTool"
63
+ LinkIncremental="2"
64
+ GenerateDebugInformation="true"
65
+ SubSystem="1"
66
+ TargetMachine="1"
67
+ />
68
+ <Tool
69
+ Name="VCALinkTool"
70
+ />
71
+ <Tool
72
+ Name="VCManifestTool"
73
+ />
74
+ <Tool
75
+ Name="VCXDCMakeTool"
76
+ />
77
+ <Tool
78
+ Name="VCBscMakeTool"
79
+ />
80
+ <Tool
81
+ Name="VCFxCopTool"
82
+ />
83
+ <Tool
84
+ Name="VCAppVerifierTool"
85
+ />
86
+ <Tool
87
+ Name="VCPostBuildEventTool"
88
+ />
89
+ </Configuration>
90
+ <Configuration
91
+ Name="Release|Win32"
92
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
93
+ IntermediateDirectory="$(ConfigurationName)"
94
+ ConfigurationType="1"
95
+ CharacterSet="1"
96
+ WholeProgramOptimization="1"
97
+ >
98
+ <Tool
99
+ Name="VCPreBuildEventTool"
100
+ />
101
+ <Tool
102
+ Name="VCCustomBuildTool"
103
+ />
104
+ <Tool
105
+ Name="VCXMLDataGeneratorTool"
106
+ />
107
+ <Tool
108
+ Name="VCWebServiceProxyGeneratorTool"
109
+ />
110
+ <Tool
111
+ Name="VCMIDLTool"
112
+ />
113
+ <Tool
114
+ Name="VCCLCompilerTool"
115
+ Optimization="2"
116
+ EnableIntrinsicFunctions="true"
117
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
118
+ RuntimeLibrary="2"
119
+ EnableFunctionLevelLinking="true"
120
+ UsePrecompiledHeader="0"
121
+ WarningLevel="3"
122
+ DebugInformationFormat="3"
123
+ />
124
+ <Tool
125
+ Name="VCManagedResourceCompilerTool"
126
+ />
127
+ <Tool
128
+ Name="VCResourceCompilerTool"
129
+ />
130
+ <Tool
131
+ Name="VCPreLinkEventTool"
132
+ />
133
+ <Tool
134
+ Name="VCLinkerTool"
135
+ LinkIncremental="1"
136
+ GenerateDebugInformation="true"
137
+ SubSystem="1"
138
+ OptimizeReferences="2"
139
+ EnableCOMDATFolding="2"
140
+ TargetMachine="1"
141
+ />
142
+ <Tool
143
+ Name="VCALinkTool"
144
+ />
145
+ <Tool
146
+ Name="VCManifestTool"
147
+ />
148
+ <Tool
149
+ Name="VCXDCMakeTool"
150
+ />
151
+ <Tool
152
+ Name="VCBscMakeTool"
153
+ />
154
+ <Tool
155
+ Name="VCFxCopTool"
156
+ />
157
+ <Tool
158
+ Name="VCAppVerifierTool"
159
+ />
160
+ <Tool
161
+ Name="VCPostBuildEventTool"
162
+ />
163
+ </Configuration>
164
+ </Configurations>
165
+ <References>
166
+ </References>
167
+ <Files>
168
+ <Filter
169
+ Name="Source Files"
170
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
171
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
172
+ >
173
+ <File
174
+ RelativePath="Sources\Keccak-simple-test.c"
175
+ >
176
+ </File>
177
+ <File
178
+ RelativePath="Sources\Keccak-simple32BI.c"
179
+ >
180
+ </File>
181
+ </Filter>
182
+ <Filter
183
+ Name="Header Files"
184
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
185
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
186
+ >
187
+ <File
188
+ RelativePath="Sources\Keccak-simple-settings.h"
189
+ >
190
+ </File>
191
+ </Filter>
192
+ <Filter
193
+ Name="Resource Files"
194
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
195
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
196
+ >
197
+ </Filter>
198
+ </Files>
199
+ <Globals>
200
+ </Globals>
201
+ </VisualStudioProject>
@@ -0,0 +1,27 @@
1
+ /*
2
+ File: AVR8-rotate64.h
3
+
4
+ This code is originally by Daniel Otte (daniel.otte@rub.de) in 2006-2010 as part of the AVR-Crypto-Lib, and was then improved by Ronny Van Keer, STMicroelectronics, in 2010.
5
+
6
+ Implementation by Daniel Otte and Ronny Van Keer,
7
+ hereby denoted as "the implementer".
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
+ #ifndef ROTATE64_H_
15
+ #define ROTATE64_H_
16
+
17
+ #include <stdint.h>
18
+
19
+
20
+ #define ROT_CODE(a) ((((a)/8+((((a)%8)>4)?1:0))<<4) | ((a) & 7))
21
+
22
+ uint64_t rotate64_1bit_left(uint64_t a);
23
+ uint64_t rotate64_1bit_right(uint64_t a);
24
+ uint64_t rotate64left_code(uint64_t a, int8_t code);
25
+
26
+ #endif /* ROTATE64_H_ */
27
+
@@ -0,0 +1,285 @@
1
+ /*
2
+ File: AVR8-rotate64.s
3
+
4
+ This code is originally by Daniel Otte (daniel.otte@rub.de) in 2006-2010 as part of the AVR-Crypto-Lib, and was then improved by Ronny Van Keer, STMicroelectronics, in 2010.
5
+
6
+ Implementation by Daniel Otte and Ronny Van Keer,
7
+ hereby denoted as "the implementer".
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
+ .global rotate64_1bit_left
15
+ rotate64_4bit_left:
16
+ lsl r18
17
+ rol r19
18
+ rol r20
19
+ rol r21
20
+ rol r22
21
+ rol r23
22
+ rol r24
23
+ rol r25
24
+ adc r18, r1
25
+ rotate64_3bit_left:
26
+ lsl r18
27
+ rol r19
28
+ rol r20
29
+ rol r21
30
+ rol r22
31
+ rol r23
32
+ rol r24
33
+ rol r25
34
+ adc r18, r1
35
+ rotate64_2bit_left:
36
+ lsl r18
37
+ rol r19
38
+ rol r20
39
+ rol r21
40
+ rol r22
41
+ rol r23
42
+ rol r24
43
+ rol r25
44
+ adc r18, r1
45
+ rotate64_1bit_left:
46
+ lsl r18
47
+ rol r19
48
+ rol r20
49
+ rol r21
50
+ rol r22
51
+ rol r23
52
+ rol r24
53
+ rol r25
54
+ adc r18, r1
55
+ ret
56
+
57
+ .global rotate64_1bit_right
58
+ rotate64_3bit_right:
59
+ bst r18, 0
60
+ ror r25
61
+ ror r24
62
+ ror r23
63
+ ror r22
64
+ ror r21
65
+ ror r20
66
+ ror r19
67
+ ror r18
68
+ bld r25, 7
69
+ rotate64_2bit_right:
70
+ bst r18, 0
71
+ ror r25
72
+ ror r24
73
+ ror r23
74
+ ror r22
75
+ ror r21
76
+ ror r20
77
+ ror r19
78
+ ror r18
79
+ bld r25, 7
80
+ rotate64_1bit_right:
81
+ bst r18, 0
82
+ ror r25
83
+ ror r24
84
+ ror r23
85
+ ror r22
86
+ ror r21
87
+ ror r20
88
+ ror r19
89
+ ror r18
90
+ bld r25, 7
91
+ ret
92
+
93
+ /*
94
+ ** Each byte rotate routine must be 16 instructions long.
95
+ */
96
+ rotate64_0byte_left:
97
+ andi r16, 0x07
98
+ ldi r30, pm_lo8(bit_rot_jmp_table)
99
+ ldi r31, pm_hi8(bit_rot_jmp_table)
100
+ add r30, r16
101
+
102
+ adc r31, r1
103
+ ijmp
104
+ nop
105
+ nop
106
+
107
+ nop
108
+ nop
109
+ nop
110
+ nop
111
+
112
+ nop
113
+ nop
114
+ nop
115
+ nop
116
+
117
+ rotate64_1byte_left:
118
+ mov r0, r25
119
+ mov r25, r24
120
+ mov r24, r23
121
+ mov r23, r22
122
+
123
+ mov r22, r21
124
+ mov r21, r20
125
+ mov r20, r19
126
+ mov r19, r18
127
+
128
+ mov r18, r0
129
+ andi r16, 0x07
130
+ ldi r30, pm_lo8(bit_rot_jmp_table)
131
+ ldi r31, pm_hi8(bit_rot_jmp_table)
132
+
133
+ add r30, r16
134
+ adc r31, r1
135
+ ijmp
136
+ nop
137
+
138
+ rotate64_2byte_left:
139
+ movw r0, r24
140
+ movw r24, r22
141
+ movw r22, r20
142
+ movw r20, r18
143
+
144
+ movw r18, r0
145
+ clr r1
146
+ andi r16, 0x07
147
+ ldi r30, pm_lo8(bit_rot_jmp_table)
148
+
149
+ ldi r31, pm_hi8(bit_rot_jmp_table)
150
+ add r30, r16
151
+ adc r31, r1
152
+ ijmp
153
+
154
+ nop
155
+ nop
156
+ nop
157
+ nop
158
+
159
+ rotate64_3byte_left:
160
+ mov r0, r25
161
+ mov r25, r22
162
+ mov r22, r19
163
+ mov r19, r24
164
+
165
+ mov r24, r21
166
+ mov r21, r18
167
+ mov r18, r23
168
+ mov r23, r20
169
+
170
+ mov r20, r0
171
+ andi r16, 0x07
172
+ ldi r30, pm_lo8(bit_rot_jmp_table)
173
+ ldi r31, pm_hi8(bit_rot_jmp_table)
174
+
175
+ add r30, r16
176
+ adc r31, r1
177
+ ijmp
178
+ nop
179
+
180
+ rotate64_4byte_left:
181
+ movw r0, r24
182
+ movw r24, r20
183
+ movw r20, r0
184
+ movw r0, r22
185
+
186
+ movw r22, r18
187
+ movw r18, r0
188
+ clr r1
189
+ andi r16, 0x07
190
+
191
+ ldi r30, pm_lo8(bit_rot_jmp_table)
192
+ ldi r31, pm_hi8(bit_rot_jmp_table)
193
+ add r30, r16
194
+ adc r31, r1
195
+
196
+ ijmp
197
+ nop
198
+ nop
199
+ nop
200
+
201
+ rotate64_5byte_left:
202
+ mov r0, r25
203
+ mov r25, r20
204
+ mov r20, r23
205
+ mov r23, r18
206
+
207
+ mov r18, r21
208
+ mov r21, r24
209
+ mov r24, r19
210
+ mov r19, r22
211
+
212
+ mov r22, r0
213
+ andi r16, 0x07
214
+ ldi r30, pm_lo8(bit_rot_jmp_table)
215
+ ldi r31, pm_hi8(bit_rot_jmp_table)
216
+
217
+ add r30, r16
218
+ adc r31, r1
219
+ ijmp
220
+ nop
221
+
222
+ rotate64_6byte_left:
223
+ movw r0, r18
224
+ movw r18, r20
225
+ movw r20, r22
226
+ movw r22, r24
227
+
228
+ movw r24, r0
229
+ clr r1
230
+ andi r16, 0x07
231
+ ldi r30, pm_lo8(bit_rot_jmp_table)
232
+
233
+ ldi r31, pm_hi8(bit_rot_jmp_table)
234
+ add r30, r16
235
+ adc r31, r1
236
+ ijmp
237
+
238
+ nop
239
+ nop
240
+ nop
241
+ nop
242
+
243
+ rotate64_7byte_left:
244
+ mov r0, r18
245
+ mov r18, r19
246
+ mov r19, r20
247
+ mov r20, r21
248
+
249
+ mov r21, r22
250
+ mov r22, r23
251
+ mov r23, r24
252
+ mov r24, r25
253
+
254
+ mov r25, r0
255
+ andi r16, 0x07
256
+ ldi r30, pm_lo8(bit_rot_jmp_table)
257
+ ldi r31, pm_hi8(bit_rot_jmp_table)
258
+
259
+ add r30, r16
260
+ adc r31, r1
261
+ ijmp
262
+ nop
263
+
264
+
265
+ bit_rot_jmp_table:
266
+ ret
267
+ rjmp rotate64_1bit_left
268
+ rjmp rotate64_2bit_left
269
+ rjmp rotate64_3bit_left
270
+ rjmp rotate64_4bit_left
271
+ rjmp rotate64_3bit_right
272
+ rjmp rotate64_2bit_right
273
+ rjmp rotate64_1bit_right
274
+
275
+ .global rotate64left_code
276
+ rotate64left_code:
277
+ ldi r30, pm_lo8(rotate64_0byte_left)
278
+ ldi r31, pm_hi8(rotate64_0byte_left)
279
+ mov r0, r16
280
+ andi r16, 0x70
281
+ add r30, r16
282
+ adc r31, r1
283
+ mov r16, r0
284
+ ijmp
285
+