Error: nss 3.48 is already installed
To upgrade to 3.52, run `brew upgrade nss`.
Error: nspr 4.24 is already installed
To upgrade to 4.25, run `brew upgrade nspr`.
In file included from build/pclient/main.c:9:
include/mprio.h:16:10: fatal error: 'blapit.h' file not found
#include <blapit.h>
^~~~~~~~~~
In file included from build/pclient/main.c:9:
include/mprio.h:17:10: fatal error: 'msgpack.h' file not found
#include <msgpack.h>
^~~~~~~~~~~
ld: error: unable to find library -lnss3
ld: error: unable to find library -lnspr4
ld: error: unable to find library -lmsgpackc
* In `serial_read_packet_client`, we should check that the type
of the incoming packet matches the type of the `PrioPacketClient`
passed into `serial_read_packet_client` and fail if the two don't
match.
* Add a test for this behavior.
Co-authored-by: Robert Helmer <rhelmer@rhelmer.org>
* Fix memory leak in serial_read_packet_client
* Fixing more memory leaks in `prio/serial.c`
The `UP_CHECK` macro just returned on failure, rather than
jumping to the `cleanup` label. This commit replaces `UP_CHECK`
with `UP_CHECKC`, which jumps to `cleanup` on failure.
* Replace `P_CHECK` with `P_CHECKC` in prio/serial.c
Every function in `prio/serial.c` has a `cleanup` label, but
much of the code in these functions won't actually jump to
cleanup on failure. As far as I can tell, this doesn't cause
any additional memory leaks, but in case someone adds cleanup
code at the `cleanup` label in the future, it seems prudent to
always jump to `cleanup` on failure.
Co-authored-by: Henry Corrigan-Gibbs <henrycg@csail.mit.edu>
PRIO_TAG is a fixed-size string, we can use sizeof to the same effect.
This also has the nice side-effect of removing a variable-length-array
since AAD_LEN could not be known at compile-time
* Remove precomputed table of roots (#68)
There is no need to ship the large precomputed table of roots of unity;
it's possible to compute the table on the fly in linear time (in the
table size). This commit:
* removes the table from `prio/params.h`,
* removes the script that generates it (`scripts/gen_params.py`), and
* adds code to generate the table in `prio/config.c`.
* Point Travis to latest version of NSS
* Add PRG_get_int_range() function
* Fix bug in proof-checking code.
Per Appendix D.2 of the full version of the Prio paper, the servers
should evaluate the polynomials f, g, and h at a random point r in the
set {M+1, ..., modulus-1}, where M is the number of multiplication gates
in the "Valid" circuit. The implementation previously sampled the point
r from the larger set {0, ..., modulus-1}.
* Remove extraneous printf() in test code
* Fixes per clang-format
* Issue #57 - Expose maximum number of data fields
- Add PrioConfig_maxDataFields() to public API
- Check that the number of data fields passed in during config
creation is not too large.
* Test for PrioConfig_maxDataFields()
* Fix formatting per clang-format.
* Allow DEBUG mode without sanitizers
Valgrind is incompatible with AddressSanitizer, so it is nice to turn
on DEBUG mode without the sanitizers.
* PrivateKey import/export functions
* Define PT_CHECK*() macros for better test output
When using P_CHECKC(), you get no information about where
or why the test failed. These macros also call `mu_check()`
so that you can more easily figure out what went wrong.
* Fix clang-format issues
* Configure travis to use NSS 3.39
* Update README with new version dependencies.
* Fixes per rhelmer's review
* Fix typos.
* Use (pointer,length)-style arguments for import and export functions.
* don't clang-format generated roots
The formatted arrays are significantly less readable.
* eliminate the need for RootsInv data
Since RootsInv is essentially Roots stored in reverse order, we don't
need to store an entirely separate array for the inverse roots. We can
simply iterate over Roots in reverse order to produce the inverse roots.
* make roots data read-only and shareable between processes
The roots of unity are currently stored as:
static const char *Roots[] = { ... };
which is inefficient for two reasons:
1. `Roots` is a writable array, even though we only ever read from it.
2. `Roots` contain pointers, which require run-time relocations.
These run-time relocations can be at least as large as the entries
in the array.
The upshot is that `Roots` requires more space than necessary and cannot
be shared between processes.
To fix both of these problems, let's change the storage format to one
long character array, where individual roots are formatted to all be the
same width. This format enables efficient access to individual roots
and is pointer-free, so no run-time relocations are required.
* Script works with Python3, add one sanity check
PR #34 changes the way compiler flags are read from the environment, and
SCons seems to want "LINKFLAGS" set in the enviroment instead of
"LDFLAGS" - this was being mapped before.
It's probably not worth re-mapping this, just changing it so what is
specified in the README still works for platforms that need to install
NSS in a weird place (like macOS and Windows) :)
* issue #25 - format libprio with clang-format, using Mozilla style
* force clang 3.9 (latest available on Ubuntu Trusty)
* remove clang-format file, 3.9 is confused by some settings. try using built-in Mozilla style instead