Implementation notes: amd64, nucnuc, crypto_dh/curve2251

Computer: nucnuc
Microarchitecture: amd64; Airmont (406c3)
Architecture: amd64
CPU ID: GenuineIntel-000406c3-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_dh
Primitive: curve2251
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
106924152765 385024 95674617 385892 2712T:relic/amd64-clmulclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122820231217
106959764389 385024 95685881 385892 2712T:relic/amd64-clmulclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122820231217
106994647301 385024 95667505 385892 2712T:relic/amd64-clmulclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122820231217
107316852226 385024 110473951 385900 2904T:relic/amd64-clmulgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217
107398740071 385024 110460679 385900 2904T:relic/amd64-clmulgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217
107620432206 385024 95651147 385892 2712T:relic/amd64-clmulclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122820231217
107999532254 385024 95651803 385892 2712T:relic/amd64-clmulclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122820231217
108216732234 385024 110452157 385892 2904T:relic/amd64-clmulgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217
108588928825 385024 110447831 385892 2904T:relic/amd64-clmulgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217
211109260522 385024 110482103 385900 2904T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217
211816748367 385024 110468767 385900 2904T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217
212675840530 385024 110460309 385892 2904T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217
212768537121 385024 110455983 385892 2904T:relic/amd64-ssse3gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217
602719627141 0 861534 860 1816T:mpfqgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217
629297717587 0 850814 860 1816T:mpfqgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217
639047116623 0 849318 860 1816T:mpfqgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217
643841512095 0 843860 860 1816T:mpfqgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122820231217

Test failure

Implementation: T:relic/amd64-avx
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
error 111

Number of similar (compiler,implementation) pairs: 9, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx

Compiler output

Implementation: T:mpfq
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
curve2_251.c: In file included from curve2_251.c:8:
curve2_251.c: In file included from ./field.h:1:
curve2_251.c: In file included from ./mpfq_2_251.h:5:
curve2_251.c: ./x86_64/mpfq_2_251.h:900:14: error: use of unknown builtin '__builtin_ia32_pslldqi128' [-Wimplicit-function-declaration]
curve2_251.c: r.s = t0 ^ SHLD(t1, 64);
curve2_251.c: ^
curve2_251.c: ./x86_64/mpfq_2_251.h:748:25: note: expanded from macro 'SHLD'
curve2_251.c: #define SHLD(x,r) (v2di)__builtin_ia32_pslldqi128 ((gcc43bugfix) (x),(r))
curve2_251.c: ^
curve2_251.c: ./x86_64/mpfq_2_251.h:900:14: error: invalid conversion between vector type 'v2di' (vector of 2 'uint64_t' values) and integer type 'int' of different size
curve2_251.c: r.s = t0 ^ SHLD(t1, 64);
curve2_251.c: ^~~~~~~~~~~~
curve2_251.c: ./x86_64/mpfq_2_251.h:748:19: note: expanded from macro 'SHLD'
curve2_251.c: #define SHLD(x,r) (v2di)__builtin_ia32_pslldqi128 ((gcc43bugfix) (x),(r))
curve2_251.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curve2_251.c: ./x86_64/mpfq_2_251.h:907:14: error: use of unknown builtin '__builtin_ia32_psrldqi128' [-Wimplicit-function-declaration]
curve2_251.c: r.s = t2 ^ SHRD(t1, 64);
curve2_251.c: ^
curve2_251.c: ./x86_64/mpfq_2_251.h:749:25: note: expanded from macro 'SHRD'
curve2_251.c: #define SHRD(x,r) (v2di)__builtin_ia32_psrldqi128 ((gcc43bugfix) (x),(r))
curve2_251.c: ^
curve2_251.c: ./x86_64/mpfq_2_251.h:907:14: error: invalid conversion between vector type 'v2di' (vector of 2 'uint64_t' values) and integer type 'int' of different size
curve2_251.c: r.s = t2 ^ SHRD(t1, 64);
curve2_251.c: ^~~~~~~~~~~~
curve2_251.c: ./x86_64/mpfq_2_251.h:749:19: note: expanded from macro 'SHRD'
curve2_251.c: ...

Number of similar (compiler,implementation) pairs: 5, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:mpfq
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:mpfq
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:mpfq
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:mpfq
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:mpfq

Compiler output

Implementation: T:relic/amd64-avx
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
relic.c: In file included from relic.c:4:
relic.c: ./src/relic_rand.c:117:8: warning: implicit declaration of function 'time' is invalid in C99 [-Wimplicit-function-declaration]
relic.c: srand(time(NULL));
relic.c: ^
relic.c: 1 warning generated.

Number of similar (compiler,implementation) pairs: 10, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-avx
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-clmul
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-clmul
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-clmul
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-clmul
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-clmul

Compiler output

Implementation: T:relic/amd64-avx
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
relic.c: In file included from relic.c:4:
relic.c: src/relic_rand.c: In function 'rand_init':
relic.c: src/relic_rand.c:117:8: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]
relic.c: 117 | srand(time(NULL));
relic.c: | ^~~~
try.c: /usr/bin/ld: libcrypto_dh_curve2251.a(relic_low.o): warning: relocation in read-only section `.eh_frame'
try.c: /usr/bin/ld: warning: creating DT_TEXTREL in a PIE

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-avx

Compiler output

Implementation: T:relic/amd64-clmul
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
relic.c: In file included from relic.c:4:
relic.c: src/relic_rand.c: In function 'rand_init':
relic.c: src/relic_rand.c:117:8: warning: implicit declaration of function 'time' [-Wimplicit-function-declaration]
relic.c: 117 | srand(time(NULL));
relic.c: | ^~~~
try.c: /usr/bin/ld: libcrypto_dh_curve2251.a(relic_low.o): warning: relocation in read-only section `.eh_frame'
try.c: /usr/bin/ld: warning: creating DT_TEXTREL in a PIE
try.c: /usr/bin/ld: libcrypto_dh_curve2251.a(relic_low.o): warning: relocation in read-only section `.eh_frame'
try.c: /usr/bin/ld: warning: creating DT_TEXTREL in a PIE
measure.c: /usr/bin/ld: libcrypto_dh_curve2251.a(relic_low.o): warning: relocation in read-only section `.eh_frame'
measure.c: /usr/bin/ld: warning: creating DT_TEXTREL in a PIE

Number of similar (compiler,implementation) pairs: 8, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-clmul
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-clmul
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-clmul
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-clmul
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-ssse3
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-ssse3
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-ssse3
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:relic/amd64-ssse3

Compiler output

Implementation: T:relic/amd64-ssse3
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
relic.c: In file included from relic.c:4:
relic.c: ./src/relic_rand.c:117:8: warning: implicit declaration of function 'time' is invalid in C99 [-Wimplicit-function-declaration]
relic.c: srand(time(NULL));
relic.c: ^
relic.c: 1 warning generated.
relic_low.S: ./src/low/relic_fb_mul_low.s:2339:2: error: changed section type for .note.GNU-stack, expected: 0x7
relic_low.S: .section .note.GNU-stack,"",@progbits
relic_low.S: ^

Number of similar (compiler,implementation) pairs: 5, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-ssse3
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-ssse3
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-ssse3
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-ssse3
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:relic/amd64-ssse3