RSA: Step-by-Step
There are three amazing methods that protect you online more than virtually anything else: the Diffie Hellman (DH) method: the RSA encryption/signing method; and elliptic curve cryptography (ECC).
While elliptic curve cryptography (ECC) has generally taken over in areas of key exchange (ECDH) and in blockchain implementations (such as with ECDSA signatures), RSA is still alive and kicking in, and is still the most popular method for protecting encryption keys and in creating digital signatures.
But things are changing, and where Google, for example, uses ECC to define the public key for its YouTube.com site:
But, the intermediate signer uses RSA keys, and so the signature on the certificate is an RSA one:
So, let’s do a step-by-step approach to RSA encryption and decryption.
Generating keys
It was Ron Rivest who used Fermat’s Little Theorem to define the operation of the RSA method. For this, we first create two random prime numbers (p and…