INVITATION TO CYBERSECURITY 166 RSA is elegant and simple to implement in software. Anybody can quickly generate a key pair on the privacy of their own computer (see Figure 7.11). Once they have a key pair, they can widely advertise one of the keys, the public key, and keep the other key, the private key, secret (see Figure 7.12). Files encrypted with the public key can only be decrypted with the private key. One physical space picture of this would be a lock with two keyholes for two different keys—one for locking and the other for unlocking. In cyberspace, plaintext messages are transformed into ciphertext by a mathematical operation parameterized by the public key. The private key is applied to the ciphertext in the same way, and since it is the public key’s inverse, it cancels out the public key transformation and reveals the message. It is like multiplying x by seven and then one seventh—multiplying by one seventh reverses the change caused by the seven, leaving x. But unlike this example, in RSA, the math is more complex and the public key does not immediately give away the private key. It can be calculated, but not before the sun dies out. Figure 7.11 Using OpenSSL to generate an RSA key pair.
RkJQdWJsaXNoZXIy MTM4ODY=