Commit Graph

68 Commits

Author SHA1 Message Date
wucke13 49be83847b feat: add preliminary miri support
- Adds a devShell with Miri
- Marks some of the tests which Miri cannot execute as ignored for Miri

Signed-off-by: wucke13 <wucke13+github@gmail.com>
2025-09-05 16:22:02 +02:00
Karolin Varner 72e6542958 fix: Compiling rp should be disabled on mac 2025-08-07 12:45:02 +02:00
Karolin Varner b5107c77d8 chore(rp): Docs fix 2025-08-04 08:44:15 +02:00
Karolin Varner 6f6fdef542 chore(rp): Rename crate rp -> rosenpass-rp 2025-08-04 08:44:15 +02:00
Karolin Varner c839126e29 chore(rp): Move remaining sync io in exchange() into spawn_blocking 2025-08-04 08:44:15 +02:00
Karolin Varner a1698f36a6 fix(rp): Start the proper rosenpass server on a dedicated thread
We should not block the tokio executor indefinetly.
2025-08-04 08:44:15 +02:00
Karolin Varner 2d6550da0f chore(rp): Simplify peer configuration code 2025-08-04 08:44:15 +02:00
Karolin Varner bae336d633 fix(rp): Make sure that the WG SK is erased ASAP 2025-08-04 08:44:15 +02:00
Karolin Varner 6c929f7ddc chore(rp): Simplify error handling in exchange() 2025-08-04 08:44:15 +02:00
Karolin Varner 41eb620751 chore(rp): Simplify code to setup Rosenpass AppServer 2025-08-04 08:44:15 +02:00
Karolin Varner 8561aaf137 chore(rp): Move functionality to set wg sk and port into function 2025-08-04 08:44:15 +02:00
Karolin Varner f0ee7a33c9 chore(rp): Make sure genetlink is cleaned up 2025-08-04 08:44:15 +02:00
Karolin Varner 1d4a70f863 fix(rp): Use async commands to set up ip addr
We don't want to block the tokio runtime.
2025-08-04 08:44:15 +02:00
Karolin Varner f4e8e4314b chore: Use RAII for erasing the WireGuard device in rp
This, for now, disables correct handling of program termination,
but not because the RAII does not work. Instead, we need to implement
a proper signal handling concept.

We also removed some teardown handlers which are not covered by RAII,
like removing the routes we set up. The reason for this is, that this
is going to be taken care of by removing the wireguard device anyway.
2025-08-04 08:44:15 +02:00
Karolin Varner 1b9be7519b chore: Unnecessary string clone in rp 2025-08-04 08:44:15 +02:00
Karolin Varner c689f8e78a feat(rp): Enable logging 2025-08-04 08:44:15 +02:00
Karolin Varner edcbf290fc chore: Use default error handler in rp main() 2025-08-04 08:44:15 +02:00
Karolin Varner a85f9b8e63 chore: Better error handling in link_create_and_up in rp 2025-08-03 15:15:14 +02:00
Karolin Varner 21ea526435 chore: Restructure imports in rosenpass_rp::exchange 2025-08-03 15:15:14 +02:00
Karolin Varner 35e956e340 fix: Simplify structure of rp::exchange
Before this commit, there was a submodule rp::exchange::netlink
and there where platform checks, printing error messages on systems
other than freebsd and linux.

Neither is really necessary. If the application won't compile on other
systems it won't work, and if it happens to work then why give users a
spurious error message.
2025-08-03 15:15:14 +02:00
Karolin Varner 3371d7f00f chore: Clippy fixes for rp crate 2025-08-03 15:15:14 +02:00
Karolin Varner b1a7d94295 feat: Support for custom osk (output key) domain separators in Rosenpass app
This allows for custom protocol extensions with custom domain
separators to be used without modifying the Rosenpass source code
2025-06-25 19:48:29 +02:00
Karolin Varner 8bad02bcda feat: Disallow unknown fields in rosenpass and rp configuration 2025-06-25 19:48:29 +02:00
Karolin Varner 4deee59e90 chore: Restructure imports in various places 2025-06-25 19:38:51 +02:00
Karolin Varner 9656fa7025 chore: Split basic types from protocol.rs into own file 2025-06-24 14:01:31 +02:00
wucke13 d496490916 fix: set crate MSRVs to a precise version
Before this change, the patch release was left open. This patch
pinpoints it exactly, down to the patch release.

