RSA works by asymmetric encryption, which means it uses a pair of keys for encryption and decryption. The private key is kept secret, as the name suggests. Symmetric encryption, on the other hand, uses one shared key to encrypt and decrypt.