No Description

Karolin Varner 5c909b4ab9 chore(deps): bump actions/checkout from 4 to 5 (#693) 3 weeks ago
.ci 8bad02bcda feat: Disallow unknown fields in rosenpass and rp configuration 2 months ago
.devcontainer c2d0d34c57 Add .devcontainer configuration (#267) 1 year ago
.github 6b7f620566 chore(deps): bump actions/checkout from 4 to 5 3 weeks ago
analysis 5f8b00d045 chore: Rollback symbolic models to original state 1 year ago
cipher-traits a1698f36a6 fix(rp): Start the proper rosenpass server on a dedicated thread 1 month ago
ciphers b1a7d94295 feat: Support for custom osk (output key) domain separators in Rosenpass app 2 months ago
config-examples b99d072879 major rewrite of application server & frontend 2 years ago
constant-time d496490916 fix: set crate MSRVs to a precise version 4 months ago
doc 3f9926e353 feat(cli): Automatically generate man page 10 months ago
docker 09f1353dcc feat(docker): rename .docker to docker 6 months ago
fuzz d496490916 fix: set crate MSRVs to a precise version 4 months ago
manual_tests 258efe408c fix: PSK broker integration did not work 1 year ago
marzipan 2a917de6d8 add marzipan, a dialect of proverif 2 years ago
misc d0a6e99a1f feat: Regression CI based on misc/generate_configs.py 1 year ago
oqs d496490916 fix: set crate MSRVs to a precise version 4 months ago
papers b1a7d94295 feat: Support for custom osk (output key) domain separators in Rosenpass app 2 months ago
pkgs 48b7bb2f14 feat(whitepaper): Introduce protocol extensions & specify WG integration as one 2 months ago
rosenpass 8e7fd174e8 nix fmt 1 month ago
rp 72e6542958 fix: Compiling rp should be disabled on mac 1 month ago
secret-memory 335584b187 fix: clippy fix (remove warnings) 1 month ago
supply-chain 3e33e8ffa1 Regenerate cargo vet exemptions 1 month ago
systemd 6048ebd3d9 rp systemd unit file: introduce and test 9 months ago
tests 22b980a61f chore: format everything 4 months ago
to d496490916 fix: set crate MSRVs to a precise version 4 months ago
util 7908359eab Use serde for JSON-encoding benchmark data 1 month ago
wireguard-broker d496490916 fix: set crate MSRVs to a precise version 4 months ago
.dockerignore b5f6d07650 feat(docker): add .docker/Dockerfile, .docker/README.md and workflow building and publishing docker images 6 months ago
.envrc 2935c0a9f6 add nix flake based development environment 2 years ago
.gitignore 7ac0883970 Generate and test .deb package for Debian and Ubuntu 7 months ago
.gitlab-ci.yml 1c1e38e2f7 add .gitlab-ci.yml 2 years ago
.mailmap cc5877dd83 meta: Use my new name 1 year ago
.prettierignore d9f8fa0092 refactor(flake.nix): externalize pkgs, add overlay 11 months ago
CONTRIBUTING.md b18f05ae19 feat(doc): How to format rust code 9 months ago
Cargo.lock 5b8760cb46 chore(deps): bump libfuzzer-sys from 0.4.9 to 0.4.10 1 month ago
Cargo.toml 83ad7652bc chore(deps): bump anyhow from 1.0.96 to 1.0.98 1 month ago
LICENSE-APACHE 4e72c52ca0 add Rosenpass, the tool 2 years ago
LICENSE-MIT 4e72c52ca0 add Rosenpass, the tool 2 years ago
analyze.sh 137cd5e85a add proverif analysis of Rosenpass, the protocol 2 years ago
coverage_report.sh 184603aa2c chore: Add a missing cleanup step to the coverage script 8 months ago
deny.toml 22b980a61f chore: format everything 4 months ago
flake.lock 3ea1a824cc feat: add rosenpass MSRV check 4 months ago
flake.nix 77b50b70b1 address feedback 2 months ago
format_rust_code.sh eb76179dc4 feat: add format_rustcode.sh script 1 year ago
overlay.nix 22b980a61f chore: format everything 4 months ago
readme.md 91707cc430 Address feedback 2 months ago
rust-toolchain.toml f6971aa5ad feat: Set rust-toolchain file to use 1.77.0 4 months ago
supply-chain-CI.md 3c744c253b fix(CI+dependabot): add instructions on how to set up a repository to work with the supply-chain+dependabot accomodations 1 month ago
supply-chain-protection.md 27650e95a7 doc(ci): add documentation for supply chain protection 7 months ago
treefmt.nix 22b980a61f chore: format everything 4 months ago

readme.md

Rosenpass README

Nix QC crates.io Libraries.io dependency status for latest release

This repository contains

  1. A description of the Rosenpass protocol
  2. The reference implementation of the protocol – the rosenpass tool
  3. A frontend integrating Rosenpass and WireGuard to create a vpn – the rp frontend
  4. Security analysis of the protocol using proverif

Getting started

First, install rosenpass. Then, check out the help functions of rp & rosenpass:

rp help
rosenpass help

Follow quick start instructions to get a VPN up and running.

Contributing

Contributions are generally welcome. Join our Matrix Chat if you are looking for guidance on how to contribute or for people to collaborate with.

We also have a – as of now, very minimal – contributors guide.

Software architecture

The rosenpass tool is written in Rust and uses liboqs^liboqs. The tool establishes a symmetric key and provides it to WireGuard. Since it supplies WireGuard with key through the PSK feature using Rosenpass+WireGuard is cryptographically no less secure than using WireGuard on its own ("hybrid security"). Rosenpass refreshes the symmetric key every two minutes.

As with any application a small risk of critical security issues (such as buffer overflows, remote code execution) exists; the Rosenpass application is written in the Rust programming language which is much less prone to such issues. Rosenpass can also write keys to files instead of supplying them to WireGuard With a bit of scripting the stand alone mode of the implementation can be used to run the application in a Container, VM or on another host. This mode can also be used to integrate tools other than WireGuard with Rosenpass.

The rp tool written in Rust makes it easy to create a VPN using WireGuard and Rosenpass.

rp is easy to get started with but has a few drawbacks; it runs as root, demanding access to both WireGuard and Rosenpass private keys, takes control of the interface and works with exactly one interface. If you do not feel confident about running Rosenpass as root, you should use the stand-alone mode to create a more secure setup using containers, jails, or virtual machines.

Networking & ports

rp allocates two UDP ports; if port N is specified for rosenpass, it will allocate port N+1 for WireGuard.

Like WireGuard, Rosenpass does not enforce any separation between clients and servers. If you do not specify the listen option, Rosenpass and WireGuard will choose random ports; this is client mode. If you do not specify endpoint, Rosenpass will not try to connect to the peer and instead wait for connections from peers. This is server mode. You may specify both. Leaving out both is not forbidden but also not very useful.

Security analysis

We are working on a cryptographic proof of security, but we already provide a symbolic analysis using proverif as part of the software package. You can run the security analysis using the nix package manager which handles installing the dependencies or you can call the ./analyze.sh script directly. In this case, you need to ensure that proverif, graphviz, awk, and cpp are installed on your system.

   (nix) $ nix build .#proof-proverif --print-build-logs
(manual) $ ./analyze.sh

The analysis is implemented according to modern software engineering principles: Using the C preprocessor, we where able to split the analysis into multiple files and uses some meta programming to avoid repetition. The code uses a variety of optimizations to speed up analysis such as using secret functions to model trusted/malicious setup. We split the model into two separate entry points which can be analyzed in parallel. Each is much faster than both models combined. A wrapper script provides instant feedback about which queries execute as expected in color: A red cross if a query fails and a green check if it succeeds.

Getting Rosenpass

Documentation and installation guides can be found at the Rosenpass website.

Rosenpass is packaged for more and more distributions, maybe also for the distribution of your choice?

Packaging status

Docker Images

Rosenpass is also available as prebuilt Docker images:

For details on how to use these images, refer to the Docker usage guide.

Benchmarks

This repository contains facilities for benchmarking both the Rosenpass protocol code and the implementations of the cryptographic primitives used by it. The primitives are benchmarked using criterion. For the protocol code benchmarks we use a library for instrumenting the code such that events are written to a trace, which is then inspected after a run.

Benchmarks are automatically run on CI. The measurements are visualized in the Benchmark Dashboard.

Primitive Benchmarks

There are benchmarks for the functions of the traits Kem, Aead and KeyedHash. They are run for all implementations in the primitives benchmark of rosenpass-ciphers. Run the benchmarks and view their results using

cargo bench -p rosenpass-ciphers --bench primitives -F bench

Note that the bench feature enables the inclusion of the libcrux-backed trait implementations in the module tree, but does not enable them as default.

Protocol Benchmarks

The trace that is being written to lives in a new module trace_bench in the util crate. A basic benchmark that performs some minor statistical analysis of the trace can be run using

cargo bench -p rosenpass --bench trace_handshake -F trace_bench

This runs the benchmarks and prints the results in machine-readable JSON.


Mirrors

Don't want to use GitHub or only have an IPv6 connection? Rosenpass has set up two mirrors for this:

Supported by

Funded through NLNet with financial support for the European Commission's NGI Assure program.