Signed-off-by: wucke13 <wucke13+github@gmail.com>
2025-05-09 18:22:10 +02:00
Karolin Varner f22f4aad7d feat: Fix minimum supported cargo version to 1.77
This should ensure, that our Cargo.lock file stays at version 3
when using `cargo update` or dependabot.
2025-04-13 13:44:36 +02:00
Karolin Varner 54fc904c15 fix(rp): Protocol version field should be optional 2025-04-08 23:54:48 +02:00
David Niehues b21a95dbbd doc(rp+rosenpass+ciphers+cipher-traits): Apply cargo fmt formatting 2025-04-03 16:55:03 +02:00
David Niehues 944be10bd2 dev(rp): Adapt rp to include set a protocol version. 2025-04-03 16:55:03 +02:00
Jan Winkelmann (keks) 6494518460 add fine-grained features 2025-04-03 16:14:19 +02:00
Jan Winkelmann (keks) b84e0beae8 introduce traits for all the primitives and algorithms. A bit more cleanup. 2025-04-03 16:12:44 +02:00
Jan Winkelmann (keks) 949a3e4d23 Add &self receiver to KEM trait methods 2025-04-03 16:12:44 +02:00
Jan Winkelmann (keks) d61b137761 update KEM trait 2025-04-03 16:12:44 +02:00
Dimitris Apostolou fe60cea959 fix: avoid duplicate crates 2025-02-24 13:48:31 +02:00
Karolin Varner 4982e40084 chore: Smoketests for rp 2024-12-19 15:00:08 +01:00
David Niehues 8805ef7c38 style: Ensure inline comments start upper case and end with a dot, and fix some overlong lines. 2024-12-12 21:14:02 +01:00
David Niehues cca02dc8d1 add documentation for the rp crate 2024-12-12 21:14:02 +01:00
Karolin Varner 2d20ad6335 fix: CI issues under Darwin 2024-12-09 15:35:34 +01:00
Jacek Galowicz df3d1821c8 Fix build for mac 2024-12-09 15:35:34 +01:00
Jacek Galowicz cd7558594f rp: Add exchange-config command
This is similar to `rosenpass exchange`/`rosenpass exchange-config`.
It's however slightly different to the configuration file models the `rp
exchange` command line.
2024-12-09 15:35:34 +01:00
Jacek Galowicz 022cdc4ffa rp: set allowed-ips as routes
Prepare the rp app for a systemd unit file that sets up wireguard
connections.
2024-12-09 15:35:34 +01:00
Jacek Galowicz 06d4e289a5 rp: Add ip parameter to exchange command
Prepare the `rp` app for a systemd unit that sets up a wireguard connection.
2024-12-09 15:35:34 +01:00
Paul Spooren b0706354d3 chore: Format all Cargo.toml files
Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-10-01 11:22:45 +01:00
Karolin Varner d5a8c85abe chore(API): Specifying a keypair should be opt. at startup
…so we can specify it later using the API.
2024-08-16 08:34:07 +02:00
Karolin Varner 8d3c8790fe chore: Reorganize memfd secret policy
- Policy is now set in main.rs, not cli.rs.
- Feature is called experiment_memfd_secret, not enable_memfd_alloc

This also fixes the last remaining warnings.
2024-08-03 15:17:09 +02:00
Karolin Varner 19f7905bc9 Merge pull request #362 from rosenpass/dev/karo/libcrux_chacha20poly1305
feat: Experimental support for encryption using libcrux
2024-07-10 15:08:31 +02:00
Paul Spooren 79b634fadf drop unused import of WG_B64_LEN
This causes warnings

Signed-off-by: Paul Spooren <mail@aparcar.org>
2024-07-08 13:48:00 +02:00
Karolin Varner 99ac3c0902 feat: Experimental support for encryption using libcrux
Libcrux is a library for formally verified implementations of
cryptographic primitives. It uses multiple back ends; one of which is
libjade. A cryptographic library written in the jasmin assembly
language for high assurance cryptographic implementations.

To use compile with the experiment_libcrux feature enabled:

    cargo build --features experiment_libcrux
2024-07-03 21:46:40 +02:00
Katherine Watson 3286e49370 Replace &* incantations with .deref() 2024-06-17 20:49:40 -07:00