RSAAlgorithm is the first public key algorithm discovered in 1978 by Ron Rivest, Adi Shamir and Len Adleman. It uses different but related keys for encryption and decryption. The RSA algorithm can be used for both public key encryption and digital signatures. It works by selecting two large prime numbers to calculate the public and private keys. The public key is used to encrypt data and the private key is used to decrypt it.