Re:OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-1...
by brianpane on Friday November 20, 2026 @01:58AM
(#50571079)
There’s already a Rust TLS library, rustls, that’s relatively mature (10 years in development, a couple of paid maintainers, robust development and release processes). It’s not a drop-in replacement for OpenSSL, though. There’s a companion project to build an OpenSSL-compatible wrapper API for it, but that’s not as far along. Interestingly, while rustls has a plug-in API that lets you choose your favorite Rust encryption library for the low-level operations (aws-lc-rs, Ring, Graviola, etc), those libraries all tend to contain a lot of assembly … not just for speed, but because it’s easier to avoid side channel timing vulnerabilities in assembly.
[ Parent
| on HN ]
Re:OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-1...
by dralley on Friday November 20, 2026 @02:39AM
(#50571386)
The side channels issue is where rust crypto libraries are currently the weakest
Re:OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-1...
by zelphirkalt on Friday November 20, 2026 @02:46AM
(#50571430)
Can you explain why it is easier to avoid side-channel timing attacks in assembly?
Re:OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-1...
by tecleandor on Friday November 20, 2026 @02:58AM
(#50571516)
I guess it's easier to control the timing of your operations if you write them directly in assembly. Otherwise, the compiler optimizations could change the code in unexpected ways.
Re:OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-1...
by jbarberu on Friday November 20, 2026 @02:58AM
(#50571518)
Compilers like to make code go brrr as much as they can. With crypto you want the code to run at a deterministic speed (execution time), regardless of input. With hand written assembly you can (more easily) make sure you have the same cycle count regardless of what the input is.
Re:OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-1...
by HappMacDonald on Friday November 20, 2026 @02:59AM
(#50571524)
At a guess, because it is easier to control timing in assembly than in a higher level language that will compile your source code into whatever shape it feels like
Re:OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-1...
by cowlevel on Friday November 20, 2026 @08:11AM
(#50574197)
It's still impossible to control actual timing, but easy to ensure control flow isn't data-dependent, which is what you need. Classic example is memcmp. Although you can write the or-then-check-zero memcmp in any high level language and it's very unlikely to compile to data-dependent timing unless your compiler is AGI.
Re:OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-1...
by cesarb on Friday November 20, 2026 @09:41AM
(#50575287)
> Although you can write the or-then-check-zero memcmp in any high level language and it's very unlikely to compile to data-dependent timing unless your compiler is AGI.
No need for "AGI", the compiler just needs to have enough value tracking to know that the value saturates (once a bit is set, it never gets unset), and an heuristic to move the comparison inside the loop when it might allow it to do less loop iterations.
(I wrote a Rust crate to do precisely that kind of "constant time memcmp", and the only truly reliable way to do so without help of the compiler, is by using inline assembly as a "black box" to make a few things invisible to the compiler's optimizer. It was inspired by code in the Linux kernel which did the same thing also using inline assembly as a "black box".)