Git Product home page Git Product logo

ed448goldilocks's Introduction

Decaf elliptic curve library

The libdecaf library is for elliptic curve research and practical application. It currently supports Ed448-Goldilocks and Curve25519.

The goals of this library are:

  • Implementing the X25519, X448 key exchange protocols (RFC 7748).
  • Implementing the Ed25519 and EdDSA-Ed448 signature schemes (RFC 8032).
  • Providing a platform for research and development of advanced cryptographic schemes using twisted Edwards curves.

This library is intended for developers who have experience with cryptography. It doesn't (yet?) include documentation on how to use digital signatures or key exchange securely. Consult your local cryptographer for advice.

Mailing lists

Because this is new software, please expect it to have bugs, perhaps even critical security bugs. If you are using it, please sign up for updates:

General elliptic curve operations.

This is a multi-purpose elliptic curve library. There is a C library, and a set of C++ wrapper headers. The C++ code consists entirely of inline calls, and has no compiled component.

The library implements a fairly complete suite of operations on the supported curves:

  • Point and scalar serialization and deserialization.
  • Point addition, subtraction, doubling, and equality.
  • Point multiplication by scalars. Accelerated double- and dual-scalar multiply.
  • Scalar addition, subtraction, multiplication, division, and equality.
  • Construction of precomputed tables from points. Precomputed scalarmul.
  • Hashing to the curve with an Elligator variant. Inverse of elligator for steganography. These are useful for advanced protocols such as password-authenticated key exchange (PAKE) and verifiable random functions (VRFs).

Internally, the library uses twisted Edwards curves with the "decaf" and "ristretto" technique to remove the curve's cofactor of 4 or 8. The upshot is that systems using the "decaf" interface will be using a prime-order group, which mitigates one of the few disadvantages of Edwards curves. However, this means that it is not able to implement systems which care about cofactor information.

The goal of this library is not only to follow best practices, but to make it easier for clients of the library to follow best practices. With a few well-marked exceptions, the functions in this library should be strongly constant-time: they do not allow secret data to flow to array indices, nor to control decisions except for a final failure check. Furthermore, the C++ wrapping uses RAII to automatically clear sensitive data, and has interfaces designed to prevent certain mistakes.

CFRG cryptosystems.

The library additionally supports two cryptosystems defined by the Crypto Forum Research Group (CFRG): the X448/X25519 Diffie-Hellman functions (RFC 7748), and the EdDSA signature scheme (RFC 8032). Future versions might support additional operations on these curves, such as precomputed signature verification.

Symmetric crypto and hashing

The Decaf library doesn't implement much symmetric crypto, but it does contain the hash functions required by the CFRG cryptosystems: SHA512, SHA-3 and SHAKE.

Internals

The "decaf" technique is described in https://eprint.iacr.org/2015/673 While the title of that paper is "removing cofactors through point compression", it might be more accurate to say "through quotients and isogenies". The internal representation of points is as "even" elements of a twisted Edwards curve with a=-1. Using this subgroup removes a factor of 2 from the cofactor. The remaining factor of 2 or 4 is removed with a quotient group: any two points which differ by an element of the 2- or 4-torsion subgroup are considered equal to each other.

When a point is written out to wire format, it is converted (by isogeny) to a Jacobi quartic curve, which is halfway between an Edwards curve and a Montgomery curve. One of the 4 or 8 equivalent points on the Jacobi quartic is chosen (it is "distinguished" according to certain criteria, such as having a positive x-coordinate). The x-coordinate of this point is written out. The y-coordinate is not written out, but the decoder knows which of the two possible y-coordinates is correct because of the distinguishing rules. See the paper for more details.

As of v0.9.4, libdecaf uses the "Ristretto" variant of this encoding. See https://www.ristretto.group for details, once that site is up.

Build and Install

cmake -DCMAKE_INSTALL_PREFIX= make make test make install

