Closed dch closed 5 years ago
@dch Hmm...good question. This might be an upstream issue for ed448goldilocks, but I'll see if I can get it to build first on my FreeBSD box later today.
@dch I just released version 0.0.3 of libdecaf which should (hopefully) build properly for you. I've also submitted the fix upstream.
Also, beware the following two issues you might run into:
ARCHFLAGS
may not be correct for your system (defaults are -maes -mavx2 -mbmi2
).To remedy the first issue, installing clang/llvm 3.7 or 3.8 and forcing its use should be enough to get it to work. For example:
gmake CC=clang38 CXX=clang++38 CPP=clang-cpp38
For the second issue, you can disable the extra flags by adding the following to the end of the gmake
command:
ARCHFLAGS=-Wgcc-compat
Alternatively, if you have the cpuflags
command installed, you can specify something like this:
ARCHFLAGS="-Wgcc-compat `cpuflags`"
The full command might look like this:
gmake CC=clang38 CXX=clang++38 CPP=clang-cpp38 ARCHFLAGS="-Wgcc-compat `cpuflags`"
The Erlang tests can be run with gmake tests
.
The C/C++ tests and benchmarks can be run by using cd .ed448goldilocks
and runing gmake bench
. Below are the results from my system:
Macro-benchmarks for Iso-Ed25519:
CFRG crypto benchmarks:
RFC 7748 keygen: 56.43 µs 17.72 k/s 146.70 kcy
RFC 7748 shared secret: 153.10 µs 6.53 k/s 398.00 kcy
EdDSA keygen: 55.70 µs 17.95 k/s 144.71 kcy
EdDSA sign: 62.37 µs 16.03 k/s 162.18 kcy
EdDSA verify: 172.51 µs 5.80 k/s 448.55 kcy
Toy crypto benchmarks:
Create private key: 63.16 µs 15.83 k/s 164.09 kcy
Sign: 64.78 µs 15.44 k/s 168.41 kcy
Verify: 199.12 µs 5.02 k/s 517.72 kcy
SharedSecret: 185.12 µs 5.40 k/s 483.19 kcy
Toy protocol benchmarks:
Spake2ee c+s: 575.02 µs 1.74 k/s 1.50 Mcy
Spake2ee c+s aug: 945.16 µs 1.06 k/s 2.46 Mcy
FHMQV c+s: 641.21 µs 1.56 k/s 1.67 Mcy
TripleDH anon c+s: 1.15 ms 871.43 /s 2.98 Mcy
Macro-benchmarks for Ed448-Goldilocks:
CFRG crypto benchmarks:
RFC 7748 keygen: 145.49 µs 6.87 k/s 378.32 kcy
RFC 7748 shared secret: 487.74 µs 2.05 k/s 1.27 Mcy
EdDSA keygen: 147.47 µs 6.78 k/s 383.46 kcy
EdDSA sign: 158.41 µs 6.31 k/s 411.85 kcy
EdDSA verify: 382.42 µs 2.61 k/s 994.22 kcy
Toy crypto benchmarks:
Create private key: 101.33 µs 9.87 k/s 263.41 kcy
Sign: 158.52 µs 6.31 k/s 412.15 kcy
Verify: 356.83 µs 2.80 k/s 927.67 kcy
SharedSecret: 271.99 µs 3.68 k/s 707.14 kcy
Toy protocol benchmarks:
Spake2ee c+s: 718.42 µs 1.39 k/s 1.87 Mcy
Spake2ee c+s aug: 1.24 ms 805.35 /s 3.23 Mcy
FHMQV c+s: 799.62 µs 1.25 k/s 2.08 Mcy
TripleDH anon c+s: 1.60 ms 626.68 /s 4.15 Mcy
Cycle calibration: 2.60 GHz
Let me know if you hit any other issues or have any questions.
@potatosalad sorry for the 2 year delay in getting back to you :-( LGTM, compiles beautifully now on 12.0-RC3 and tests pass too! thanks so much for this.
super interesting library! as title, I got this failure during goldilocks on FreeBSD - any ideas?