Original: Since public-key algorithms tend to be much slower than symmetric-key algorithms , modern systems such as TLS and SSH use a combination of the two : one party receives the other 's public key , and encrypts a small piece of data ( either a symmetric key or some data used to generate it ) .
Simplified: Modern cryptographic systems include symmetric-key algorithms ( such as DES and AES ) and public-key algorithms ( such as RSA ) . Symmetric-key algorithms use a single shared key ; keeping data secret requires keeping this key secret .