Symmetric Cryptography
References:
- 2.2-2.3
- 3.6.3
- 4.2, 4.4
- 6.1, 6.3-6.4
- 7.2.5, 7.3.2
Modern cryptography involves the study of mathematical techniques for securing digital information, systems, and distributed computations against adversarial attacks.
Setting of Private Key Encryption
Classical cryptography was concerned with designing and using codes that enables two parties to communicate secretly in the presence of an eavesdropper who can monitor all communication between them.
Security of all classical encryption schemes relied on a secret key shared by the communicating parties in advance and unknown to the eavesdropper. This scenarios is known as the private-key setting.
Two parties share a key and use this key when they want to communicate secretly. Note the same key is used to convert the plaintext to a cipher text and back; this is why it is also known as the symmetric-key setting.
Syntax of Private Key Encryption:
| Message space | |
| the finite key space | |
| is a probabilistic algorithm that outputs a key chosen according to some distribution. | |
| Encryption function that takes as input a key and a plain text message outputs a cipher text | |
| Decryption function that takes as input a key and a cipher text message outputs a plain text |
We assume perfect correctness, meaning that for all and for all the following holds
Kerchoff’s Principle:
The cipher method must not be required to be secret, and it must be able to fall into the hands of the enemy without inconvenience.
A crypto-system should be secure if everything about the system, except the key is public knowledge.
- it is significantly easier for the parties to maintain secrecy of a short key than to keep secret the (more complicated) algorithm they are using.
- it is much easier for them to change a key than to replace an encryption scheme.
- it is desirable for encryption schemes to be standardized so that
- compatibility is ensured by default and
- users will utilize an encryption scheme that has undergone public scrutiny and in which no weaknesses have been found.
Perfect secrecy:
For a scheme to be perfectly secret, observing the cipher text should have no effect on the adversary’s knowledge regarding the actual message that was sent;
In other words, the posteriori probability that some message was sent, conditioned on the cipher text that was observed, should be no different from the a priori probability that would be sent.
This formulation requires that the probability distribution of the cipher text does not depend on the plaintext.
One Time Pad:
Construction:
- for an integer
- Message Space =
- Key Space =
- Cipher Text Space =
| chooses a key from according to uniform distribution | |
| given a key and a message , | |
| given a key and a cipher message , |
Limitations:
OTP - One time pad encryption scheme is perfectly secret. However, there are a few limitations.
1. Encrypting more than one message using the same key leaks information.
It is easy to see,
2. key should be as long as the message.
This limits the usefulness of the scheme for sending very long messages
Computational Security
Perfect secrecy requires that absolutely no information about an encrypted message is leaked even to an eavesdropper with unlimited computational power. For all practical purposes however, this definition is rigid.
Security definitions that take into account computational limits of the attacker, and allow for a small probability of failure are called computational. For example, a scheme that leaks information with probability of to eavesdropper investing years of computational effort is adequate for real-world applications.
Computational security incorporates two relaxations:
- Given enough time an attacker may be able to violate security. If we can make the resources required to break the scheme larger than those available to any realistic attacker, then for all practical purposes the scheme is unbreakable.
- Adversaries can potentially succeed with some very small probability. If we can make this probability sufficiently small, we need not worry about it.
Block Ciphers:
Pseudorandom Function
- We call pseudorandom if the function (for a uniform key ) is indistinguishable from a function chosen uniformly at random from the set of all functions having the same domain and range; that is,
- if no efficient adversary can distinguish whether it is interacting with (for uniform ) or (where is chosen uniformly from the set of all functions mapping -bit inputs to -bit outputs).
Pseudorandom Permutation
CPA - Chosen plain text attacks
↪ Attacks and Security Models > 3. Chosen plaintext attack
CPA Secure Encryption from Pseudorandom Functions
- A naive attempt at constructing a secure encryption scheme from a pseudorandom permutation is to define
- This method of encryption is deterministic and so cannot be CPA-secure. encrypting the same plaintext twice will yield the same cipher text
- Our secure construction is randomised. Specifically, we encrypt by applying the pseudorandom function to a random value (rather than the message) and XORing the result with the plaintext.

Modes of Operation
We have seen a construction of CPA-secure encryption scheme based on pseudorandom functions. However it has a drawback that the length of the cipher text is double the length of the plaintext.
Block ciphers mode of operation provide a way of encrypting arbitrary length messages using shorter cipher texts.
ECB - Electronic Code Book
Construction
naive mode of operation in which the cipher text is obtained by direct application of the block cipher to each plain text blocks.
Discussion
- ECB mode is deterministic and is not CPA-secure
- ECB mode is not EAV-secure
- ECB should never be used
CBC - Cipher Block Chaining
Construction

- A uniform initialisation vector of length is first chosen
- set
- for
Discussion
- encryption in CBC mode is probabilistic and it has been proven that if is pseudorandom then CBC mode encryption is CPA-secure
- main drawback is that encryption must be carried out sequentially.
CTR - Counter
Construction

- a uniform value is chosen
- pseudorandom stream is generated
- the th cipher block is calculated as
Discussion
- encryption and decryption can be fully parallelised
- if is pseudorandom then CTR mode is CPA-secure
