CYS406 · Annotated SlidesChapter 3 — Cryptography Basics: DES and AES
Chapter 3 · Annotated slides

Cryptography Basics: DES and AES

Cryptography and encryption, symmetric vs. asymmetric encryption, government access to keys, ciphers (block and stream), DES and its Feistel structure, and AES (Rijndael): key expansion and the four round transformations.

Slide text Study notes Highlight: key words Tips, tricks & traps Seen again elsewhere How it can come up
Slide 1: Slide 1
Exam weight Low
    Slide 2: Module Objectives
    Exam weight Low
      Slide 3: Module Flow
      Exam weight Low
        Slide 4: Cryptography
        Exam weight Low
        1. Cryptography protects confidentiality, integrity, authentication and non-repudiation.
        Slide 5: Encryption
        Exam weight Low
          Slide 6: Symmetric Encryption
          Exam weight High
          1. Symmetric: ONE shared secret key for encryption and decryption. Fast; the problem is key distribution.
          🎯 How this can come up · 1 question
          MCQ

          How many keys do n users need for pairwise symmetric encryption?

          Slide 7: Asymmetric Encryption
          Exam weight Low
          1. Asymmetric: a public key and a private key. Slower; solves key distribution and enables digital signatures.
          Slide 8: Government Access to Keys (GAK)
          Exam weight Low
            Slide 9: Module Flow
            Exam weight Low
              Slide 10: Ciphers are algorithms used to encrypt or decrypt the data
              Exam weight High
              1. Block ciphers encrypt fixed-size blocks (DES 64-bit, AES 128-bit); stream ciphers encrypt bit by bit (RC4).
              🎯 How this can come up · 1 question
              MCQ

              AES encrypts blocks of:

              Slide 11: Secret Key algorithms
              Exam weight Low

                Secret Key algorithms ● Block ciphers (e.g., DES, AES)

                ○ takes key and fixed size input block to generate fixed size output block

                • Stream ciphers (e.g., RC4) ○ takes key and generates a stream of pseudorandom bits, XOR’d into data
                Secret Key algorithms ● Block ciphers (e.g., DES, AES)
                12
                Exam weight Low
                  Slide 13: Slide 13
                  Exam weight High
                  1. DES: 64-bit blocks, 56-bit effective key, 16 Feistel rounds. Broken by brute force; 3DES applies it three times.
                  🎯 How this can come up · 1 question
                  MCQ

                  DES’s effective key length is:

                  Slide 14: Slide 14
                  Exam weight Low

                    Slide 15
                    15
                    Exam weight Low

                      Slide 16
                      16
                      Exam weight Low

                        Slide 17
                        17
                        Exam weight Low

                          Slide 18
                          18
                          Exam weight Low

                            Slide 19
                            19
                            Exam weight Low
                              Slide 20: Slide 20
                              Exam weight High
                              1. AES (Rijndael) replaced DES: 128-bit block; 128/192/256-bit keys with 10/12/14 rounds.
                              🎯 How this can come up · 1 question
                              MCQ

                              AES-256 uses how many rounds?

                              2. The Advanced Encryption Standard (AES)

                              • Triple-DES alternative to DES – but slow, has small blocks
                              • US NIST issued call for ciphers in 1997
                              • 15 candidates accepted in Jun 98
                              • 5 were shortlisted in Aug-99
                              • Rijndael was selected as the AES in Oct-2000
                              • issued as FIPS PUB 197 standard in Nov-2001
                              2. The Advanced Encryption Standard (AES)
                              21
                              Exam weight Low

                                2.The AES Cipher - Rijndael

                                • designed by Rijmen-Daemen in Belgium
                                • has 128/192/256 bit keys, 128 bit data
                                • an iterative rather than feistel cipher processes data as block of 4 columns of 4 bytes ○ ○ operates on entire data block in every round
                                • designed to be: ○ resistant against known cryptanalysis attacks ○ speed and code compactness on many CPUs design simplicity ○
                                2.The AES Cipher - Rijndael
                                22
                                Exam weight Low

                                  AES Structure

                                  • AES is a non-Feistel cipher that encrypts and decrypts a data block of 128 bits arranged in a matrix of 4 columns of 4 bytes named state.
                                  • It uses 10, 12, or 14 rounds. The key size, which can be 128, 192, or 256 bits, depends on the number of rounds. Key is expanded to array of words (state).
                                  • In each round, the state undergoes: 1 Byte substitution (1 S-box used on every byte) 2 Shift rows (permute bytes between groups/columns) 3 Mix columns (subs using matrix multiply of groups) 4 Add round key (XOR state with key material)
                                  AES Structure
                                  23
                                  Exam weight Low

                                    e r u t c u r t S S E A

                                    Slide 24
                                    24
                                    Exam weight Low
                                      Slide 25: Slide 25
                                      Exam weight Low

                                        AES Structure- Key Expansion

                                        • Objective: To create round keys for each round, AES uses a key-expansion process.
                                        • If the number of rounds is N, the key-expansion routine creates N 128-bit round keys from one single 128-bit cipher key. r r + 1
                                        • takes 128-bit (16-byte) key and expands into array of 44/52/60 32-bit words
                                        AES Structure- Key Expansion
                                        26
                                        Exam weight Low
                                        1. Key expansion turns the cipher key into a round key for each round.
                                        Slide 27: AES Structure- Key Expansion
                                        Exam weight Low
                                          Slide 28: AES Structure- Round
                                          Exam weight High
                                          1. Each round: SubBytes (S-box substitution), ShiftRows (permutation), MixColumns (mixing), AddRoundKey (XOR with the round key). The last round skips MixColumns.
                                          Memory trickSub, Shift, Mix, Add.
                                          🎯 How this can come up · 1 question
                                          MCQ

                                          Which AES step is omitted in the final round?

                                          Slide 29: AES Structure- SubBytes
                                          Exam weight Low
                                            Slide 30: AES Structure- SubBytes
                                            Exam weight Low

                                              AES Structure- Shift Rows

                                              • Shift Rows
                                                • a circular byte shift to left in each row
                                                • decrypt inverts using shifts to right
                                                • since state is processed by columns, this step permutes bytes between the columns
                                              AES Structure- Shift Rows
                                              31
                                              Exam weight Low
                                                Slide 32: Slide 32
                                                Exam weight Low
                                                  Slide 33: AES Structure- Mix Columns
                                                  Exam weight Low

                                                    AES Structure- Add Round Key

                                                    • Add Round Key
                                                      • XOR state with 128-bits of the round key
                                                      • again processed by column (though effectively a series of byte operations)
                                                      • inverse for decryption identical
                                                      • since XOR own inverse, with reversed keys
                                                      • designed to be as simple as possible
                                                      • a form of Vernam cipher on expanded key
                                                      • requires other stages for complexity / security
                                                    AES Structure- Add Round Key
                                                    34
                                                    Exam weight Low
                                                      Slide 35: AES Structure- Add Round Key
                                                      Exam weight Low

                                                        n

                                                        • i t p y r c n

                                                        E d

                                                        n

                                                        S

                                                        u

                                                        E o A

                                                        R

                                                        Slide 36
                                                        36
                                                        Exam weight Low

                                                          AES Summary

                                                          • has a simple structure
                                                          • only AddRoundKey uses key
                                                          • AddRoundKey a form of Vernam cipher
                                                          • each stage is easily reversible
                                                          • decryption uses keys in reverse order
                                                          • decryption does recover plaintext
                                                          • final round has only 3 stages
                                                          • Review: www.securityfit.cz/download/kib/ rijndael_ingles2004. swf
                                                          AES Summary
                                                          37
                                                          Exam weight Low
                                                          1. AES is not a Feistel cipher: every round processes the whole block.
                                                          Slide 38: Module Summary
                                                          Exam weight Low