Implementation notes: aarch64, minimac, crypto_sign/pflash1

Computer: minimac
Architecture: aarch64
CPU ID: unknown CPU ID
SUPERCOP version: 20211108
Operation: crypto_sign
Primitive: pflash1

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
GFword.c: GFword.c:109:66: warning: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Wbitwise-conditional-parentheses]
GFword.c: uint32 logDetA = 255 - (uint32)(logtab[ ((0==logZ0)|(0==logZ0Z1)?0:alogtab[logZ0+logZ0Z1])
GFword.c: ~~~~~~~~~~~~~~~~~~~~~~~^
GFword.c: GFword.c:109:66: note: place parentheses around the '|' expression to silence this warning
GFword.c: uint32 logDetA = 255 - (uint32)(logtab[ ((0==logZ0)|(0==logZ0Z1)?0:alogtab[logZ0+logZ0Z1])
GFword.c: ^
GFword.c: ( )
GFword.c: GFword.c:109:66: note: place parentheses around the '?:' expression to evaluate it first
GFword.c: uint32 logDetA = 255 - (uint32)(logtab[ ((0==logZ0)|(0==logZ0Z1)?0:alogtab[logZ0+logZ0Z1])
GFword.c: ^
GFword.c: ( )
GFword.c: 1 warning generated.
SignScheme.c: SignScheme.c:211:19: warning: passing 'const unsigned char *' to parameter of type 'byte *' (aka 'unsigned char *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
SignScheme.c: SignScheme_sign( sk , h , mlen , sm );
SignScheme.c: ^~
SignScheme.c: SignScheme.c:95:29: note: passing argument to parameter 'pri' here
SignScheme.c: int SignScheme_sign( byte * pri , byte * Y , int Ylen , byte * outX )
SignScheme.c: ^
SignScheme.c: SignScheme.c:227:19: warning: passing 'const unsigned char *' to parameter of type 'byte *' (aka 'unsigned char *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
SignScheme.c: SignScheme_GMap( pk , sm , h );
SignScheme.c: ^~
SignScheme.c: SignScheme.c:152:29: note: passing argument to parameter 'pub' here
SignScheme.c: int SignScheme_GMap( byte * pub , byte * X , byte * outY )
SignScheme.c: ^
SignScheme.c: SignScheme.c:227:24: warning: passing 'const unsigned char *' to parameter of type 'byte *' (aka 'unsigned char *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
SignScheme.c: SignScheme_GMap( pk , sm , h );
SignScheme.c: ^~
SignScheme.c: SignScheme.c:152:42: note: passing argument to parameter 'X' here
SignScheme.c: int SignScheme_GMap( byte * pub , byte * X , byte * outY )
SignScheme.c: ^
SignScheme.c: 3 warnings generated.
try.c: ld: warning: object file (/Users/djb/supercop-20210529/supercop-data/minimac/aarch64/lib/knownrandombytes.o) was built for newer macOS version (11.3) than being linked (11.0)
try.c: ld: warning: object file (/Users/djb/supercop-20210529/supercop-data/minimac/aarch64/lib/kernelrandombytes.o) was built for newer macOS version (11.3) than being linked (11.0)
try.c: ld: warning: object file (/Users/djb/supercop-20210529/supercop-data/minimac/aarch64/lib/cpucycles.o) was built for newer macOS version (11.3) than being linked (11.0)
try.c: ld: warning: could not create compact unwind for _init: registers 21 and 22 not saved contiguously in frame
try.c: ld: warning: object file (/Users/djb/supercop-20210529/supercop-data/minimac/aarch64/lib/libsupercop.a(crypto_rng_chacha20_ref_constbranchindex-rng.o)) was built for newer macOS version (11.3) than being linked (11.0)
try.c: ld: warning: object file (/Users/djb/supercop-20210529/supercop-data/minimac/aarch64/lib/libsupercop.a(crypto_hash_sha256_ref_constbranchindex-hash.o)) was built for newer macOS version (11.3) than being linked (11.0)
try.c: ld: warning: could not create compact unwind for _crypto_hash_sha256_ref_constbranchindex: register 26 saved somewhere other than in frame
try.c: Undefined symbols for architecture arm64:
try.c: "_polyPow24", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow56", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow8", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow88", referenced from:
try.c: _PFLASH_QMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: ld: symbol(s) not found for architecture arm64
try.c: clang: error: linker command failed with exit code 1 (use -v to see invocation)

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
PFLASH.c: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:194,
PFLASH.c: from PFLASH.c:6:
PFLASH.c: PFLASH.c:152:16: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 152 | memcpy( outZ ,_Z,37);
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:149:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 149 | _Z[i-(37- 0)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:148:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 148 | _Z[i-(37- 2)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:147:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 147 | _Z[i-(37-10)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:146:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 146 | _Z[i-(37-12)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:143:10: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 143 | temp = _Z[i];
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:136:15: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 136 | if( logY ) _Z[i+j] ^= alogtab[logX+logY];
PFLASH.c: | ^~
PFLASH.c: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:31,
PFLASH.c: from /opt/homebrew/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/aarch64-apple-darwin20/10.2.1/include-fixed/stdio.h:421,
PFLASH.c: ...
SignScheme.c: SignScheme.c: In function 'signatureofshorthash':
SignScheme.c: SignScheme.c:211:19: warning: passing argument 1 of 'SignScheme_sign' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
SignScheme.c: 211 | SignScheme_sign( sk , h , mlen , sm );
SignScheme.c: | ^~
SignScheme.c: SignScheme.c:95:29: note: expected 'byte *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
SignScheme.c: 95 | int SignScheme_sign( byte * pri , byte * Y , int Ylen , byte * outX )
SignScheme.c: | ~~~~~~~^~~
SignScheme.c: SignScheme.c: In function 'verification':
SignScheme.c: SignScheme.c:227:19: warning: passing argument 1 of 'SignScheme_GMap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
SignScheme.c: 227 | SignScheme_GMap( pk , sm , h );
SignScheme.c: | ^~
SignScheme.c: SignScheme.c:152:29: note: expected 'byte *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
SignScheme.c: 152 | int SignScheme_GMap( byte * pub , byte * X , byte * outY )
SignScheme.c: | ~~~~~~~^~~
SignScheme.c: SignScheme.c:227:24: warning: passing argument 2 of 'SignScheme_GMap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
SignScheme.c: 227 | SignScheme_GMap( pk , sm , h );
SignScheme.c: | ^~
SignScheme.c: SignScheme.c:152:42: note: expected 'byte *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
SignScheme.c: 152 | int SignScheme_GMap( byte * pub , byte * X , byte * outY )
SignScheme.c: | ~~~~~~~^
try.c: Undefined symbols for architecture arm64:
try.c: "_polyPow24", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow56", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow8", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow88", referenced from:
try.c: _PFLASH_QMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: ld: symbol(s) not found for architecture arm64
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 2, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE
BLAS.c: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:194,
BLAS.c: from BLAS.c:6:
BLAS.c: BLAS.c: In function 'BLAS_affineGF16':
BLAS.c: BLAS.c:284:2: warning: '__builtin_memset' specified size between 18446744072635809792 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
BLAS.c: 284 | memset(b, 0, sizeof(byte)*dim_div_2);
BLAS.c: | ^~~~~~
PFLASH.c: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:194,
PFLASH.c: from PFLASH.c:6:
PFLASH.c: PFLASH.c:152:16: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 152 | memcpy( outZ ,_Z,37);
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:149:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 149 | _Z[i-(37- 0)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:148:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 148 | _Z[i-(37- 2)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:147:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 147 | _Z[i-(37-10)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:146:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 146 | _Z[i-(37-12)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:143:10: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 143 | temp = _Z[i];
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:136:15: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 136 | if( logY ) _Z[i+j] ^= alogtab[logX+logY];
PFLASH.c: | ^~
PFLASH.c: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:31,
PFLASH.c: from /opt/homebrew/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/aarch64-apple-darwin20/10.2.1/include-fixed/stdio.h:421,
PFLASH.c: ...
SignScheme.c: SignScheme.c: In function 'signatureofshorthash':
SignScheme.c: SignScheme.c:211:19: warning: passing argument 1 of 'SignScheme_sign' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
SignScheme.c: 211 | SignScheme_sign( sk , h , mlen , sm );
SignScheme.c: | ^~
SignScheme.c: SignScheme.c:95:29: note: expected 'byte *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
SignScheme.c: 95 | int SignScheme_sign( byte * pri , byte * Y , int Ylen , byte * outX )
SignScheme.c: | ~~~~~~~^~~
SignScheme.c: SignScheme.c: In function 'verification':
SignScheme.c: SignScheme.c:227:19: warning: passing argument 1 of 'SignScheme_GMap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
SignScheme.c: 227 | SignScheme_GMap( pk , sm , h );
SignScheme.c: | ^~
SignScheme.c: SignScheme.c:152:29: note: expected 'byte *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
SignScheme.c: 152 | int SignScheme_GMap( byte * pub , byte * X , byte * outY )
SignScheme.c: | ~~~~~~~^~~
SignScheme.c: SignScheme.c:227:24: warning: passing argument 2 of 'SignScheme_GMap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
SignScheme.c: 227 | SignScheme_GMap( pk , sm , h );
SignScheme.c: | ^~
SignScheme.c: SignScheme.c:152:42: note: expected 'byte *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
SignScheme.c: 152 | int SignScheme_GMap( byte * pub , byte * X , byte * outY )
SignScheme.c: | ~~~~~~~^
try.c: Undefined symbols for architecture arm64:
try.c: "_polyPow24", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow56", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow8", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow88", referenced from:
try.c: _PFLASH_QMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: ld: symbol(s) not found for architecture arm64
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
PFLASH.c: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:194,
PFLASH.c: from PFLASH.c:6:
PFLASH.c: PFLASH.c:152:16: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 152 | memcpy( outZ ,_Z,37);
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:149:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 149 | _Z[i-(37- 0)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:148:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 148 | _Z[i-(37- 2)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:147:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 147 | _Z[i-(37-10)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:146:4: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 146 | _Z[i-(37-12)] ^= temp;
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:143:10: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 143 | temp = _Z[i];
PFLASH.c: | ^~
PFLASH.c: PFLASH.c:136:15: warning: '_Z' is static but used in inline function 'polyMul' which is not static
PFLASH.c: 136 | if( logY ) _Z[i+j] ^= alogtab[logX+logY];
PFLASH.c: | ^~
PFLASH.c: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:31,
PFLASH.c: from /opt/homebrew/Cellar/gcc/10.2.0_4/lib/gcc/10/gcc/aarch64-apple-darwin20/10.2.1/include-fixed/stdio.h:421,
PFLASH.c: ...
SignScheme.c: SignScheme.c: In function 'signatureofshorthash':
SignScheme.c: SignScheme.c:211:19: warning: passing argument 1 of 'SignScheme_sign' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
SignScheme.c: 211 | SignScheme_sign( sk , h , mlen , sm );
SignScheme.c: | ^~
SignScheme.c: SignScheme.c:95:29: note: expected 'byte *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
SignScheme.c: 95 | int SignScheme_sign( byte * pri , byte * Y , int Ylen , byte * outX )
SignScheme.c: | ~~~~~~~^~~
SignScheme.c: SignScheme.c: In function 'verification':
SignScheme.c: SignScheme.c:227:19: warning: passing argument 1 of 'SignScheme_GMap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
SignScheme.c: 227 | SignScheme_GMap( pk , sm , h );
SignScheme.c: | ^~
SignScheme.c: SignScheme.c:152:29: note: expected 'byte *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
SignScheme.c: 152 | int SignScheme_GMap( byte * pub , byte * X , byte * outY )
SignScheme.c: | ~~~~~~~^~~
SignScheme.c: SignScheme.c:227:24: warning: passing argument 2 of 'SignScheme_GMap' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
SignScheme.c: 227 | SignScheme_GMap( pk , sm , h );
SignScheme.c: | ^~
SignScheme.c: SignScheme.c:152:42: note: expected 'byte *' {aka 'unsigned char *'} but argument is of type 'const unsigned char *'
SignScheme.c: 152 | int SignScheme_GMap( byte * pub , byte * X , byte * outY )
SignScheme.c: | ~~~~~~~^
try.c: Undefined symbols for architecture arm64:
try.c: "_polyMul", referenced from:
try.c: _PFLASH_QMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow24", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow56", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow8", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polyPow88", referenced from:
try.c: _PFLASH_QMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: "_polySqu", referenced from:
try.c: _PFLASH_ivsQMap in libcrypto_sign_pflash1.a(PFLASH.o)
try.c: ld: symbol(s) not found for architecture arm64
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref