We can loosely define a symmetric encryption scheme as any cryptographic scheme with three algorithms:
- A key generation algorithm, which generates a private key.
- An encryption algorithm, which takes the private key and a plaintext as inputs and outputs a ciphertext.
- A decryption algorithm, which takes the private key and the ciphertext as inputs and outputs the original plaintext.
Typically an encryption scheme—whether symmetric or asymmetric—offers a template for encryption based on a core algorithm, rather than an exact specification.
For instance, consider Salsa20, a symmetric encryption scheme. It can be used with both 128- and 256-bit key lengths. The choice regarding key length impacts some minor details of the algorithm (the number of rounds in the algorithm to be exact).
But one would not say that using Salsa20 with a 128-bit key is a different encryption scheme than Salsa20 with a 256-bit key. The core algorithm stays the same. Only when the core algorithm changes would we really speak of two different encryption schemes.
Symmetric encryption schemes are typically useful in two kinds of cases: (1) Those in which two or more agents are communicating from a distance and want to keep the contents of their communications secret; and (2) those in which one agent wants to keep the contents of a message secret across time.
You can see a depiction of situation (1) in Figure 1 below. Bob wants to send a message to Alice across a distance, but does not want others to be able to read that message.
Bob first encrypts the message with the private key . He, then, sends the ciphertext to Alice. Once Alice has received the ciphertext, she can decrypt it using the key and read the plaintext. With a good encryption scheme, any attacker that intercepts the ciphertext should not be able to learn anything of real significance about the message .
You can see a depiction of situation (2) in Figure 2 below. Bob wants to prevent others from viewing certain information. A typical situation might be that Bob is an employee storing sensitive data on his computer, which neither outsiders nor his colleagues are supposed to read.
Bob encrypts the message at time with the key to produce the ciphertext . At time he needs the message again, and decrypts the ciphertext with the key . Any attacker that might have come across the ciphertext in the meantime should not have been able to deduce anything significant about from it.
Figure 1: Secrecy across space
Figure 2: Secrecy across time
Quiz
Quiz1/5
cyp3025.2
What is the function of the key generation algorithm in a symmetric encryption scheme?