Bulletproof TLS Newsletter #74
Rust and cryptographic code
25 Feb 2021
Author: Hanno Böck

This issue was distributed to 56,347 email subscribers.

Bulletproof TLS Newsletter is a free periodic newsletter bringing you commentary and news surrounding SSL/TLS and Internet PKI, designed to keep you informed about the latest developments in this space.

In this issue:

  1. Rust and cryptographic code
  2. Short news

Rust and cryptographic code

The Rust programming language is gaining more popularity, and it increasingly affects cryptographic code as well. Rust’s main selling point is that the language provides many memory safety guarantees, making bugs like buffer overflows and use after free errors much less likely to happen (they can still happen in code specifically marked as “unsafe”).

Daniel Stenberg, the main developer of the curl HTTP library, recently announced support for a new curl TLS backend using rustls. Rustls itself is, as the name implies, a TLS library written in Rust. Curl is also working on adding a new backend based on Hyper, an HTTP library written in Rust.

Also recently, the ISRG (Internet Security Research Group) announced that it will support a Rust-based TLS module for the Apache web server, with funding coming from Google. This is part of a larger effort by Google and the Open Source Security Foundation to fund ports of critical pieces of open-source software into memory-safe languages.

Another project’s move to Rust, the cryptography package for Python, recently led to some hefty discussions as it means that some older platforms that lack a Rust compiler will no longer be supported. The cryptography project started reimplementing parts of its ASN1 parsing code in Rust. ASN1 parsers have often been affected by memory-safety vulnerabilities in the past.

With Rust getting more popular, this will also lead to more cryptographic and TLS code getting rewrites in Rust. Given that one of the most well-known TLS vulnerabilities of all time, the OpenSSL Heartbleed bug, was a memory-safety violation, this is not a surprising development.

Short news