Encryption Flashcards

1
Q

What is encryption, and what are the plaintext and ciphertext?

A

Encryption scrambles data into a form that can’t be understood without a decryption key. Plaintext is the original data, and ciphertext is the encrypted form.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is decryption?

A

Decryption is the process of converting ciphertext back into plaintext using the appropriate key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does the Caesar cipher work?

A

It shifts each letter in the plaintext by a fixed number of positions in the alphabet, e.g., A becomes B with a shift of 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can the Caesar cipher be cracked?

A
  1. Brute force through all 25 possible shifts.
  2. Use frequency analysis to identify the most common letters.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which letter is the most common in English text?

A

The letter ‘E’ is the most common.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why is the Vernam cipher considered perfectly secure?

A

The key is truly random.

The key is as long as the message.

The key is used only once and then destroyed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does the Vernam cipher encrypt text?

A

By XORing each bit of the plaintext with the corresponding bit of a one-time pad.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What conditions must be met for perfect security in the Vernam cipher?

A
  1. The key must be truly random.
  2. The key must be at least as long as the message.
  3. The key must be used only once.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Encrypt ‘CAT’ using a one-time pad ‘GTS’. Show ASCII XOR process.

A

Plaintext (‘CAT’): 1000011, 1000001, 1010100
Key (‘GTS’): 1000111, 1010100, 1010011
XOR Result: 00000100, 00010101, 00001111.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Run Length Encoding (RLE)?

A

A lossless compression method that encodes repeated data as a single value and a count, e.g., 5G for GGGGG.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define the terms cipher and key.

A

Cipher: The algorithm used for encryption and decryption.

Key: The secret information used in the encryption/decryption process.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is computational security compared to perfect security?

A

Computational security means encryption cannot be cracked with current technology in a reasonable timeframe.

Perfect security means it is mathematically impossible to crack the cipher.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Name methods used to crack ciphers.

A
  1. Frequency analysis.
  2. Dictionary attacks.
  3. Brute force.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Why is RLE considered lossless compression?

A

Because no data is lost during the process, and the original data can be perfectly restored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How could you implement a Caesar cipher in Python?

A

By using loops or functions to shift the ASCII values of characters in the plaintext.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How could you implement a Caesar cipher in Python?

A

By using loops or functions to shift the ASCII values of characters in the plaintext.