Python's `str.__repr__()`
-Sometimes software is written using whatever built-ins you find in your programming language of choice. +
Sometimes software is written using whatever built-ins you find in your programming language of choice. This is usually great! However, it can happen that you depend on the precise semantics of those built-ins. This can be a problem if those semantics become important to your software and you need to port it to another programming language. diff --git a/articles/2024-08-21-OpenVPN-and-MirageVPN.html b/articles/2024-08-21-OpenVPN-and-MirageVPN.html index b80adca..0683731 100644 --- a/articles/2024-08-21-OpenVPN-and-MirageVPN.html +++ b/articles/2024-08-21-OpenVPN-and-MirageVPN.html @@ -5,13 +5,13 @@
MirageVPN and OpenVPN
-At Robur we have been busy at work implementing our OpenVPN™-compatible MirageVPN software. -Recently we have implemented the server side. +
At Robur we have been busy at work implementing our OpenVPN™-compatible MirageVPN software. +Recently we have implemented the server side. In order to implement this side of the protocol I studied parts of the OpenVPN™ source code and performed experiments to understand what the implementation does at the protocol level. Studying the OpenVPN™ implementation has lead me to discover two security issues: CVE-2024-28882 and CVE-2024-5594. In this article I will talk about the relevant parts of the protocol, and describe the security issues in detail.
diff --git a/articles/arguments.html b/articles/arguments.html index e7a9023..b1ed2f9 100644 --- a/articles/arguments.html +++ b/articles/arguments.html @@ -5,13 +5,13 @@Runtime arguments in MirageOS
-TL;DR: Passing runtime arguments around is tricky, and prone to change every other month.
+TL;DR: Passing runtime arguments around is tricky, and prone to change every other month.
Motivation
Sometimes, as an unikernel developer and also as operator, it's nice to have some runtime arguments passed to an unikernel. Now, if you're into OCaml, diff --git a/articles/dnsvizor01.html b/articles/dnsvizor01.html index fbc488f..a5cdafe 100644 --- a/articles/dnsvizor01.html +++ b/articles/dnsvizor01.html @@ -5,13 +5,13 @@
Meet DNSvizor: run your own DHCP and DNS MirageOS unikernel
-TL;DR: We got NGI0 Entrust (via NLnet) funding for developing +
TL;DR: We got NGI0 Entrust (via NLnet) funding for developing DNSvizor - a DNS resolver and DHCP server. Please help us by sharing with us your dnsmasq configuration, so we can diff --git a/articles/finances.html b/articles/finances.html index 6fd86aa..6f75ade 100644 --- a/articles/finances.html +++ b/articles/finances.html @@ -5,13 +5,13 @@
How has robur financially been doing since 2018?
-Since the beginning, robur has been working on MirageOS unikernels and getting +
Since the beginning, robur has been working on MirageOS unikernels and getting them deployed. Due to our experience in hierarchical companies, we wanted to create something different - a workplace without bosses and management. Instead, we are a collective where everybody has a say on what we do, and who gets how diff --git a/articles/gptar.html b/articles/gptar.html index e7cad44..aeba524 100644 --- a/articles/gptar.html +++ b/articles/gptar.html @@ -5,13 +5,13 @@
GPTar
-At Robur we developed a piece of software for mirroring or exposing an opam repository. +
At Robur we developed a piece of software for mirroring or exposing an opam repository. We have it deployed at opam.robur.coop, and you can use it as an alternative to opam.ocaml.org. It is usually more up-to-date with the git opam-repository than opam.ocaml.org although in the past it suffered from occasional availability issues. I can recommend reading Hannes' post about opam-mirror. diff --git a/articles/lwt_pause.html b/articles/lwt_pause.html index 0306e51..f9fe6b3 100644 --- a/articles/lwt_pause.html +++ b/articles/lwt_pause.html @@ -5,13 +5,13 @@
Cooperation and Lwt.pause
-Here's a concrete example of the notion of availability and the scheduler used +
Here's a concrete example of the notion of availability and the scheduler used
(in this case Lwt). As you may know, at Robur we have developed a unikernel:
opam-mirror. It launches an HTTP service that can be used as an
OPAM overlay available from a Git repository (with opam repository add <name> <url>
).
MirageVPN updated (AEAD, NCP)
-Updating MirageVPN
-As announced earlier this month, we've been working hard over the last months on MirageVPN (initially developed in 2019, targeting OpenVPN™ 2.4.7, now 2.6.6). We managed to receive funding from NGI Assure call (via NLnet). We've made over 250 commits with more than 10k lines added, and 18k lines removed. We closed nearly all old issues, and opened 100 fresh ones, of which we already closed more than half of them. :D
+Updating MirageVPN
+As announced earlier this month, we've been working hard over the last months on MirageVPN (initially developed in 2019, targeting OpenVPN™ 2.4.7, now 2.6.6). We managed to receive funding from NGI Assure call (via NLnet). We've made over 250 commits with more than 10k lines added, and 18k lines removed. We closed nearly all old issues, and opened 100 fresh ones, of which we already closed more than half of them. :D
Actual bugs fixed (that were leading to non-working MirageVPN applications)
In more detail, we had a specific configuration running over all the years, namely UDP mode with static keys (no TLS handshake, etc.). There were several issues (bitrot) that we encountered and solved along the path, amongst others:
-
@@ -35,7 +35,7 @@
To avoid any future breakage while revising the code (cleaning it up, extending it), we are now building several unikernels as part of our CI system. We also have setup OpenVPN™ servers with various configurations that we periodically test with our new code (we'll also work on further automation thereof).
New features: AEAD ciphers, supporting more configuration primitives
-We added various configuration primitives, amongst them configuratble tls ciphersuites, minimal and maximal tls version to use, tls-crypt-v2, verify-x509-name, cipher, remote-random, ...
+We added various configuration primitives, amongst them configuratble tls ciphersuites, minimal and maximal tls version to use, tls-crypt-v2, verify-x509-name, cipher, remote-random, ...
From a cryptographic point of view, we are now supporting more authentication hashes via the configuration directive auth
, namely the SHA2 family - previously, only SHA1 was supported, AEAD ciphers (AES-128-GCM, AES-256-GCM, CHACHA20-POLY1305) - previously only AES-256-CBC was supported.
NCP - Negotiation of cryptographic parameters
OpenVPN™ has a way to negotiate cryptographic parameters, instead of hardcoding them in the configuration. The client can propose its supported ciphers, and other features (MTU, directly request a push message for IP configuration, use TLS exporter secret instead of the hand-crafted (TLS 1.0 based PRF), ...) once the TLS handshake has been completed.
diff --git a/articles/miragevpn-performance.html b/articles/miragevpn-performance.html index b6160f8..591b8f9 100644 --- a/articles/miragevpn-performance.html +++ b/articles/miragevpn-performance.html @@ -5,13 +5,13 @@Speeding up MirageVPN and use it in the wild
-As we were busy continuing to work on MirageVPN, we got in touch with eduVPN, who are interested about deploying MirageVPN. We got example configuration from their side, and fixed some issues, and also implemented tls-crypt - which was straightforward since we earlier spend time to implement tls-crypt-v2.
+As we were busy continuing to work on MirageVPN, we got in touch with eduVPN, who are interested about deploying MirageVPN. We got example configuration from their side, and fixed some issues, and also implemented tls-crypt - which was straightforward since we earlier spend time to implement tls-crypt-v2.
In January, they gave MirageVPN another try, and measured the performance -- which was very poor -- MirageVPN (run as a Unix binary) provided a bandwith of 9.3Mb/s, while OpenVPN provided a bandwidth of 360Mb/s (using a VPN tunnel over TCP).
We aim at spending less resources for computing, thus the result was not satisfying for us. We re-read a lot of code, refactored a lot, and are now at ~250Mb/s.
Tooling for performance engineering of OCaml
@@ -40,7 +40,7 @@ To better guide the performance engineering, we also developed discussing it in the OCaml community, and are eager to find a solution to avoid unneeded computations.Conclusion
-To conclude: we already achieved a factor of 25 in performance by adapting the code in various ways. We have ideas to improve the performance even more in the future - we also work on using OCaml string and bytes, instead of off-the-OCaml-heap-allocated bigarrays (see our previous article, which provided some speedups).
+To conclude: we already achieved a factor of 25 in performance by adapting the code in various ways. We have ideas to improve the performance even more in the future - we also work on using OCaml string and bytes, instead of off-the-OCaml-heap-allocated bigarrays (see our previous article, which provided some speedups).
Don't hesitate to reach out to us on GitHub, or by mail if you're stuck.
We want to thank NLnet for their funding (via NGI assure), and eduVPN for their interest.
-
diff --git a/articles/miragevpn-server.html b/articles/miragevpn-server.html
index 4a96fd1..2e1250a 100644
--- a/articles/miragevpn-server.html
+++ b/articles/miragevpn-server.html
@@ -5,13 +5,13 @@
-
-
Testing MirageVPN against OpenVPN™ - https://blog.robur.coop/articles/miragevpn-testing.html -- https://blog.robur.coop/articles/miragevpn-testing.html -Wed, 26 Jun 2024 00:00:00 GMT - -
qubes-miragevpn, a MirageVPN client for QubesOS https://blog.robur.coop/articles/qubes-miragevpn.html diff --git a/index.html b/index.html index 3ef27f6..fa0ae79 100644 --- a/index.html +++ b/index.html @@ -5,13 +5,13 @@- Robur's blog - Index + Robur's blogIndex - - - - + + + +@@ -20,7 +20,7 @@ The Robur cooperative blog. -RSS The Robur blog.
+RSS The Robur blog.
Essays and ramblings
@@ -31,10 +31,10 @@2024-10-25 - Meet DNSvizor: run your own DHCP and DNS MirageOS unikernel
+ Meet DNSvizor: run your own DHCP and DNS MirageOS unikernel
The NGI-funded DNSvizor provides core network services on your network; DNS resolution and DHCP.
-+- @@ -44,10 +44,10 @@
2024-10-22 - Runtime arguments in MirageOS
+ Runtime arguments in MirageOS
The history of runtime arguments to a MirageOS unikernel
-+- @@ -57,10 +57,10 @@
2024-10-21 - How has robur financially been doing since 2018?
+ How has robur financially been doing since 2018?
How we organise as a collective, and why we're doing that.
-+- @@ -70,10 +70,10 @@
2024-08-21 - MirageVPN and OpenVPN
+ MirageVPN and OpenVPN
Discoveries made implementing MirageVPN, a OpenVPN-compatible VPN library
-+- @@ -83,23 +83,10 @@
2024-08-15 - The new Tar release, a retrospective-
+ The new Tar release, a retrospective
A little retrospective to the new Tar release and changes
-- -- -
- - --- 2024-06-26 - Testing MirageVPN against OpenVPN™
-Some notes about how we test MirageVPN against OpenVPN™
--+- @@ -109,10 +96,10 @@
2024-06-24 - qubes-miragevpn, a MirageVPN client for QubesOS
+ qubes-miragevpn, a MirageVPN client for QubesOS
A new OpenVPN client for QubesOS
-+- @@ -122,10 +109,10 @@
- @@ -135,10 +122,10 @@
2024-04-16 - Speeding up MirageVPN and use it in the wild
+ Speeding up MirageVPN and use it in the wild
Performance engineering of MirageVPN, speeding it up by a factor of 25.
-+- @@ -148,10 +135,10 @@
- @@ -161,10 +148,10 @@
2024-02-13 - Speeding elliptic curve cryptography
+ Speeding elliptic curve cryptography
How we improved the performance of elliptic curves by only modifying the underlying byte array
-+- @@ -174,10 +161,10 @@
2024-02-11 - Cooperation and Lwt.pause
+ Cooperation and Lwt.pause
A disgression about Lwt and Miou
-+- @@ -187,10 +174,10 @@
2024-02-03 - Python's `str.__repr__()`
+ Python's `str.__repr__()`
Reimplementing Python string escaping in OCaml
-+- @@ -200,10 +187,10 @@
2023-11-20 - MirageVPN updated (AEAD, NCP)
+ MirageVPN updated (AEAD, NCP)
How we resurrected MirageVPN from its bitrot state
-+- @@ -213,10 +200,10 @@
2023-11-14 - MirageVPN & tls-crypt-v2
+ MirageVPN & tls-crypt-v2
How we implementated tls-crypt-v2 for miragevpn
-+ - @@ -44,10 +44,10 @@
MirageVPN server
-It is a great pleasure to finally announce that we have finished a server implementation for MirageVPN (OpenVPN™-compatible). This allows to setup a very robust VPN network on both the client and the server side.
-As announced last year, MirageVPN is a reimplemtation of OpenVPN™ in OCaml, with MirageOS unikernels.
+It is a great pleasure to finally announce that we have finished a server implementation for MirageVPN (OpenVPN™-compatible). This allows to setup a very robust VPN network on both the client and the server side.
+As announced last year, MirageVPN is a reimplemtation of OpenVPN™ in OCaml, with MirageOS unikernels.
Why a MirageVPN server?
Providing Internet services with programming languages that have not much safety requires a lot of discipline by the developers to avoid issues which may lead to exploitable services that are attacked (and thus will circumvent any security goals). Especially services that are critical for security and privacy, it is crucial to avoid common memory safety pitfalls.
Some years back, when we worked on the client implementation, we also drafted a server implementation. The reasoning was that a lot of the code was already there, and just a few things needed to be developed to allow clients to connect there.
diff --git a/articles/miragevpn.html b/articles/miragevpn.html index 7486adb..bb531fc 100644 --- a/articles/miragevpn.html +++ b/articles/miragevpn.html @@ -5,13 +5,13 @@MirageVPN & tls-crypt-v2
-In 2019 Robur started working on a OpenVPN™-compatible implementation in OCaml. +
In 2019 Robur started working on a OpenVPN™-compatible implementation in OCaml.
The project was funded for 6 months in 2019 by prototypefund.
In late 2022 we applied again for funding this time to the NGI Assure open call, and our application was eventually accepted.
In this blog post I will explain why reimplementing the OpenVPN™ protocol in OCaml is a worthwhile effort, and describe the Miragevpn implementation and in particular the tls-crypt-v2
mechanism.
qubes-miragevpn, a MirageVPN client for QubesOS
-We are pleased to announce the arrival of a new unikernel: +
We are pleased to announce the arrival of a new unikernel: qubes-miragevpn. The latter is the result of work begun several months ago on miragevpn.
Indeed, with the ambition of completing our unikernel suite and the success of diff --git a/articles/speeding-ec-string.html b/articles/speeding-ec-string.html index aadfb42..ae8552b 100644 --- a/articles/speeding-ec-string.html +++ b/articles/speeding-ec-string.html @@ -5,13 +5,13 @@
Speeding elliptic curve cryptography
-TL;DR: replacing cstruct with string, we gain a factor of 2.5 in performance.
+TL;DR: replacing cstruct with string, we gain a factor of 2.5 in performance.
Mirage-crypto-ec
In April 2021 We published our implementation of elliptic curve cryptography (as mirage-crypto-ec
opam package) - this is DSA and DH for NIST curves P224, P256, P384, and P521, and also Ed25519 (EdDSA) and X25519 (ECDH). We use fiat-crypto for the cryptographic primitives, which emits C code that by construction is correct (note: earlier we stated "free of timing side-channels", but this is a huge challenge, and as reported by Edwin Török likely impossible on current x86 hardware). More C code (such as point_add
, point_double
, and further 25519 computations including tables) have been taken from the BoringSSL code base. A lot of OCaml code originates from our TLS 1.3 work in 2018, where Etienne Millon, Nathan Rebours, and Clément Pascutto interfaced elliptic curves for OCaml (with the goal of being usable with MirageOS).
The goal of mirage-crypto-ec was: develop elliptic curve support for OCaml & MirageOS quickly - which didn't leave much time to focus on performance. As time goes by, our mileage varies, and we're keen to use fewer resources - and thus fewer CPU time and a smaller memory footprint is preferable.
diff --git a/articles/tar-release.html b/articles/tar-release.html index 511fe66..faf10bf 100644 --- a/articles/tar-release.html +++ b/articles/tar-release.html @@ -5,13 +5,13 @@The new Tar release, a retrospective
-We are delighted to announce the new release of ocaml-tar
. A small library for
+
We are delighted to announce the new release of ocaml-tar
. A small library for
reading and writing tar archives in OCaml. Since this is a major release, we'll
take the time in this article to explain the work that's been done by the
cooperative on this project.