Most C source code is generated through a python script during the build. Some files holding tables are generated in one more step building an executable to generate them. They are thus stored in the source tree to help cross-compilation. The build script update them when their dependencies are modified, to build only these files:

make decaf_tables

Doxygen generated documentation is located in ./doc directory in the binary tree after running

make doc

Licensing

Most of the source files here are by Mike Hamburg. Those files are (c) 2014-2017 Cryptography Research, Inc (a division of Rambus). All of these files are usable under the MIT license contained in LICENSE.txt.

Caveats

As mentioned in the license, there is absolutely NO WARRANTY on any of this code. This code might well have security-critical bugs despite my best efforts.

I've attempted to protect against timing attacks and invalid point attacks, but as of yet I've made no attempt to protect against power analysis.

Cross-compiling with mingw

Due to some alignment errors we cannot use -O2, and due to cross-compiling we need to make sure ARCHFLAGS is unset. Try OFLAGS='' ARCHFLAGS='' make win.

The final library is not built - but for my use-case (statically linking the .o files into my lib) that is not necessary - fixes welcome.

ed448goldilocks's People

Contributors

asciimoo avatar coruus avatar dnet avatar jeannotlapin avatar jmgurney avatar mrolinek avatar nwilson avatar ocheron avatar potatosalad avatar stef avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

ed448goldilocks's Issues

compilation fails with gcc7

