DES

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

DES

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. DES is a symmetric block cipher.
A True
B False
2. How big is each block of data that DES encrypts?
A 56 bits
B 64 bits
3. How long is the effective key in DES?
A 64 bits
B 56 bits
4. Why is DES now considered insecure?
A Its small key can be brute-forced by modern computers
B Its algorithm cannot decrypt messages any more
5. DES uses one public key to encrypt and a different private key to decrypt.
A False
B True

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1DES AThe size of the DES key, which is small enough for a modern computer to brute-force
2key_bits = 56 BData Encryption Standard, an early symmetric block cipher that is now considered insecure
3DES encrypts data in fixed-size blocks of 64 bits at a time CDES is symmetric. It uses one shared secret key, not a public and private key pair.
4DES is a symmetric cipher, so the same secret key encrypts and decrypts the data Dblock_size = 64
5DES is secure because it has a 56-bit key, which is too large to ever brute-force EA 56-bit key is small, not large. Modern computers can try every possible key, so DES is no longer secure.
6DES is an asymmetric cipher with a public key and a private key Fplain = des_decrypt(cipher, key)

Definitions

DES

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
blockBits = __
2.
keyBits = __
3.
totalKeys = 2 __ 56
4.
for key in _____(2 ** 56): decrypt(cipher, key)
5.
keyBits = 56 if _______ < 128: print("DES is weak")

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A BLOCK_BITS = 128
B KEY_BITS = 56
C keys = 2 ** KEY_BITS
D print(keys)
Question 2
A KEY_BITS = 128
B keys = 2 ** KEY_BITS
C print('Keys:', keys)
Question 3
A cipher = 'DES'
B block_size = 56
C key_size = 56
Question 4
A def key_count(bits):
B return 2 * bits
C print(key_count(56))
Question 5
A keys = 2 ** 56
B speed = 10 ** 12
C secs = keys * speed
D print(secs)

Answer Key

DES
Section A: Quick Questions
Q1
A — True
Q2
B — 64 bits
Q3
B — 56 bits
Q4
A — Its small key can be brute-forced by modern computers
Q5
A — False
Section B: Match the Pairs
Q1
DES → Data Encryption Standard, an early symmetric block cipher that is now considered insecure
Q2
key_bits = 56 → The size of the DES key, which is small enough for a modern computer to brute-force
Q3
DES encrypts data in fixed-size blocks of 64 bits at a time → block_size = 64
Q4
DES is a symmetric cipher, so the same secret key encrypts and decrypts the data → plain = des_decrypt(cipher, key)
Q5
DES is secure because it has a 56-bit key, which is too large to ever brute-force → A 56-bit key is small, not large. Modern computers can try every possible key, so DES is no longer secure.
Q6
DES is an asymmetric cipher with a public key and a private key → DES is symmetric. It uses one shared secret key, not a public and private key pair.
Section C: Definitions
Q1
DES — Data Encryption Standard: an early symmetric block cipher using 64-bit blocks and a 56-bit key. Now insecure because modern computers can brute-force its small key.
Section D: Fill in the Blanks
Q1
blockBits = 64
Q2
keyBits = 56
Q3
totalKeys = 2 ** 56
Q4
for key in range(2 ** 56): decrypt(cipher, key)
Q5
keyBits = 56 if keyBits < 128: print("DES is weak")
Section E: Spot the Error
Q1
A — DES encrypts data in 64-bit blocks, not 128-bit blocks. The line should be BLOCK_BITS = 64.
Q2
A — DES uses a 56-bit key. A 128-bit key would be far too large to brute-force. The line should be KEY_BITS = 56.
Q3
B — 56 is the DES key size, not its block size. DES works on 64-bit blocks, so the line should be block_size = 64.
Q4
B — Each extra key bit doubles the number of possible keys, so the count is 2 ** bits (2 to the power of bits). Multiplying by 2 gives a tiny number.
Q5
C — The time for a brute-force search is the number of keys divided by the number of guesses per second. It should be secs = keys / speed.