Member-only story
RSA Key Analysis with wolfSSL
In 1978, the RSA method was released to the world, and for 45 years it has ruled supreme in defining the trust of the Internet, and most of the connections that we make to web sites are still secured mainly by RSA signatures. So, you can thank RSA for confirming that they Web site you are connecting to is a valid one. At the current time, though, RSA is under threat of being cracked by quantum computers, and where we have around a decade to migrate to quantum-robust methods. So let’s dive in, and see how RSA keys are actually created.
With RSA, we have the magic of public key cryptography, and where Bob can generate a key pair: a public key and a private key, and then send Alice his public key. If she wants to encrypt something for him, she encrypts it with his public key, and then the only key which can decrypt it is his private key. A truly wonderful concept, and it was Rivest, Shamir and Adleman who made it come alive with the RSA method.
In RSA, we start by generating two prime numbers (p,q) and then calculate the modulus (N) of N=pq. It is this modulus (N) that provides the core of the security of RSA, and it must be difficult to determine the prime numbers for a given modulus value. Our prime numbers must thus be of a size that makes it difficult to factorise, and they must be randomly generated. In this case, we will generate a DER version of the key, and…
