# Definition of symmetric cipher and definition of asymmetric cipher

So I'm currently taking a cryptography class right now and my professor has told the class that she can't even define symmetric cipher for us without getting into asymmetric ciphers and the textbook we use hasn't been helpful. It gives me five points: plaintext, encryption algorithm, secret key, ciphertext, and decryption algorithm.

I was just wondering (plus I've googled around, there didn't seem to be much helpful definitions of these) could anyone please help define what exactly a symmetric cipher is? And if possible, an asymmetric cipher?

Thanks!

• User picks a key $k$ at random. Adversary submits sequence of chosen plaintexts $m_1, m_2, \dots$ to user, and user dutifully returns ciphertexts $E_k(m_1),E_k(m_2), \dots$. Then adversary sends two plaintexts $m^*_0$ and $m^*_1$ to user, user flips a coin giving $b$, either 0 or 1, and returns $E_k(m^*_b)$. Adversary wins if they can guess what $b$ was with high probability. This game is called IND-CPA for indistinguishability (can you tell $E_k(m^*_0)$ from $E_k(m^*_1)$?) under chosen-plaintext (adversary submits $m_i$ of their choice) attack. $E$ is secure if adversary seldom wins. – Squeamish Ossifrage Feb 19 at 19:51
• There's usually another function $D_{k'}(E_k(m)) = m$ to decrypt messages. If the keys $k$ and $k'$ are the same, so that the sender and receiver share a key, it's called symmetric, or secret-key, encryption; if it's nigh-impossible to figure out what the receiver's decryption key $k'$ is even if you know the sender's encryption key $k$, it's called asymmetric, or public-key, encryption. All that said, in real systems you also want authenticated encryption (IND-CCA3) for symmetric ciphers, and nonmalleability (NM-CCA2) for asymmetric ones. More keywords to look up, hooray! – Squeamish Ossifrage Feb 19 at 19:58

In simplest terms:

### Symmetric encryption

Symmetric encryption uses the same key for encryption and decryption.

This key is called "secret key", because it has to be kept secret at all times or else someone could decrypt the encrypted message.

Examples of symmetric encryption:

### Asymmetric encryption

Asymmetric encryption uses one key for encryption and a different key for decryption.

The key for encryption is public knowledge and is called "public key". The key for decryption on the other hand is kept secret and called "private key". This is to ensure that only the possesser of this private key can decrypt a message, that has been encrypted with the corresponding public key.

Examples of asymmetric encryption:

• RSA
• Diffie-Hellman (Actually here the asymmetric part is the key-exchange and not a full encryption of a message.)
• Diffie-Hellman is not asymmetric encryption. It only provides key agreement. – Ella Rose Feb 19 at 16:17
• @EllaRose But the key agreement happens "asymmetrically", right? – AleksanderRas Feb 19 at 18:18
• If I understand what you're asking, then yes. – Ella Rose Feb 19 at 18:46