src/GENERATED/include/decaf/point_255.hxx:321:59: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context]
         if (DECAF_SUCCESS != decode(buffer,allow_identity ? DECAF_TRUE : DECAF_FALSE)) {

Compilation fail with gcc 8.2

g++ -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c    -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/test_decaf.o test/test_decaf.cxx
test/test_decaf.cxx: In instantiation of ‘static void Tests<Group>::test_ec() [with Group = decaf::Ristretto]’:
test/test_decaf.cxx:664:12:   required from ‘static void Tests<Group>::run() [with Group = decaf::Ristretto]’
src/GENERATED/include/decaf.hxx:26:28:   required from ‘void decaf::run_for_all_curves() [with Run = Tests]’
test/test_decaf.cxx:752:31:   required from here
test/test_decaf.cxx:330:7: error: catching polymorphic type ‘class decaf::CryptoException’ by value [-Werror=catch-value=]
     } catch (CryptoException) {
       ^~~~~
test/test_decaf.cxx:339:11: error: catching polymorphic type ‘class decaf::CryptoException’ by value [-Werror=catch-value=]
         } catch (CryptoException) {
           ^~~~~
test/test_decaf.cxx:349:11: error: catching polymorphic type ‘class decaf::CryptoException’ by value [-Werror=catch-value=]
         } catch (CryptoException) {
           ^~~~~
test/test_decaf.cxx:368:11: error: catching polymorphic type ‘class decaf::CryptoException’ by value [-Werror=catch-value=]
         } catch (CryptoException) {
           ^~~~~
test/test_decaf.cxx:411:11: error: catching polymorphic type ‘class decaf::CryptoException’ by value [-Werror=catch-value=]
         } catch (CryptoException) {
           ^~~~~
test/test_decaf.cxx: In instantiation of ‘static void Tests<Group>::test_ec() [with Group = decaf::Ed448Goldilocks]’:
test/test_decaf.cxx:664:12:   required from ‘static void Tests<Group>::run() [with Group = decaf::Ed448Goldilocks]’
src/GENERATED/include/decaf.hxx:27:34:   required from ‘void decaf::run_for_all_curves() [with Run = Tests]’
test/test_decaf.cxx:752:31:   required from here
test/test_decaf.cxx:330:7: error: catching polymorphic type ‘class decaf::CryptoException’ by value [-Werror=catch-value=]
     } catch (CryptoException) {
       ^~~~~
test/test_decaf.cxx:339:11: error: catching polymorphic type ‘class decaf::CryptoException’ by value [-Werror=catch-value=]
         } catch (CryptoException) {
           ^~~~~
test/test_decaf.cxx:349:11: error: catching polymorphic type ‘class decaf::CryptoException’ by value [-Werror=catch-value=]
         } catch (CryptoException) {
           ^~~~~
test/test_decaf.cxx:368:11: error: catching polymorphic type ‘class decaf::CryptoException’ by value [-Werror=catch-value=]
         } catch (CryptoException) {
           ^~~~~
test/test_decaf.cxx:411:11: error: catching polymorphic type ‘class decaf::CryptoException’ by value [-Werror=catch-value=]
         } catch (CryptoException) {
           ^~~~~
cc1plus: all warnings being treated as errors
gcc -Igoldilocks/src/GENERATED/include -I/usr/include/sodium -Wall -fPIC -fPIE -O3 -g -o bin/challenge bin/challenge.c -g -lsodium goldilocks/build/obj/curve25519/decaf.o goldilocks/build/obj/curve25519/decaf_tables.o goldilocks/build/obj/curve25519/scalar.o goldilocks/build/obj/utils.o goldilocks/build/obj/p25519/f_impl.o goldilocks/build/obj/p25519/f_generic.o goldilocks/build/obj/p25519/f_arithmetic.o goldilocks/build/obj/curve25519/elligator.o
bin/challenge.c:22:10: fatal error: randombytes.h: No such file or directory
 #include <randombytes.h>
          ^~~~~~~~~~~~~~~
compilation terminated.

compilation fail with gcc 9.3.0

Hi,

I can't compile the software

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 

$ make
mkdir -p build/obj src/GENERATED/c build/obj \
        build/lib src/GENERATED/include build/bin build/obj/bin src/GENERATED/c src/GENERATED/include/decaf \
        build/obj/p25519 build/obj/curve25519 build/obj/p448 build/obj/ed448goldilocks src/GENERATED/c/decaf
touch build/obj/timestamp
cp -f src/public_include/decaf/common.h src/GENERATED/include/decaf/common.h
cp -f src/public_include/decaf/sha512.h src/GENERATED/include/decaf/sha512.h
cp -f src/public_include/decaf/spongerng.h src/GENERATED/include/decaf/spongerng.h
cp -f src/public_include/decaf/shake.h src/GENERATED/include/decaf/shake.h
cp -f src/public_include/decaf/sha512.hxx src/GENERATED/include/decaf/sha512.hxx
cp -f src/public_include/decaf/shake.hxx src/GENERATED/include/decaf/shake.hxx
cp -f src/public_include/decaf/spongerng.hxx src/GENERATED/include/decaf/spongerng.hxx
cp -f src/public_include/decaf/secure_buffer.hxx src/GENERATED/include/decaf/secure_buffer.hxx
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/utils.o src/utils.c
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/shake.o src/shake.c
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/sha512.o src/sha512.c
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/spongerng.o src/spongerng.c
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -I src/p25519 -I src/p25519/arch_x86_64 -I src/GENERATED/c/p25519 -I src/GENERATED/c/p25519/arch_x86_64 -I src/include/arch_x86_64 -c -o build/obj/p25519/f_impl.o src/p25519/arch_x86_64/f_impl.c
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -I src/p25519 -I src/p25519/arch_x86_64 -I src/GENERATED/c/p25519 -I src/GENERATED/c/p25519/arch_x86_64 -I src/include/arch_x86_64 -c -o build/obj/p25519/f_arithmetic.o src/p25519/f_arithmetic.c
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -I src/p25519 -I src/p25519/arch_x86_64 -I src/GENERATED/c/p25519 -I src/GENERATED/c/p25519/arch_x86_64 -I src/include/arch_x86_64 -c -o build/obj/p25519/f_generic.o src/GENERATED/c/p25519/f_generic.c
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/curve25519/decaf.o src/GENERATED/c/curve25519/decaf.c -I build/obj/curve_curve25519/ -I src/p25519 -I src/p25519/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/curve25519 -I src/GENERATED/c/p25519 -I src/GENERATED/c/p25519/arch_x86_64
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/curve25519/elligator.o src/GENERATED/c/curve25519/elligator.c -I build/obj/curve_curve25519/ -I src/p25519 -I src/p25519/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/curve25519 -I src/GENERATED/c/p25519 -I src/GENERATED/c/p25519/arch_x86_64
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/curve25519/scalar.o src/GENERATED/c/curve25519/scalar.c -I build/obj/curve_curve25519/ -I src/p25519 -I src/p25519/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/curve25519 -I src/GENERATED/c/p25519 -I src/GENERATED/c/p25519/arch_x86_64
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/curve25519/eddsa.o src/GENERATED/c/curve25519/eddsa.c -I build/obj/curve_curve25519/ -I src/p25519 -I src/p25519/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/curve25519 -I src/GENERATED/c/p25519 -I src/GENERATED/c/p25519/arch_x86_64
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/curve25519/decaf_gen_tables.o src/GENERATED/c/curve25519/decaf_gen_tables.c -I build/obj/curve_curve25519/ -I src/p25519 -I src/p25519/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/curve25519 -I src/GENERATED/c/p25519 -I src/GENERATED/c/p25519/arch_x86_64
cc  -o build/obj/bin/decaf_gen_tables_curve25519 build/obj/curve25519/decaf_gen_tables.o build/obj/curve25519/decaf.o build/obj/curve25519/scalar.o build/obj/utils.o build/obj/p25519/f_impl.o build/obj/p25519/f_arithmetic.o build/obj/p25519/f_generic.o
./build/obj/bin/decaf_gen_tables_curve25519 > src/GENERATED/c/curve25519/decaf_tables.c || (rm src/GENERATED/c/curve25519/decaf_tables.c; exit 1)
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/curve25519/decaf_tables.o src/GENERATED/c/curve25519/decaf_tables.c -I build/obj/curve_curve25519/ -I src/p25519 -I src/p25519/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/curve25519 -I src/GENERATED/c/p25519 -I src/GENERATED/c/p25519/arch_x86_64
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -I src/p448 -I src/p448/arch_x86_64 -I src/GENERATED/c/p448 -I src/GENERATED/c/p448/arch_x86_64 -I src/include/arch_x86_64 -c -o build/obj/p448/f_impl.o src/p448/arch_x86_64/f_impl.c
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -I src/p448 -I src/p448/arch_x86_64 -I src/GENERATED/c/p448 -I src/GENERATED/c/p448/arch_x86_64 -I src/include/arch_x86_64 -c -o build/obj/p448/f_arithmetic.o src/p448/f_arithmetic.c
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -I src/p448 -I src/p448/arch_x86_64 -I src/GENERATED/c/p448 -I src/GENERATED/c/p448/arch_x86_64 -I src/include/arch_x86_64 -c -o build/obj/p448/f_generic.o src/GENERATED/c/p448/f_generic.c
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/ed448goldilocks/decaf.o src/GENERATED/c/ed448goldilocks/decaf.c -I build/obj/curve_ed448goldilocks/ -I src/p448 -I src/p448/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/ed448goldilocks -I src/GENERATED/c/p448 -I src/GENERATED/c/p448/arch_x86_64
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/ed448goldilocks/elligator.o src/GENERATED/c/ed448goldilocks/elligator.c -I build/obj/curve_ed448goldilocks/ -I src/p448 -I src/p448/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/ed448goldilocks -I src/GENERATED/c/p448 -I src/GENERATED/c/p448/arch_x86_64
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/ed448goldilocks/scalar.o src/GENERATED/c/ed448goldilocks/scalar.c -I build/obj/curve_ed448goldilocks/ -I src/p448 -I src/p448/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/ed448goldilocks -I src/GENERATED/c/p448 -I src/GENERATED/c/p448/arch_x86_64
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/ed448goldilocks/eddsa.o src/GENERATED/c/ed448goldilocks/eddsa.c -I build/obj/curve_ed448goldilocks/ -I src/p448 -I src/p448/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/ed448goldilocks -I src/GENERATED/c/p448 -I src/GENERATED/c/p448/arch_x86_64
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/ed448goldilocks/decaf_gen_tables.o src/GENERATED/c/ed448goldilocks/decaf_gen_tables.c -I build/obj/curve_ed448goldilocks/ -I src/p448 -I src/p448/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/ed448goldilocks -I src/GENERATED/c/p448 -I src/GENERATED/c/p448/arch_x86_64
cc  -o build/obj/bin/decaf_gen_tables_ed448goldilocks build/obj/ed448goldilocks/decaf_gen_tables.o build/obj/ed448goldilocks/decaf.o build/obj/ed448goldilocks/scalar.o build/obj/utils.o build/obj/p448/f_impl.o build/obj/p448/f_arithmetic.o build/obj/p448/f_generic.o
./build/obj/bin/decaf_gen_tables_ed448goldilocks > src/GENERATED/c/ed448goldilocks/decaf_tables.c || (rm src/GENERATED/c/ed448goldilocks/decaf_tables.c; exit 1)
cc -std=c99 -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/ed448goldilocks/decaf_tables.o src/GENERATED/c/ed448goldilocks/decaf_tables.c -I build/obj/curve_ed448goldilocks/ -I src/p448 -I src/p448/arch_x86_64 -I src/include/arch_x86_64 -I src/GENERATED/c/ed448goldilocks -I src/GENERATED/c/p448 -I src/GENERATED/c/p448/arch_x86_64
rm -f build/lib/libdecaf.so.1
cc  -shared -Wl,-soname,`basename build/lib/libdecaf.so.1` -Wl,--gc-sections -o build/lib/libdecaf.so.1 build/obj/utils.o build/obj/shake.o build/obj/sha512.o build/obj/spongerng.o build/obj/p25519/f_impl.o build/obj/p25519/f_arithmetic.o build/obj/p25519/f_generic.o build/obj/curve25519/decaf.o build/obj/curve25519/elligator.o build/obj/curve25519/scalar.o build/obj/curve25519/eddsa.o build/obj/curve25519/decaf_tables.o build/obj/p448/f_impl.o build/obj/p448/f_arithmetic.o build/obj/p448/f_generic.o build/obj/ed448goldilocks/decaf.o build/obj/ed448goldilocks/elligator.o build/obj/ed448goldilocks/scalar.o build/obj/ed448goldilocks/eddsa.o build/obj/ed448goldilocks/decaf_tables.o
strip --discard-all build/lib/libdecaf.so.1
ln -sf `basename build/lib/libdecaf.so.1` build/lib/libdecaf.so
g++ -fno-strict-aliasing -pedantic -Wall -Wextra -Werror -Wunreachable-code -Wmissing-declarations -Wunused-function -Wno-overlength-strings   -Isrc/include -Isrc/GENERATED/include -Isrc/GENERATED/c -O2 -march=native  -ffunction-sections -fdata-sections -fvisibility=hidden -fomit-frame-pointer -fPIC  -c -o build/obj/test_decaf.o test/test_decaf.cxx
In file included from src/GENERATED/include/decaf/point_255.h:18,
                 from src/GENERATED/include/decaf/point_255.hxx:35,
                 from src/GENERATED/include/decaf.hxx:18,
                 from test/test_decaf.cxx:12:
src/GENERATED/include/decaf/common.h: In function ‘decaf_bool_t decaf_successful(decaf_error_t)’:
src/GENERATED/include/decaf/common.h:118:45: error: overflow in conversion from ‘decaf_word_t’ {aka ‘long unsigned int�} to ‘decaf_error_t’ changes value from ‘18446744073709551615’ to ‘DECAF_SUCCESS’ [-Werror=overflow]
  118 |     decaf_dword_t w = ((decaf_word_t)e) ^  ((decaf_word_t)DECAF_SUCCESS);
      |                                            ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make: *** [Makefile:354: build/obj/test_decaf.o] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.