Podcast
Root Causes 312: Why You Shouldn't Roll Your Own Crypto


Hosted by
Tim Callan
Chief Compliance Officer
Jason Soroko
Fellow
Original broadcast date
June 20, 2023
Don't roll your own crypto. In this episode we describe the findings from 2021 research that investigating the root causes of problems in cryptographic systems. The results may surprise you.
Podcast Transcript
Lightly edited for flow and brevity.
And, basically, what these researchers did is research the nature of vulnerabilities in cryptographic systems. They went to a set of commonly available, commonly used crypto systems. There’s a list here. Cryptographic libraries - OpenSSL, GnuTLS, Mozilla NSS, WolfSSL, Botan, Libgcrypt, LibreSSL and BoringSSL. They took this set of cryptographic libraries, and they needed a common database of vulnerabilities, and so what they wound up with was the common vulnerabilities and exposure CVE list that goes through lists for libraries and what they wanted to do. That’s from the National Vulnerability Database in particular. They took the CVE list from the National Vulnerability Database and analyzed these vulnerabilities by their nature. What is the nature of these vulnerabilities inside these cryptographic libraries?
I think you know what this paper says, Jay, because you sent it my way originally but try to channel the common person. What do you think the average informed IT person would imagine would be the main source of vulnerabilities and problems with cryptographic libraries?
I have a breakdown here of the different types: Cryptographic issues are 25.8%, memory buffer issues 19.4%, resource management errors 17.7%, exposure of sensitive information 11.3%, improper input validation (of all things) 11.3%, numeric errors (hmm, I wonder what that means) 5.3%, and then other is a 9.2%. So, you know, a small number of things dominate but the memory error issues are actually worse on the whole than the actual cryptographic issues even in these complicated, very esoteric, cryptographic systems.
Now, I’m gonna show you one other thing which is – and I just found this interesting – it’s the exploitable lifetime. This is Table 3 of this paper. Exploitable lifetimes in years of vulnerabilities in cryptographic libraries. So, they include three. They use OpenSSL, GnuTLS and Mozilla NCSS, and that was all they could get data for. They’ve got a bunch of columns. They got two columns I’m gonna focus on – median lifetime and average lifetime, because we know average and median of course are not the same. OpenSSL – this is median lifetime of an exploitable vulnerability in years. Should I make you guess or should I just tell you?

