The new secret memory pool was causing CI failures in the fuzzing code,
due to the fuzzer compiling its binaries with memory sanitizer support.
https://doc.rust-lang.org/beta/unstable-book/compiler-flags/sanitizer.html
Using lazy_static was – intentionally – introducing a memory leak, but the
LeakSanitizer detected this and raised an error.
Now by using thread_local we are calling the destructors and so – while still being a
memory leak in practice – the LeakSanitizer no longer detects this behaviour as an error.
Alternatively we could have used a known-leaks list with the leak-sanitizer, but this would have increased the complexity of the build setup.
Finally, this was likely triggered with the migration to memsec, because libsodium circumvents the malloc/free calls,
relying on direct calls to MMAP.
- Use a new nomenclature for these functions based on the idea of a hash
domain (as in domain separation); this makes much more sence
- Remove the ciphers::hash export; we did not even export a hash
function in the purest sence of the word. This gets us around the
difficulty of figuring out what we should call the underlying
primitive
This finishes the last step of removing sodium.rs from the rosenpass crate
itself and also removes the NOTHING and NONCE0 constants.
Hashing functions now use destination parameters;
rosenpass_constant_time::xor now does too.
These targets can be used with rust nightly and cargo-fuzz to fuzz
several bits of Rosenpass's API. Fuzzing is an automated way of
exploring code paths that may not be hit in unit tests or normal
operation. For example the `handle_msg` target exposed the DoS condition
fixed in 0.2.1.
The other targets focus on the FFI with libsodium and liboqs.
Co-authored-by: Karolin Varner <karo@cupdev.net>
This commit ensures that the call to `StaticKEM::keygen` has a stack of
8MiB.
Especially on Darwin system, this commit is necessary in order to
prevent a stack overflow, as this system only provides stack sizes of
roughly 500KB which is way to small for a Classic McEliece key.
Fixes#118
- adds TOML based configuation files
- with example configuratios in config-examples
- reimplments arcane CLI argument parser as automaton
- adds a new CLI focused arround configuration files
- moves all file utility stuff from `main.rs` to `util.rs`
- moves all AppServer stuff to dedicated `app_server.rs`
- add mio for multi-listen-socket support (should fix#27)
- consistency: rename private to secret
Initial implementation of the Rosenpass tool, implemented by @koraa.
Includes contributions and some lints from @wucke13.
Co-authored-by: wucke13 <wucke13@gmail.com>