Basic Cryptography Flashcards

1
Q

What is cryptography?

A

refers to the art and science of concealing meaning

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

What is a cryptosystem?

A

a system where a sender/transmitter transforms all unconcealed data (plaintext) into concealed data called ciphertext using an encryption algorithm
The receiver then transforms the received ciphertext back to the plaintext using a decryption algorithm

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

What is a cipher?

A

encryption and decryption algorithms

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

What are the two broad types of cryptosystems?

A

Private key and public key

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

What is the encrypt function

A

EM = E(K, M)

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

What is the decrypt algorithm

A

M = D(K, EM)

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

What is “Simple Division by Key”

A

The secret key is a number, each letter is assigned a numbered value and then encoded by dividing that number by the key. The letter is then the quotient and the remainder (2 digits)

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

What are the two types of historical cryptosystems?

A

Substitution ciphers (value of plaintext is replaced), and Transposition ciphers (position of plaintext alphabet are changed without changing their values)

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

What are the two types of substitution ciphers?

A

Monoalphabetic and Polyalphabetic

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

What is the beale cipher

A

a polyalphabetic substitution cipher.

The key is a string of letters, the plaintext is written under the key, each plaintext character is shifted by value

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

What is the vigenere cipher

A

The key is represented by a string of letters. Each key letter represents a certain shift of the plaintext character.
Find the PT letter row and the Key letter column to find the CT character

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

What is the digraphic substitution cipher

A

Create a 5x5 table. Begin to fill the table with the key, then the rest of the alphabet excluding the letters that exist in the key.
Divide the PT into groups of two characters.
Find a rectangle that contains each group, switch the corner characters to get the CT.
If there are only two characters in the same row, wrap the row left to right. If there are only two characters in the same column wrap to the next character in the column

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

What is a rail fence cipher?

A

write the plaintext in 2 rows. Then write the cipher text out by writing the first row and then the second

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

What is the matrix cipher?

A

Write the plaintext in a matrix of n columns rowwise.

Create a key and use it to determine the order and write the CT by taking the columns in the order dictated by the key.

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

What was the Enigma Machine?

A

A polyalphabetic substitution cipher. It used a machine with mechanical rotors that changed the electronic circuitry for ciphering.

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

What is a one-time pad?

A

A one time pad consists of a set of non-repetitive keys where each key consists of a truly random set of letters. The keys are written on separate sheets of paper, and the sheets are glued to a pad.

Each time a message is transmitted a new key is selected from the top of the pad. The receiver has an identical set of keys, once the key has been used, both sender and received discard that key.

In current systems, this concept is used in pseudo-random number generators for stream ciphers.

17
Q

Why aren’t traditional private key cryptosystems robust?

A
  • The key can be found after reverse engineering using known plaintext attacks
  • The fact that certain letters of the English alphabet are more frequent than others allows for educated guesses to be made
  • Traditional systems are not robust against cryptanalysis
18
Q

What can be done to improve traditional private key cryptosystems?

A
  • Better ciphers must prevent the attacker from reverse engineering the key
  • Make the encryption algorithm so complicated that none of the plaintext remains in the corresponding ciphertext
  • Two categories of such ciphers are Block ciphers and Stream ciphers
19
Q

Describe the structure of a Block Cipher diagram

A

Plaintext (in blocks of size m bits) undergoes a block cipher algorithm with a key of substitution, permutation, and looping to output Ciphertext (in blockes of m-bits size)`

20
Q

What is DES?

A
  • DES stands for data encryption standard

- has an initial permutation, 16 rounds of processing, a final permutation on each 64-bit input block

21
Q

Describe the overall DES structure diagram

A
  • a 64-bit input block undergoes an initial permutation.
  • a 56-bit secret key gets broken into 16 - 48-bit keys
  • The input block undergoes 16 rounds of processing using each of the 16 generated keys
  • A final permutation is performed giving the 64-bit ciphertext output block.
22
Q

How does DES achieve security?

A

It achieves security by confusion and diffusion

23
Q

What is the drawback of ECB (electronic code book)

A

Identical plaintext blocks give identical ciphertext blocks. This can help in reverse engineering the key.

24
Q

What are the drawbacks of Cipher Block Chaining (CBC)?

A
  • If there is an error in one block, it will propagate to all subsequent blockes
  • Sequential processing is slow
25
Q

Why does 3-DES use EDE and not EEE (where E is encrypt and D is decrypt)

A

EEE would cancel out one E which would reduce brute force attack time . With EDE there is no cancellation.

26
Q

What is a stream cipher?

A

A stream cipher generates a continuous bit stream from a given plaintext bit stream by encrypting the plaintext on a bit by bit basis

27
Q

How do stream ciphers generate a key stream from a secret keys?

A

All stream ciphers use pseudorandom sequence generators (PSG) to generate a key stream from a secret key

  • A pseudorandom sequence is initialized by the secret key
  • Not mathematically random but passes most tests for randomness
  • plaintext is XORed with the sequence bit by bit to generate the ciphertext
  • The receiver uses the same secret key as a seed to generate the pseudorandom sequence and XORs it with the ciphertext stream bit by bit to produce the plaintext
28
Q

What are the advantages of a stream cipher?

A
  • High throughput
  • light weight
  • bit errors are not propagated
29
Q

What are the disadvantages of a stream cipher?

A

Sender and receiver synchronization is required

Strength of the cipher relies on the strength of the PSG