sha3-ruby 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +7 -0
- data/ext/sha3/KeccakReferenceAndOptimized/KeccakCompact.vcproj +207 -0
- data/ext/sha3/KeccakReferenceAndOptimized/KeccakCompact8.vcproj +207 -0
- data/ext/sha3/KeccakReferenceAndOptimized/KeccakInplace.vcproj +203 -0
- data/ext/sha3/KeccakReferenceAndOptimized/KeccakInplace32BI.vcproj +201 -0
- data/ext/sha3/KeccakReferenceAndOptimized/KeccakOptimized32.vcproj +267 -0
- data/ext/sha3/KeccakReferenceAndOptimized/KeccakOptimized64.vcproj +267 -0
- data/ext/sha3/KeccakReferenceAndOptimized/KeccakReference.vcproj +243 -0
- data/ext/sha3/KeccakReferenceAndOptimized/KeccakReference32BI.vcproj +243 -0
- data/ext/sha3/KeccakReferenceAndOptimized/KeccakReferenceAndOptimized.sln +62 -0
- data/ext/sha3/KeccakReferenceAndOptimized/KeccakSimple.vcproj +203 -0
- data/ext/sha3/KeccakReferenceAndOptimized/KeccakSimple32BI.vcproj +201 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/AVR8-rotate64.h +27 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/AVR8-rotate64.s +285 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8-settings.h +2 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8-test.c +142 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8-util.h +15 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8-util.s +119 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8.c +184 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-avr8.h +25 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact-settings.h +3 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact-test.c +317 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact.c +341 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact.h +50 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact8-settings.h +2 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact8-test.c +192 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact8.c +375 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-compact8.h +47 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-crypto_hash-inplace-armgcc-ARMv7A-NEON.s +406 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace-minimal-test.c +231 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace-settings.h +3 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace-test.c +221 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace.c +445 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace32BI-armgcc-ARMv6M.s +844 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace32BI-armgcc-ARMv7A.s +687 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace32BI-armgcc-ARMv7M.s +687 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-inplace32BI.c +849 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-simple-settings.h +3 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-simple-test.c +221 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-simple.c +403 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccak-simple32BI.c +673 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakDuplex.c +68 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakDuplex.h +59 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-32-rvk.macros +555 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-32-s1.macros +1187 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-32-s2.macros +1187 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-32.macros +26 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-64.macros +728 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-arm.c +123 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-armcc.s +653 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-armgcc.s +686 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-avr8.c +163 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-avr8asm-compact.s +647 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-avr8asm-fast.s +934 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-inplace-armgcc-ARMv7A-NEON.s +446 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-int-set.h +6 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-interface.h +46 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-opt32-settings.h +4 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-opt32.c +524 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-opt64-settings.h +7 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-opt64.c +504 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-reference.c +300 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-reference.h +20 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-reference.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-reference32BI.c +371 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-simd128.macros +651 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-simd64.macros +517 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-unrolling.macros +124 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-x86-64-asm.c +62 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-x86-64-gas.s +766 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-x86-64-shld-gas.s +766 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakF-1600-xop.macros +573 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.c +81 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.h +70 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakSponge.c +266 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakSponge.h +76 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/KeccakSponge.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccakc1024-crypto_hash-inplace-armgcc-ARMv7A-NEON.s +296 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/Keccakc512-crypto_hash-inplace-armgcc-ARMv7A-NEON.s +429 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/brg_endian.h +142 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/crypto_hash.h +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/displayIntermediateValues.c +117 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/displayIntermediateValues.h +29 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/displayIntermediateValues.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/genKAT.c +692 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/mainARM.c +88 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/mainOptimized.c +23 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/mainReference.c +381 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/timing.c +436 -0
- data/ext/sha3/KeccakReferenceAndOptimized/Sources/timing.h +13 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/DoublePermutation-config.h +2 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/DoublePermutation.c +572 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/DoublePermutation.h +38 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/KeccakF-1600-unrolling.macros +124 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/Keccakc256TreeD2.c +81 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/Keccakc256TreeD2.h +18 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/Keccakc512TreeD2.c +81 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/Keccakc512TreeD2.h +18 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/crypto_hash.h +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/mainOptimized.c +112 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/timing-Double.c +225 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/Sources/timing-Double.h +20 -0
- data/ext/sha3/KeccakReferenceAndOptimized/TreeHashing/makefile +68 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakCompact +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakOptimized32 +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakOptimized64 +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakReference +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakReference32BI +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakSimple +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/KeccakSimple32BI +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/compact/Keccak-compact-test.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/compact/Keccak-compact.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/KeccakDuplex.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/KeccakF-1600-opt32.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/KeccakNISTInterface.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/KeccakSponge.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/genKAT.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/mainOptimized.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized32/timing.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/KeccakDuplex.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/KeccakF-1600-opt64.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/KeccakNISTInterface.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/KeccakSponge.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/genKAT.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/mainOptimized.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/optimized64/timing.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/KeccakDuplex.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/KeccakF-1600-reference.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/KeccakNISTInterface.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/KeccakSponge.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/displayIntermediateValues.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/genKAT.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference/mainReference.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/KeccakDuplex.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/KeccakF-1600-reference32BI.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/KeccakNISTInterface.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/KeccakSponge.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/displayIntermediateValues.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/genKAT.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/reference32bi/mainReference.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/simple/Keccak-simple-test.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/simple/Keccak-simple.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/simple32BI/Keccak-simple-test.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/bin/simple32BI/Keccak-simple32BI.o +0 -0
- data/ext/sha3/KeccakReferenceAndOptimized/compile64.bat +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccak +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc1024 +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc256 +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc256treed2 +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc448 +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc512 +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc512treed2 +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/checksum-keccakc768 +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccak.c +11 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccakc1024.c +11 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccakc256.c +11 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccakc448.c +11 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccakc512.c +11 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/hash-keccakc768.c +11 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccak.h +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccakc1024.h +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccakc256.h +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccakc448.h +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccakc512.h +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/int-set-keccakc768.h +1 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/populate.py +506 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccak.h +2 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccakc1024.h +2 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccakc256.h +2 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccakc448.h +2 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccakc512.h +2 -0
- data/ext/sha3/KeccakReferenceAndOptimized/eBASH/simple-keccakc768.h +2 -0
- data/ext/sha3/KeccakReferenceAndOptimized/makefile +327 -0
- data/ext/sha3/Makefile +240 -0
- data/ext/sha3/depend +28 -0
- data/ext/sha3/extconf.rb +21 -0
- data/ext/sha3/sha3.c +95 -0
- data/lib/sha3-ruby.rb +27 -0
- data/lib/sha3-ruby/version.rb +5 -0
- data/sha3-ruby.gemspec +21 -0
- metadata +233 -0
@@ -0,0 +1,327 @@
|
|
1
|
+
all: KeccakReference KeccakReference32BI KeccakOptimized32 KeccakOptimized64 KeccakSimple KeccakSimple32BI KeccakCompact
|
2
|
+
|
3
|
+
SOURCES_COMMON = \
|
4
|
+
Sources/genKAT.c \
|
5
|
+
Sources/KeccakDuplex.c \
|
6
|
+
Sources/KeccakNISTInterface.c \
|
7
|
+
Sources/KeccakSponge.c
|
8
|
+
|
9
|
+
SOURCES_REFERENCE = \
|
10
|
+
$(SOURCES_COMMON) \
|
11
|
+
Sources/displayIntermediateValues.c \
|
12
|
+
Sources/KeccakF-1600-reference.c \
|
13
|
+
Sources/mainReference.c
|
14
|
+
|
15
|
+
SOURCES_REFERENCE32BI = \
|
16
|
+
$(SOURCES_COMMON) \
|
17
|
+
Sources/displayIntermediateValues.c \
|
18
|
+
Sources/KeccakF-1600-reference32BI.c \
|
19
|
+
Sources/mainReference.c
|
20
|
+
|
21
|
+
SOURCES_OPTIMIZED = \
|
22
|
+
$(SOURCES_COMMON) \
|
23
|
+
Sources/mainOptimized.c \
|
24
|
+
Sources/timing.c
|
25
|
+
|
26
|
+
SOURCES_OPTIMIZED_32 = \
|
27
|
+
$(SOURCES_OPTIMIZED) \
|
28
|
+
Sources/KeccakF-1600-opt32.c
|
29
|
+
|
30
|
+
SOURCES_OPTIMIZED_64 = \
|
31
|
+
$(SOURCES_OPTIMIZED) \
|
32
|
+
Sources/KeccakF-1600-opt64.c
|
33
|
+
|
34
|
+
SOURCES_OPTIMIZED_64_ASM = \
|
35
|
+
$(SOURCES_OPTIMIZED) \
|
36
|
+
Sources/KeccakF-1600-x86-64-gas.s \
|
37
|
+
Sources/KeccakF-1600-x86-64-asm.c
|
38
|
+
|
39
|
+
SOURCES_SIMPLE = \
|
40
|
+
Sources/Keccak-simple.c \
|
41
|
+
Sources/Keccak-simple-test.c
|
42
|
+
|
43
|
+
SOURCES_SIMPLE32BI = \
|
44
|
+
Sources/Keccak-simple32BI.c \
|
45
|
+
Sources/Keccak-simple-test.c
|
46
|
+
|
47
|
+
SOURCES_INPLACE = \
|
48
|
+
Sources/Keccak-inplace.c \
|
49
|
+
Sources/Keccak-inplace-test.c
|
50
|
+
|
51
|
+
SOURCES_INPLACE32BI = \
|
52
|
+
Sources/Keccak-inplace32BI.c \
|
53
|
+
Sources/Keccak-inplace-test.c
|
54
|
+
|
55
|
+
SOURCES_COMPACT = \
|
56
|
+
Sources/Keccak-compact.c \
|
57
|
+
Sources/Keccak-compact-test.c
|
58
|
+
|
59
|
+
SOURCES_COMPACT8 = \
|
60
|
+
Sources/Keccak-compact8.c \
|
61
|
+
Sources/Keccak-compact8-test.c
|
62
|
+
|
63
|
+
HEADERS_COMMON = \
|
64
|
+
Sources/KeccakDuplex.h \
|
65
|
+
Sources/KeccakNISTInterface.h \
|
66
|
+
Sources/KeccakSponge.h \
|
67
|
+
Sources/KeccakF-1600-interface.h
|
68
|
+
|
69
|
+
HEADERS_REFERENCE = \
|
70
|
+
$(HEADERS_COMMON) \
|
71
|
+
Sources/displayIntermediateValues.h \
|
72
|
+
Sources/KeccakF-1600-reference.h
|
73
|
+
|
74
|
+
HEADERS_REFERENCE32BI = $(HEADERS_REFERENCE)
|
75
|
+
|
76
|
+
HEADERS_OPTIMIZED = \
|
77
|
+
$(HEADERS_COMMON) \
|
78
|
+
Sources/timing.h \
|
79
|
+
Sources/brg_endian.h \
|
80
|
+
Sources/KeccakF-1600-unrolling.macros
|
81
|
+
|
82
|
+
HEADERS_OPTIMIZED_32 = \
|
83
|
+
$(HEADERS_OPTIMIZED) \
|
84
|
+
Sources/KeccakF-1600-opt32-settings.h \
|
85
|
+
Sources/KeccakF-1600-32.macros \
|
86
|
+
Sources/KeccakF-1600-32-s1.macros \
|
87
|
+
Sources/KeccakF-1600-32-s2.macros \
|
88
|
+
Sources/KeccakF-1600-32-rvk.macros
|
89
|
+
|
90
|
+
HEADERS_OPTIMIZED_64 = \
|
91
|
+
$(HEADERS_OPTIMIZED) \
|
92
|
+
Sources/KeccakF-1600-opt64-settings.h \
|
93
|
+
Sources/KeccakF-1600-64.macros \
|
94
|
+
Sources/KeccakF-1600-simd64.macros \
|
95
|
+
Sources/KeccakF-1600-simd128.macros
|
96
|
+
|
97
|
+
HEADERS_OPTIMIZED_64_ASM = $(HEADERS_OPTIMIZED)
|
98
|
+
|
99
|
+
HEADERS_SIMPLE = \
|
100
|
+
Sources/Keccak-simple-settings.h
|
101
|
+
|
102
|
+
HEADERS_SIMPLE32BI = $(HEADERS_SIMPLE)
|
103
|
+
|
104
|
+
HEADERS_INPLACE = \
|
105
|
+
Sources/Keccak-inplace-settings.h
|
106
|
+
|
107
|
+
HEADERS_INPLACE32BI = $(HEADERS_INPLACE)
|
108
|
+
|
109
|
+
HEADERS_COMPACT = \
|
110
|
+
Sources/Keccak-compact.h \
|
111
|
+
Sources/Keccak-compact-settings.h
|
112
|
+
|
113
|
+
HEADERS_COMPACT8 = \
|
114
|
+
Sources/Keccak-compact8.h \
|
115
|
+
Sources/Keccak-compact8-settings.h
|
116
|
+
|
117
|
+
BINDIR_REFERENCE = bin/reference
|
118
|
+
|
119
|
+
$(BINDIR_REFERENCE):
|
120
|
+
mkdir -p $(BINDIR_REFERENCE)
|
121
|
+
|
122
|
+
BINDIR_REFERENCE32BI = bin/reference32bi
|
123
|
+
|
124
|
+
$(BINDIR_REFERENCE32BI):
|
125
|
+
mkdir -p $(BINDIR_REFERENCE32BI)
|
126
|
+
|
127
|
+
BINDIR_OPTIMIZED_32 = bin/optimized32
|
128
|
+
|
129
|
+
$(BINDIR_OPTIMIZED_32):
|
130
|
+
mkdir -p $(BINDIR_OPTIMIZED_32)
|
131
|
+
|
132
|
+
BINDIR_OPTIMIZED_64 = bin/optimized64
|
133
|
+
|
134
|
+
$(BINDIR_OPTIMIZED_64):
|
135
|
+
mkdir -p $(BINDIR_OPTIMIZED_64)
|
136
|
+
|
137
|
+
BINDIR_OPTIMIZED_64_ASM = bin/optimized64asm
|
138
|
+
|
139
|
+
$(BINDIR_OPTIMIZED_64_ASM):
|
140
|
+
mkdir -p $(BINDIR_OPTIMIZED_64_ASM)
|
141
|
+
|
142
|
+
BINDIR_SIMPLE = bin/simple
|
143
|
+
|
144
|
+
$(BINDIR_SIMPLE):
|
145
|
+
mkdir -p $(BINDIR_SIMPLE)
|
146
|
+
|
147
|
+
BINDIR_SIMPLE32BI = bin/simple32BI
|
148
|
+
|
149
|
+
$(BINDIR_SIMPLE32BI):
|
150
|
+
mkdir -p $(BINDIR_SIMPLE32BI)
|
151
|
+
|
152
|
+
BINDIR_INPLACE = bin/inplace
|
153
|
+
|
154
|
+
$(BINDIR_INPLACE):
|
155
|
+
mkdir -p $(BINDIR_INPLACE)
|
156
|
+
|
157
|
+
BINDIR_INPLACE32BI = bin/inplace32BI
|
158
|
+
|
159
|
+
$(BINDIR_INPLACE32BI):
|
160
|
+
mkdir -p $(BINDIR_INPLACE32BI)
|
161
|
+
|
162
|
+
BINDIR_COMPACT = bin/compact
|
163
|
+
|
164
|
+
$(BINDIR_COMPACT):
|
165
|
+
mkdir -p $(BINDIR_COMPACT)
|
166
|
+
|
167
|
+
BINDIR_COMPACT8 = bin/compact8
|
168
|
+
|
169
|
+
$(BINDIR_COMPACT8):
|
170
|
+
mkdir -p $(BINDIR_COMPACT8)
|
171
|
+
|
172
|
+
OBJECTS_REFERENCE = $(addprefix $(BINDIR_REFERENCE)/, $(notdir $(patsubst %.c,%.o,$(SOURCES_REFERENCE))))
|
173
|
+
|
174
|
+
OBJECTS_REFERENCE32BI = $(addprefix $(BINDIR_REFERENCE32BI)/, $(notdir $(patsubst %.c,%.o,$(SOURCES_REFERENCE32BI))))
|
175
|
+
|
176
|
+
OBJECTS_OPTIMIZED_32 = $(addprefix $(BINDIR_OPTIMIZED_32)/, $(notdir $(patsubst %.c,%.o,$(SOURCES_OPTIMIZED_32))))
|
177
|
+
|
178
|
+
OBJECTS_OPTIMIZED_64 = $(addprefix $(BINDIR_OPTIMIZED_64)/, $(notdir $(patsubst %.c,%.o,$(SOURCES_OPTIMIZED_64))))
|
179
|
+
|
180
|
+
OBJECTS_OPTIMIZED_64_ASM = $(addprefix $(BINDIR_OPTIMIZED_64_ASM)/, $(notdir $(patsubst %.c,%.o,$(patsubst %.s,%.o,$(SOURCES_OPTIMIZED_64_ASM)))))
|
181
|
+
|
182
|
+
OBJECTS_SIMPLE = $(addprefix $(BINDIR_SIMPLE)/, $(notdir $(patsubst %.c,%.o,$(SOURCES_SIMPLE))))
|
183
|
+
|
184
|
+
OBJECTS_SIMPLE32BI = $(addprefix $(BINDIR_SIMPLE32BI)/, $(notdir $(patsubst %.c,%.o,$(SOURCES_SIMPLE32BI))))
|
185
|
+
|
186
|
+
OBJECTS_INPLACE = $(addprefix $(BINDIR_INPLACE)/, $(notdir $(patsubst %.c,%.o,$(SOURCES_INPLACE))))
|
187
|
+
|
188
|
+
OBJECTS_INPLACE32BI = $(addprefix $(BINDIR_INPLACE32BI)/, $(notdir $(patsubst %.c,%.o,$(SOURCES_INPLACE32BI))))
|
189
|
+
|
190
|
+
OBJECTS_COMPACT = $(addprefix $(BINDIR_COMPACT)/, $(notdir $(patsubst %.c,%.o,$(SOURCES_COMPACT))))
|
191
|
+
|
192
|
+
OBJECTS_COMPACT8 = $(addprefix $(BINDIR_COMPACT8)/, $(notdir $(patsubst %.c,%.o,$(SOURCES_COMPACT8))))
|
193
|
+
|
194
|
+
CC = gcc
|
195
|
+
#CC = icc
|
196
|
+
|
197
|
+
CFLAGS_REFERENCE = -DKeccakReference -O
|
198
|
+
|
199
|
+
CFLAGS_REFERENCE32BI = $(CFLAGS_REFERENCE) -DKeccakReference32BI
|
200
|
+
|
201
|
+
CFLAGS_OPTIMIZED_32 = -fomit-frame-pointer -O3 -g0 -march=nocona -m32
|
202
|
+
#CFLAGS_OPTIMIZED_32 = -m32 -O3 -static
|
203
|
+
|
204
|
+
CFLAGS_OPTIMIZED_64 = -fomit-frame-pointer -O3 -g0 -march=native -mtune=native -m64
|
205
|
+
#CFLAGS_OPTIMIZED_64 = -fomit-frame-pointer -O3 -g0 -march=barcelona -m32
|
206
|
+
#CFLAGS_OPTIMIZED_64 = -m64 -O3 -static
|
207
|
+
|
208
|
+
CFLAGS_OPTIMIZED_64_ASM = $(CFLAGS_OPTIMIZED_64)
|
209
|
+
|
210
|
+
CFLAGS_SIMPLE = -O3 -g0
|
211
|
+
|
212
|
+
CFLAGS_SIMPLE32BI = $(CFLAGS_SIMPLE)
|
213
|
+
|
214
|
+
CFLAGS_INPLACE = -O3 -g0
|
215
|
+
|
216
|
+
CFLAGS_INPLACE32BI = $(CFLAGS_INPLACE)
|
217
|
+
|
218
|
+
CFLAGS_COMPACT = -O3 -g0
|
219
|
+
|
220
|
+
CFLAGS_COMPACT8 = $(CFLAGS_COMPACT)
|
221
|
+
|
222
|
+
VPATH = Sources
|
223
|
+
|
224
|
+
INCLUDES = -ISources
|
225
|
+
|
226
|
+
$(BINDIR_REFERENCE)/%.o:%.c $(HEADERS_REFERENCE)
|
227
|
+
$(CC) $(INCLUDES) $(CFLAGS_REFERENCE) -c $< -o $@
|
228
|
+
|
229
|
+
$(BINDIR_REFERENCE32BI)/%.o:%.c $(HEADERS_REFERENCE32BI)
|
230
|
+
$(CC) $(INCLUDES) $(CFLAGS_REFERENCE32BI) -c $< -o $@
|
231
|
+
|
232
|
+
$(BINDIR_OPTIMIZED_32)/%.o:%.c $(HEADERS_OPTIMIZED_32)
|
233
|
+
$(CC) $(INCLUDES) $(CFLAGS_OPTIMIZED_32) -c $< -o $@
|
234
|
+
|
235
|
+
$(BINDIR_OPTIMIZED_64)/%.o:%.c $(HEADERS_OPTIMIZED_64)
|
236
|
+
$(CC) $(INCLUDES) $(CFLAGS_OPTIMIZED_64) -c $< -o $@
|
237
|
+
|
238
|
+
$(BINDIR_OPTIMIZED_64_ASM)/%.o:%.c $(HEADERS_OPTIMIZED_64_ASM)
|
239
|
+
$(CC) $(INCLUDES) $(CFLAGS_OPTIMIZED_64_ASM) -c $< -o $@
|
240
|
+
|
241
|
+
$(BINDIR_OPTIMIZED_64_ASM)/%.o:%.s $(HEADERS_OPTIMIZED_64_ASM)
|
242
|
+
$(CC) $(INCLUDES) -c $< -o $@
|
243
|
+
|
244
|
+
$(BINDIR_SIMPLE)/%.o:%.c $(HEADERS_SIMPLE)
|
245
|
+
$(CC) $(INCLUDES) $(CFLAGS_SIMPLE) -c $< -o $@
|
246
|
+
|
247
|
+
$(BINDIR_SIMPLE32BI)/%.o:%.c $(HEADERS_SIMPLE32BI)
|
248
|
+
$(CC) $(INCLUDES) $(CFLAGS_SIMPLE32BI) -c $< -o $@
|
249
|
+
|
250
|
+
$(BINDIR_INPLACE)/%.o:%.c $(HEADERS_INPLACE)
|
251
|
+
$(CC) $(INCLUDES) $(CFLAGS_INPLACE) -c $< -o $@
|
252
|
+
|
253
|
+
$(BINDIR_INPLACE32BI)/%.o:%.c $(HEADERS_INPLACE32BI)
|
254
|
+
$(CC) $(INCLUDES) $(CFLAGS_INPLACE32BI) -c $< -o $@
|
255
|
+
|
256
|
+
$(BINDIR_COMPACT)/%.o:%.c $(HEADERS_COMPACT)
|
257
|
+
$(CC) $(INCLUDES) $(CFLAGS_COMPACT) -c $< -o $@
|
258
|
+
|
259
|
+
$(BINDIR_COMPACT8)/%.o:%.c $(HEADERS_COMPACT8)
|
260
|
+
$(CC) $(INCLUDES) $(CFLAGS_COMPACT8) -c $< -o $@
|
261
|
+
|
262
|
+
.PHONY: KeccakReference KeccakReference32BI KeccakOptimized32 KeccakOptimized64 KeccakOptimized64asm KeccakSimple KeccakSimple32BI KeccakInplace KeccakInplace32BI KeccakCompact KeccakCompact8
|
263
|
+
|
264
|
+
KeccakReference: bin/KeccakReference
|
265
|
+
|
266
|
+
bin/KeccakReference: $(BINDIR_REFERENCE) $(OBJECTS_REFERENCE) $(HEADERS_REFERENCE)
|
267
|
+
$(CC) $(CFLAGS_REFERENCE) -o $@ $(OBJECTS_REFERENCE)
|
268
|
+
|
269
|
+
KeccakReference32BI: bin/KeccakReference32BI
|
270
|
+
|
271
|
+
bin/KeccakReference32BI: $(BINDIR_REFERENCE32BI) $(OBJECTS_REFERENCE32BI) $(HEADERS_REFERENCE32BI)
|
272
|
+
$(CC) $(CFLAGS_REFERENCE32BI) -o $@ $(OBJECTS_REFERENCE32BI)
|
273
|
+
|
274
|
+
KeccakOptimized32: bin/KeccakOptimized32
|
275
|
+
|
276
|
+
bin/KeccakOptimized32: $(BINDIR_OPTIMIZED_32) $(OBJECTS_OPTIMIZED_32) $(HEADERS_OPTIMIZED_32)
|
277
|
+
$(CC) $(CFLAGS_OPTIMIZED_32) -o $@ $(OBJECTS_OPTIMIZED_32)
|
278
|
+
|
279
|
+
KeccakOptimized64: bin/KeccakOptimized64
|
280
|
+
|
281
|
+
bin/KeccakOptimized64: $(BINDIR_OPTIMIZED_64) $(OBJECTS_OPTIMIZED_64) $(HEADERS_OPTIMIZED_64)
|
282
|
+
$(CC) $(CFLAGS_OPTIMIZED_64) -o $@ $(OBJECTS_OPTIMIZED_64)
|
283
|
+
|
284
|
+
KeccakOptimized64asm: bin/KeccakOptimized64asm
|
285
|
+
|
286
|
+
bin/KeccakOptimized64asm: $(BINDIR_OPTIMIZED_64_ASM) $(OBJECTS_OPTIMIZED_64_ASM) $(HEADERS_OPTIMIZED_64_ASM)
|
287
|
+
$(CC) $(CFLAGS_OPTIMIZED_64_ASM) -o $@ $(OBJECTS_OPTIMIZED_64_ASM)
|
288
|
+
|
289
|
+
KeccakSimple: bin/KeccakSimple
|
290
|
+
|
291
|
+
bin/KeccakSimple: $(BINDIR_SIMPLE) $(OBJECTS_SIMPLE) $(HEADERS_SIMPLE)
|
292
|
+
$(CC) $(CFLAGS_SIMPLE) -o $@ $(OBJECTS_SIMPLE)
|
293
|
+
|
294
|
+
KeccakSimple32BI: bin/KeccakSimple32BI
|
295
|
+
|
296
|
+
bin/KeccakSimple32BI: $(BINDIR_SIMPLE32BI) $(OBJECTS_SIMPLE32BI) $(HEADERS_SIMPLE32BI)
|
297
|
+
$(CC) $(CFLAGS_SIMPLE32BI) -o $@ $(OBJECTS_SIMPLE32BI)
|
298
|
+
|
299
|
+
KeccakInplace: bin/KeccakInplace
|
300
|
+
|
301
|
+
bin/KeccakInplace: $(BINDIR_INPLACE) $(OBJECTS_INPLACE) $(HEADERS_INPLACE)
|
302
|
+
$(CC) $(CFLAGS_INPLACE) -o $@ $(OBJECTS_INPLACE)
|
303
|
+
|
304
|
+
KeccakInplace32BI: bin/KeccakInplace32BI
|
305
|
+
|
306
|
+
bin/KeccakInplace32BI: $(BINDIR_INPLACE32BI) $(OBJECTS_INPLACE32BI) $(HEADERS_INPLACE32BI)
|
307
|
+
$(CC) $(CFLAGS_INPLACE32BI) -o $@ $(OBJECTS_INPLACE32BI)
|
308
|
+
|
309
|
+
KeccakCompact: bin/KeccakCompact
|
310
|
+
|
311
|
+
bin/KeccakCompact: $(BINDIR_COMPACT) $(OBJECTS_COMPACT) $(HEADERS_COMPACT)
|
312
|
+
$(CC) $(CFLAGS_COMPACT) -o $@ $(OBJECTS_COMPACT)
|
313
|
+
|
314
|
+
KeccakCompact8: bin/KeccakCompact8
|
315
|
+
|
316
|
+
bin/KeccakCompact8: $(BINDIR_COMPACT8) $(OBJECTS_COMPACT8) $(HEADERS_COMPACT8)
|
317
|
+
$(CC) $(CFLAGS_COMPACT8) -o $@ $(OBJECTS_COMPACT8)
|
318
|
+
|
319
|
+
.PHONY: clean
|
320
|
+
|
321
|
+
clean:
|
322
|
+
rm -rf bin/
|
323
|
+
|
324
|
+
.PHONY: eBASH
|
325
|
+
|
326
|
+
eBASH:
|
327
|
+
cd eBASH ; python populate.py
|
data/ext/sha3/Makefile
ADDED
@@ -0,0 +1,240 @@
|
|
1
|
+
|
2
|
+
SHELL = /bin/sh
|
3
|
+
|
4
|
+
# V=0 quiet, V=1 verbose. other values don't work.
|
5
|
+
V = 0
|
6
|
+
Q1 = $(V:1=)
|
7
|
+
Q = $(Q1:0=@)
|
8
|
+
n=$(NULLCMD)
|
9
|
+
ECHO1 = $(V:1=@$n)
|
10
|
+
ECHO = $(ECHO1:0=@echo)
|
11
|
+
|
12
|
+
#### Start of system configuration section. ####
|
13
|
+
|
14
|
+
srcdir = .
|
15
|
+
topdir = /usr/include/ruby-1.9.1
|
16
|
+
hdrdir = /usr/include/ruby-1.9.1
|
17
|
+
arch_hdrdir = /usr/include/ruby-1.9.1/$(arch)
|
18
|
+
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
19
|
+
prefix = $(DESTDIR)/usr
|
20
|
+
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
21
|
+
exec_prefix = $(prefix)
|
22
|
+
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
|
23
|
+
sitehdrdir = $(rubyhdrdir)/site_ruby
|
24
|
+
rubyhdrdir = $(includedir)/$(RUBY_BASE_NAME)-$(ruby_version)
|
25
|
+
vendordir = $(rubylibprefix)/vendor_ruby
|
26
|
+
sitedir = $(rubylibprefix)/site_ruby
|
27
|
+
ridir = $(datarootdir)/$(RI_BASE_NAME)
|
28
|
+
mandir = $(DESTDIR)/usr/share/man
|
29
|
+
localedir = $(datarootdir)/locale
|
30
|
+
libdir = $(DESTDIR)/usr/lib64
|
31
|
+
psdir = $(docdir)
|
32
|
+
pdfdir = $(docdir)
|
33
|
+
dvidir = $(docdir)
|
34
|
+
htmldir = $(docdir)
|
35
|
+
infodir = $(DESTDIR)/usr/share/info
|
36
|
+
docdir = $(datarootdir)/doc/$(PACKAGE)
|
37
|
+
oldincludedir = $(DESTDIR)/usr/include
|
38
|
+
includedir = $(prefix)/include
|
39
|
+
localstatedir = $(DESTDIR)/var/lib
|
40
|
+
sharedstatedir = $(prefix)/com
|
41
|
+
sysconfdir = $(DESTDIR)/etc
|
42
|
+
datadir = $(DESTDIR)/usr/share
|
43
|
+
datarootdir = $(prefix)/share
|
44
|
+
libexecdir = $(exec_prefix)/libexec
|
45
|
+
sbindir = $(exec_prefix)/sbin
|
46
|
+
bindir = $(exec_prefix)/bin
|
47
|
+
rubylibdir = $(rubylibprefix)/$(ruby_version)
|
48
|
+
archdir = $(rubylibdir)/$(arch)
|
49
|
+
sitelibdir = $(sitedir)/$(ruby_version)
|
50
|
+
sitearchdir = $(sitelibdir)/$(sitearch)
|
51
|
+
vendorlibdir = $(vendordir)/$(ruby_version)
|
52
|
+
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
53
|
+
|
54
|
+
NULLCMD = :
|
55
|
+
|
56
|
+
CC = x86_64-pc-linux-gnu-gcc
|
57
|
+
CXX = x86_64-pc-linux-gnu-g++
|
58
|
+
LIBRUBY = $(LIBRUBY_SO)
|
59
|
+
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
60
|
+
LIBRUBYARG_SHARED = -Wl,-R -Wl,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)
|
61
|
+
LIBRUBYARG_STATIC = -Wl,-R -Wl,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static
|
62
|
+
OUTFLAG = -o
|
63
|
+
COUTFLAG = -o
|
64
|
+
|
65
|
+
RUBY_EXTCONF_H = extconf.h
|
66
|
+
cflags = $(optflags) $(debugflags) $(warnflags)
|
67
|
+
optflags = -O3
|
68
|
+
debugflags = -ggdb
|
69
|
+
warnflags = -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
|
70
|
+
CFLAGS = -fPIC -O2 -march=native -pipe -fno-strict-aliasing -fPIC $(ARCH_FLAG)
|
71
|
+
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
72
|
+
DEFS =
|
73
|
+
CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\" $(DEFS) $(cppflags)
|
74
|
+
CXXFLAGS = $(CFLAGS) -O2 -pipe -fno-strict-aliasing
|
75
|
+
ldflags = -L. -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -rdynamic -Wl,-export-dynamic -Wl,--no-undefined
|
76
|
+
dldflags =
|
77
|
+
ARCH_FLAG =
|
78
|
+
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
|
79
|
+
LDSHARED = $(CC) -shared
|
80
|
+
LDSHAREDXX = $(CXX) -shared
|
81
|
+
AR = x86_64-pc-linux-gnu-ar
|
82
|
+
EXEEXT =
|
83
|
+
|
84
|
+
RUBY_BASE_NAME = ruby
|
85
|
+
RUBY_INSTALL_NAME = ruby19
|
86
|
+
RUBY_SO_NAME = ruby19
|
87
|
+
arch = x86_64-linux
|
88
|
+
sitearch = $(arch)
|
89
|
+
ruby_version = 1.9.1
|
90
|
+
ruby = /usr/bin/ruby19
|
91
|
+
RUBY = $(ruby)
|
92
|
+
RM = rm -f
|
93
|
+
RM_RF = $(RUBY) -run -e rm -- -rf
|
94
|
+
RMDIRS = rmdir --ignore-fail-on-non-empty -p
|
95
|
+
MAKEDIRS = /bin/mkdir -p
|
96
|
+
INSTALL = /usr/bin/install -c
|
97
|
+
INSTALL_PROG = $(INSTALL) -m 0755
|
98
|
+
INSTALL_DATA = $(INSTALL) -m 644
|
99
|
+
COPY = cp
|
100
|
+
|
101
|
+
#### End of system configuration section. ####
|
102
|
+
|
103
|
+
preload =
|
104
|
+
|
105
|
+
libpath = . $(libdir)
|
106
|
+
LIBPATH = -L. -L$(libdir) -Wl,-R$(libdir)
|
107
|
+
DEFFILE =
|
108
|
+
|
109
|
+
CLEANFILES = mkmf.log
|
110
|
+
DISTCLEANFILES =
|
111
|
+
DISTCLEANDIRS =
|
112
|
+
|
113
|
+
extout =
|
114
|
+
extout_prefix =
|
115
|
+
target_prefix =
|
116
|
+
LOCAL_LIBS =
|
117
|
+
LIBS = $(LIBRUBYARG_SHARED) -lpthread -lrt -ldl -lcrypt -lm -lc
|
118
|
+
SRCS = sha3.c KeccakNISTInterface.c KeccakSponge.c KeccakF-1600-reference.c displayIntermediateValues.c
|
119
|
+
OBJS = sha3.o KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.o KeccakReferenceAndOptimized/Sources/KeccakSponge.o KeccakReferenceAndOptimized/Sources/KeccakF-1600-reference.o KeccakReferenceAndOptimized/Sources/displayIntermediateValues.o
|
120
|
+
TARGET = sha3
|
121
|
+
DLLIB = $(TARGET).so
|
122
|
+
EXTSTATIC =
|
123
|
+
STATIC_LIB =
|
124
|
+
|
125
|
+
BINDIR = $(bindir)
|
126
|
+
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
127
|
+
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
128
|
+
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
129
|
+
HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
|
130
|
+
ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
|
131
|
+
|
132
|
+
TARGET_SO = $(DLLIB)
|
133
|
+
CLEANLIBS = $(TARGET).so
|
134
|
+
CLEANOBJS = *.o *.bak
|
135
|
+
|
136
|
+
all: $(DLLIB)
|
137
|
+
static: $(STATIC_LIB)
|
138
|
+
.PHONY: all install static install-so install-rb
|
139
|
+
.PHONY: clean clean-so clean-rb
|
140
|
+
|
141
|
+
clean-rb-default::
|
142
|
+
clean-rb::
|
143
|
+
clean-so::
|
144
|
+
clean: clean-so clean-rb-default clean-rb
|
145
|
+
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
|
146
|
+
|
147
|
+
distclean-rb-default::
|
148
|
+
distclean-rb::
|
149
|
+
distclean-so::
|
150
|
+
distclean: clean distclean-so distclean-rb-default distclean-rb
|
151
|
+
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
152
|
+
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
153
|
+
@-$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
|
154
|
+
|
155
|
+
realclean: distclean
|
156
|
+
install: install-so install-rb
|
157
|
+
|
158
|
+
install-so: $(RUBYARCHDIR)/$(DLLIB)
|
159
|
+
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
|
160
|
+
@-$(MAKEDIRS) $(@D)
|
161
|
+
$(INSTALL_PROG) $(DLLIB) $(@D)
|
162
|
+
install-rb: pre-install-rb install-rb-default
|
163
|
+
install-rb-default: pre-install-rb-default
|
164
|
+
pre-install-rb: Makefile
|
165
|
+
pre-install-rb-default: Makefile
|
166
|
+
pre-install-rb-default:
|
167
|
+
$(ECHO) installing default sha3 libraries
|
168
|
+
|
169
|
+
site-install: site-install-so site-install-rb
|
170
|
+
site-install-so: install-so
|
171
|
+
site-install-rb: install-rb
|
172
|
+
|
173
|
+
.SUFFIXES: .c .m .cc .mm .cxx .cpp .C .o
|
174
|
+
|
175
|
+
.cc.o:
|
176
|
+
$(ECHO) compiling $(<)
|
177
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
178
|
+
|
179
|
+
.mm.o:
|
180
|
+
$(ECHO) compiling $(<)
|
181
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
182
|
+
|
183
|
+
.cxx.o:
|
184
|
+
$(ECHO) compiling $(<)
|
185
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
186
|
+
|
187
|
+
.cpp.o:
|
188
|
+
$(ECHO) compiling $(<)
|
189
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
190
|
+
|
191
|
+
.C.o:
|
192
|
+
$(ECHO) compiling $(<)
|
193
|
+
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
|
194
|
+
|
195
|
+
.c.o:
|
196
|
+
$(ECHO) compiling $(<)
|
197
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
|
198
|
+
|
199
|
+
.m.o:
|
200
|
+
$(ECHO) compiling $(<)
|
201
|
+
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
|
202
|
+
|
203
|
+
$(DLLIB): $(OBJS) Makefile
|
204
|
+
$(ECHO) linking shared-object $(DLLIB)
|
205
|
+
@-$(RM) $(@)
|
206
|
+
$(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
###
|
211
|
+
$(OBJS): $(RUBY_EXTCONF_H)
|
212
|
+
|
213
|
+
sha3.o: sha3.c \
|
214
|
+
KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.c \
|
215
|
+
KeccakReferenceAndOptimized/Sources/KeccakSponge.c \
|
216
|
+
KeccakReferenceAndOptimized/Sources/KeccakF-1600-reference.c \
|
217
|
+
KeccakReferenceAndOptimized/Sources/displayIntermediateValues.c
|
218
|
+
KeccakNISTInterface.o: \
|
219
|
+
KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.c \
|
220
|
+
KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.h \
|
221
|
+
KeccakReferenceAndOptimized/Sources/KeccakSponge.h \
|
222
|
+
KeccakReferenceAndOptimized/Sources/KeccakF-1600-interface.h \
|
223
|
+
KeccakReferenceAndOptimized/Sources/KeccakF-1600-int-set.h
|
224
|
+
KeccakSponge.o: KeccakReferenceAndOptimized/Sources/KeccakSponge.c \
|
225
|
+
KeccakReferenceAndOptimized/Sources/KeccakSponge.h \
|
226
|
+
KeccakReferenceAndOptimized/Sources/KeccakF-1600-interface.h \
|
227
|
+
KeccakReferenceAndOptimized/Sources/KeccakF-1600-int-set.h
|
228
|
+
KeccakF-1600-reference.o: \
|
229
|
+
KeccakReferenceAndOptimized/Sources/KeccakF-1600-reference.c \
|
230
|
+
KeccakReferenceAndOptimized/Sources/brg_endian.h \
|
231
|
+
KeccakReferenceAndOptimized/Sources/displayIntermediateValues.h \
|
232
|
+
KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.h \
|
233
|
+
KeccakReferenceAndOptimized/Sources/KeccakSponge.h \
|
234
|
+
KeccakReferenceAndOptimized/Sources/KeccakF-1600-interface.h \
|
235
|
+
KeccakReferenceAndOptimized/Sources/KeccakF-1600-int-set.h
|
236
|
+
displayIntermediateValues.o: \
|
237
|
+
KeccakReferenceAndOptimized/Sources/displayIntermediateValues.c \
|
238
|
+
KeccakReferenceAndOptimized/Sources/displayIntermediateValues.h \
|
239
|
+
KeccakReferenceAndOptimized/Sources/KeccakNISTInterface.h \
|
240
|
+
KeccakReferenceAndOptimized/Sources/KeccakSponge.h
|