Information Security · Unit 3
Symmetric Encryption
Exam-focused notes for Symmetric Encryption (Information Security, BIT303): what the TU syllabus asks and how it has actually been tested, with 4 solved past questions from this unit.
Symmetric Encryption in short
Symmetric encryption uses one shared secret key for both locking and unlocking data. It is fast, so it protects most of the data we send and store. This chapter covers the main principles, the DES block cipher and the Hill cipher.
What this unit covers
- Symmetric cryptography principles
- DES algorithm and round operations
- DES sub-key generation
- S-box operations in DES
- DES encryption and decryption
- Hill cipher and matrix operations
DES encryption and decryption
2081 · 10 marks
Discuss how encryption and decryption is done in the DES algorithm.[10]
S-box operations in DES
2081 · 5 marks
What is the use of S-box in DES? Illustrate S-box operation with an example. [5]
Show solved answerHide answer
S-Box in DES (Data Encryption Standard)
Given
This is a conceptual/illustrative question. The only numeric data needed comes from the standard DES S-box specification (the S1 table) and a chosen example input. No numeric data is supplied in the question itself, so I use the standard DES S1 table and the classic textbook example input 011011.
Standard S1 table (from DES specification):
| Row\Col | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 14 | 4 | 13 | 1 | 2 | 15 | 11 | 8 | 3 | 10 | 6 | 12 | 5 | 9 | 0 | 7 |
| 1 | 0 | 15 | 7 | 4 | 14 | 2 | 13 | 1 | 10 | 6 | 12 | 11 | 9 | 5 | 3 | 8 |
| 2 | 4 | 1 | 14 | 8 | 13 | 6 | 2 | 11 | 15 | 12 | 9 | 7 | 3 | 10 | 5 | 0 |
| 3 | 15 | 12 | 8 | 2 | 4 | 9 | 1 | 7 | 5 | 11 | 3 | 14 | 10 | 0 | 6 | 13 |
Example input: 011011
Solution
Use of S-Box in DES
An S-Box (Substitution Box) is the heart of the DES round function and is its only non-linear component. Its purposes are:
- Confusion: It hides the statistical relationship between plaintext, key, and ciphertext (Shannon's confusion principle).
- Non-linearity: Since XOR, permutation, and expansion in DES are all linear, the S-boxes are what make DES resistant to linear and differential cryptanalysis.
- Compression: Each S-box maps a 6-bit input to a 4-bit output, so the 8 S-boxes together reduce 48 bits → 32 bits in each round.
- Avalanche effect: A single-bit change at the input propagates to many output bits, giving DES its cryptographic strength.
DES uses 8 S-boxes (S1-S8), each with its own $4 \times 16$ lookup table.
S-Box Operation Rule
For a 6-bit input $b_1 b_2 b_3 b_4 b_5 b_6$:
- Row = decimal value of the outer bits $b_1 b_6$ (range 0-3)
- Column = decimal value of the middle 4 bits $b_2 b_3 b_4 b_5$ (range 0-15)
- Output = 4-bit binary of the table entry at (row, column)
Worked Example (using S1, input 011011)
Bits:
$$b_1 b_2 b_3 b_4 b_5 b_6 = 0;1;1;0;1;1$$
Row = $b_1 b_6 = 01_2 = 1$
Column = $b_2 b_3 b_4 b_5 = 1101_2 = 13$
Lookup:
$$S1[\text{row}=1][\text{col}=13] = 5$$
Output (4-bit):
$$5_{10} = 0101_2$$
Result
$$\boxed{\text{Input } 011011 ;\rightarrow; \text{Output } 0101}$$
Thus a 6-bit block is substituted and compressed into a 4-bit block, providing the essential non-linear confusion in DES.
DES algorithm and round operations
2079 · 10 marks
What is symmetric cryptography? Explain round operation of DES algorithm. Describe Sub-Key generation process for DES rounds.[10]
Hill cipher and matrix operations
2079 · 5 marks
Decrypt the cipher text "CRHG" using the Hill cipher with the key matrix $$\begin{bmatrix} 3 & 4 \ 3 & 5 \end{bmatrix}$$. [5]
Make Unit 3 stick
Practice BIT303 with flashcards & quizzes