xaptum / ecdaa

A C implementation of elliptic-curve-based Direct Anonymous Attestation (DAA) signatures. Created to support the Xaptum Edge Network Fabric, an IoT Network Solution.
https://www.xaptum.com
Apache License 2.0
45 stars 8 forks source link

Support 16 and 32 bit builds #98

Closed drbild closed 6 years ago

drbild commented 6 years ago

AMCL uses different chunk sizes under the hood for 16, 32, and 64 bit machines. So, we can't hard code things like BIG_256_56 here.

This series

zanebeckwith commented 6 years ago

This branch is a bit old now (it's taken me too long to work on this), so once we're ready to merge I'll rebase and get it ready.

I'd appreciate any feedback on the CMake approach taken in the new commits, particularly the way I'm installing the new libecdaa-tpm library and its pkgconfig/cmake configuration.

drbild commented 6 years ago

How about

.travis/
cmake/
examples/
ecdaa/  # or libecdaa/
ecdaa/include/
ecdaa/CMakeLists.txt  # Defines the lib and install targets for ecdaa
ecdaa/prng.c
ecdaa/test/
ecdaa-tpm/ # or libecdaa-tpm
ecdaa-tpm/include/
ecdaa-tpm/tpm_context.c
ecdaa-tpm/CMakeLists.txt #Defines the lib and install targets for ecdaa-tpm
ecdaa-tpm/test/
CMakeLists.txt # Sets options, creates packaging (`ecdaa-cmake.config` and the two `*.pc` files).
zanebeckwith commented 6 years ago

Agree with above, so most recent commit structures project as:

.travis/
cmake/
libecdaa/
libecdaa-tpm/
internal-utilities/
test/

where internal-utilities groups together some utility functions that both regular and TPM variants use (mostly, it's the AMCL extension functions, which I hope to eventually get upstreamed).

@drbild let me know what you think when you have time to take a look

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-2.8%) to 93.358% when pulling 583e649dda51acc018c1715b9e32397164692029 on drbild:support-32-bit into e1abd65e69e3e68ad15ff11f79e48fac4b2e03e2 on xaptum:master.

drbild commented 6 years ago

@zanebeckwith I suggest the name common/ instead of internal-utilities since it's a common convention and much shorter.

common
common/amcl-extensions
common/internal-utiltities

Also, are any of the headers in acml-extensions public? That is, do any of them need to be installed?

zanebeckwith commented 6 years ago

No, nothing in amcl-extensions should be public, it should all be getting compiled into the library.

I'll rename to common (good call, I like that).

zanebeckwith commented 6 years ago

This PR does the following:

zanebeckwith commented 6 years ago

Fixes #104