VOOZH about

URL: https://thenewstack.io/rustls-looks-to-provide-a-memory-safe-replacement-for-openssl/

⇱ Rustls Looks to Provide a Memory-Safe Replacement for OpenSSL - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-04-23 07:47:02
Rustls Looks to Provide a Memory-Safe Replacement for OpenSSL
profile,
Open Source / Security

Rustls Looks to Provide a Memory-Safe Replacement for OpenSSL

The Internet Security Research Group (ISRG), with financial support from Google, has teamed up with the Rustls (pronounced "russels") transport layer security (TLS) project to implement a number of changes to the open source project in hopes of offering a replacement for OpenSSL as part of its Memory Safety Initiative.
Apr 23rd, 2021 7:47am by Mike Melanson
👁 Featued image for: Rustls Looks to Provide a Memory-Safe Replacement for OpenSSL
Feature image via Pixabay.

The Internet Security Research Group (ISRG), with financial support from Google, has teamed up with the Rustls (pronounced “russels”) transport layer security (TLS) project to implement a number of changes to the open source project in hopes of offering a replacement for OpenSSL as part of its Memory Safety Initiative.

OpenSSL, as with many systems-level applications, is written primarily in C, and a big part of the issue at hand is that languages such as C and C++ are not memory safe, which can lead to security vulnerabilities. In 2019, for example, Microsoft disclosed that nearly 70% of all security vulnerabilities in their products were a result of memory safety issues. In the case of OpenSSL, there have been many vulnerabilities due to memory safety issues; the Heartbleed bug is just one such infamous vulnerability. Rustls, by contrast, is written primarily in Rust, a memory-safe language, and ISRG’s efforts to improve Rustls aim to prepare the library for wider adoption.

“What’s new here is that we now have a language that gives us a memory-safe option at what I would call a systems level,” explained ISRG executive director Josh Aas. “Now we’re getting a chance to take a look at some of the lower-level systems code and think, ‘Alright, we can do this better. Now we have an option.’ Memory safe languages are typically significantly slower than C, so it used to be that if you even could write something in a memory safe language, you would often have to make a choice between safety and performance. With Rust, we don’t have to make that trade-off anymore. We can have safety and performance.”

Rust has been a popular choice of late for providing a memory-safe alternative to C, with the language finding itself being selected for numerous systems-level rewrites. In recent times, Google has announced the adoption of Rust in Android, the language has tip-toed into being used in the Linux Kernel, and Microsoft has explored its use for rewriting parts of Windows. On the point of performance, specifically, recent benchmarks comparing Rustls with OpenSSL actually found that Rustls outperformed its counterpart with better connection speeds and a smaller memory footprint.

The ISRG’s Memory Safety Initiative aims to identify code that is critical to the internet but written in languages that are not memory safe, and then to transition that code to memory-safe languages to get rid of entire classes of security vulnerabilities. Aas explained that Rust is an ideal candidate for replacing C not only because of its performance, but also because the language lacks a runtime, unlike many other memory-safe languages, and allows you to rewrite programs written in C incrementally. Unfortunately, Aas said, OpenSSL won’t be able to be rewritten, so instead they are working to prepare Rustls to replace it entirely. Already, ISRG has replaced OpenSSL with Rustls in the Apache HTTP Server and Curl, and now the organization is working to further that movement.

“Another big issue is that the API that’s used with OpenSSL is very complicated, so people using open SSL tend to make mistakes in their implementation because of how confusing and complicated the OpenSSL API is,” said Aas. “Rustls has a much safer and easier-to-understand API, so we’re really getting to two things out of this transition here. We’re getting the memory safety that comes with Rustls and we’re getting the safer API.”

Specifically, ISRG and Google are contracting Rustls contributor Dirkjan Ochtman to make several improvements to the project, such as improving “the C API so that Rustls can even more easily be integrated into existing C-based applications” and enforcing “a no-panic policy to eliminate the potential for undefined behavior when Rustls is used across the C language boundary.” The ISRG’s work with replacing OpenSSL in the Apache HTTP Server took a similar path, with Google-provided funding being used to hire an httpd committer to perform the necessary updates.

“The C programming language is 50 years old, which is crazy to think about, so it’s time we start moving past it. There’s 50 years worth of C code, though, that we have to interoperate with throughout that process, otherwise, we’re never going to get there. So working incrementally is going to be key,” said Dan Lorenc, a security software engineer at Google. “Working with existing maintainers, wherever we can, is by far the most effective and best way to do it. Maintainers of open source projects like this are underpaid, under-supported from the start, and so huge companies that are relying on them just making demands isn’t really a good strategy. We like to support them to make these improvements wherever we can, rather than just asking for free work or rather than rewriting things ourselves. It’s way better to work with the community where we can.”

Aas said that they would like to see Rustls continue to replace OpenSSL and other unsafe TLS libraries, and that with each integration they learn something that makes the next one easier.

“Anywhere you can use OpenSSL, which is everywhere these days, from cars to cloud services to home web servers and appliances, you should be able to use Rustls over time,” said Aas, “so it’s a big deal that will affect a lot of people.”

TRENDING STORIES
Mike is a freelance writer, editor, and all-around techie wordsmith. Mike has written for publications such as ReadWriteWeb, Venturebeat, and ProgrammableWeb. His first computer was a "portable" suitcase Compaq and he remembers 1200 baud quite clearly.
Read more from Mike Melanson
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.