Commit Graph
254 Commits
Author SHA1 Message Date
wucke13 d5442ea99e WIP 2023-12-23 16:58:29 +01:00
wucke13 96bc5bfb2e feat: add first draft of DoS avoiding log
The concept is simple: Log messages are only emitted if the current log
level allows for it __and__ if the log message was caused by a trusted
party. The less trusted a party is, the less likely it is to cause
log messages. For example, error messages about broken input received
from an untrusted party are to be silently ignored, as to not allow
**anyone** to cause massive amounts of log messages.
2023-12-23 01:41:28 +01:00
wucke13andGitHub d84efa7422 Merge pull request #197 from guhitb/main
Add backwards compatibility for keygen command
2023-12-21 11:28:25 +01:00
userandWanja Zaeske 61ef5b92bb fix: add deprecated keygen command
This allows users to use the old keygen command, while being informed
about its deprecation.
2023-12-20 16:03:47 +01:00
wucke13andGitHub 184cff0e5e Merge pull request #196 from rosenpass/dev/fix-65
fix: remove OSFONTDIR var from whitepaper build
2023-12-03 14:01:25 +01:00
wucke13 9819148b6f fix: remove OSFONTDIR var from whitepaper build
Fixes #65. I checked with `pdffonts` that the whitepaper still has all fonts embedded.
2023-12-03 13:27:47 +01:00
Morgan HillandKarolin Varner 3a0ebd2cbc feat: Add fuzzing for libsodium allocator 2023-12-02 14:14:05 +01:00
Karolin VarnerandKarolin Varner 1eefb5f263 fix: Guaranteed results typo 2023-12-02 12:21:41 +01:00
Karolin VarnerandKarolin Varner d45e24e9b6 feat: Move lenses into library 2023-12-02 12:21:41 +01:00
Karolin VarnerandKarolin Varner 972e82b35f chore: Move kems out of rosenpass crate 2023-12-02 10:42:13 +01:00
Karolin VarnerandKarolin Varner 101c9bf4b3 feat: Add an internal library for guaranteed results
This is helpful for functions that have to return a result to
implement some interface but that do not actually need to return
a result value.
2023-12-02 10:42:13 +01:00
Marei (peiTeX)andKarolin Varner 955d57ea49 fix output of authorlist to support unlimited authors 2023-12-01 20:25:58 +01:00
Karolin VarnerandKarolin Varner 838f700a74 chore: Upgrade dependencies 2023-12-01 18:43:32 +01:00
Karolin VarnerandKarolin Varner 5448cdc565 feat: Use the rand crate for random values instead of sodium 2023-12-01 18:37:33 +01:00
Karolin VarnerandKarolin Varner 77cd8a9fd1 feat: Move prftree into ciphers crate
- 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
2023-12-01 18:36:46 +01:00
Karolin VarnerandKarolin Varner 0f89ab7976 chore: Shorten fuzzing runtime to make sure the CI finishes quickly 2023-12-01 18:30:16 +01:00
Karolin VarnerandKarolin Varner 70fa9bd6d7 feat: Wrap sodium_malloc as a custom allocator
This lets us get rid of quite a few unsafe blocks.
2023-12-01 18:29:53 +01:00
Karolin VarnerandKarolin Varner 85a61808de feat: Use the zeroize crate for zeroization 2023-12-01 18:11:05 +01:00
Karolin VarnerandKarolin Varner cf132bca11 chore: Move rest of coloring.rs into secret-memory crate
Also removes the StoreSecret trait from cli.rs as it was
redundant.
2023-12-01 18:11:05 +01:00
Karolin VarnerandKarolin Varner 7bda010a9b chore: Move Public and debug_crypto_array into secret-memory crate 2023-12-01 18:11:05 +01:00
Olaf PichlerandKarolin Varner 36089fd37f Added example for additional PSK 2023-12-01 15:44:42 +01:00
Olaf PichlerandKarolin Varner 31d43accd5 #172 removed exchange_command 2023-12-01 15:44:42 +01:00
Olaf PichlerandKarolin Varner 205c301012 Added indications that file paths are used 2023-12-01 15:44:42 +01:00
Olaf PichlerandKarolin Varner d014095469 Added indication that exchange_command is not used 2023-12-01 15:44:42 +01:00
Olaf PichlerandKarolin Varner 7cece82119 added WireGuard config example to gen-config 2023-12-01 15:44:42 +01:00
Ezhil ShanmughamandKarolin Varner 284ebb261f fix: enabled fuzzing 2023-12-01 11:43:37 +01:00
Jemilu MohammedandKarolin Varner ba224a2200 add default member
add shared dependencies to workspace dependencies

all package level dependencies now rely on workspace
2023-11-30 18:44:28 +01:00
Jemilu MohammedandKarolin Varner ca35e47d2a manage features in workspaces cargo.toml file 2023-11-30 18:44:28 +01:00
Jemilu MohammedandKarolin Varner 181154b470 move external dependencies to workspace level 2023-11-30 18:44:28 +01:00
Karolin VarnerandKarolin Varner cc8c13e121 chore: Remove lprf.rs (dead code) 2023-11-30 11:26:24 +01:00
Karolin VarnerandKarolin Varner 40861cc2ea fix: Nix flake failing due to rosenpass-to
README.md was missing; added it to the list of source files
2023-11-29 11:36:28 +01:00
Karolin VarnerandKarolin Varner 09aa0e027e chore: Move hashing functions into sodium/ciphers crate
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.
2023-11-29 11:36:28 +01:00
Morgan HillandKarolin Varner d44793e07f Remove unwrap from fuzz targets that return errors
When fuzzing we are interested in what happens inside the target function
not necessarily what it returns. Functions returning errors with bogus
input in generally desired behaviour.
2023-11-29 11:36:07 +01:00
Karolin VarnerandKarolin Varner d539be3142 feat: Rosenpass-to for nicely handling destination parameters 2023-11-26 11:18:47 +01:00
a49254a021 feat(fuzzing): Add initial set of fuzzing targets
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>
2023-11-26 11:05:19 +01:00
Karolin VarnerandKarolin Varner 86300ca936 chore: Use naming scheme without rosenpass- for crates 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner 3ddf736b60 chore: Move xchacha20 implementation out of rosenpass::sodium 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner c64e721c2f chore: Move chacha20 implementation out of rosenpass::sodium
Introduces a new crate for selected ciphers which references
a cipher implementation in the rosenpass-sodium crate.
2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner 4c51ead078 chore: Move libsodium's helper function into their own namespace 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner c5c34523f3 chore: Move libsodium's memzero, randombytes fns into rosenpass-sodium 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner 6553141637 chore: Move libsodium's increment into rosenpass-sodium crate 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner a3de526db8 chore: Move libsodium's compare into rosenpass-sodium crate 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner 5da0e4115e chore: Move memcmp into rosenpass-sodium crate 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner 99634d9702 chore: Move sodium init integration into rosenpass-sodium crate 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner 46156fcb29 fix: Setup cargo fmt to check the entire workspace 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner e50542193f chore: Move file utils into coloring or the util crate 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner 3db9755580 chore: move functional utils into utils library 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner 556dbd2600 chore: move time utils into util crate 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner 6cd42ebf50 chore: move max_usize into util crate 2023-11-26 10:38:24 +01:00
Karolin VarnerandKarolin Varner a220c11e67 chore: Move xor_into, copying and base64 utils into own crates 2023-11-26 10:38:24 +01:00