# How does RSA work?

The Rivest-Shamir-Adleman (RSA) encryption algorithm is an asymmetric encryption algorithm that is broadly used in several products and services. Asymmetric encryption need a key pair that is mathematically connected to encrypt and decrypt data.

A private and public key are generated, with the public key being available to anyone and the private key being a secret known only by the key set creator. With RSA, the private or public key can encrypt the information, while the other key decrypts it. This is the reasons that RSA is the generally used asymmetric encryption algorithm.

The choice to encrypt with either the private or public key supports a large group of services to RSA users. If the public key can be used for encryption, the private key should be used to decrypt the information. This is perfect for sending responsive data across a network or Internet connection, where the recipient of the information sends the information sender their public key.

The sender of the information then encrypts the responsive data with the public key and sends it to the recipient. Because the public key encrypted the information, only the owner of the private key can decrypt the responsive information. Therefore, it is only the intended recipient of the information can decrypt it, even if the information were taken in transit.

The other approach of asymmetric encryption with RSA is encrypting a message with a private key. In this example, the sender of the data encrypts the data with their private key and sends encrypted information and their public key forward to the recipient of the information.

The recipient of the information can then decrypt the information with the sender’s public key, thus checking the sender is who they say they are. With this approach, the data can be stolen and read in transit, but the true goal of this type of encryption is to check the identity of the sender.

If the data were stolen and changed in transit, the public key cannot be able to decrypt the new message, and therefore the recipient would understand the data had been changed in transit.

The public and private key are generated with two numbers, one of which is a product of two large prime numbers. Both use the similar two prime numbers to calculate their value. RSA keys influence to be 1024 or 2048 bits in length, creating them extremely complex to factorize, though 1024 bit keys are believed to breakable soon.

RSA was used with Transport Layer Security (TLS) to secure connection between two individuals. There are other famous products and algorithms, such as the Pretty Good Privacy algorithm, use RSA either currently or in the previous.

Virtual Private Networks (VPNs), email services, web browsers, and other connection channels have used RSA as well. VPNs can use TLS to perform a handshake between the two parties in the data exchange.

Updated on: 16-Mar-2022

486 Views