Encryption scheme
From CRYPTUTOR
An encryption scheme is a protocol for two parties to securely send "secret messages" over an insecure channel, so that an eavesdropper who sees the messages from the channel does not learn anything about the "secret messages". Depending on whether the two parties need to share a common secret, we call the encryption scheme private-key or public-key.
We can formally define the security in different ways, depending on our model of the eavesdropper's capabilities.
Private-key encryption scheme
A private-key encryption scheme consists of the following 3 algorithms:
- Key generation (KeyGen): A probabilistic algorithm which takes the implicit security parameter as input, and outputs a key. We view KeyGen as a distribution over keys, and use the notation
to denote that k is chosen according to that distribution.
- Encryption (Enc): An algorithm (possibly probabilistic) which takes a key and a message as input, and outputs a ciphertext. We often abbreviate
as
.
- Decryption (Dec): An algorithm which takes a key and a ciphertext as input, and outputs a message. We often abbreviate
as
.
These algorithms must satisfy the following properties:
- Efficiency: All three algorithms run in polynomial time in the security parameter.
- Correctness: For all keys k and messages m, we have
.
- Security: A security definition such as perfect secrecy, IND-CPA, SIM-CPA, IND-CCA, or SIM-CCA.
We call the space of keys, messages, and ciphertexts the key space (
), message space (
), and ciphertext space (
), respectively.
Public-key encryption scheme
A public-key encryption scheme consists of the same three algorithms, with the following modifications:
- The key generation algorithm now outputs a pair (PK,SK) consisting of a private key and public key.
- The encryption algorithm encrypts using only the public key (written
), while the decryption algorithm decrypts using only the private key (written
).
We formulate the correctness property in terms of public keys as follows:
- Correctness: For all key pairs
and messages m, we have
.
There are corresponding security definitions IND-CPA, SIM-CPA, IND-CCA, and SIM-CCA for public-key encryption schemes.

