Cryptographic Concepts (part 2) Flashcards

1
Q

What is a symmetric key?

A

A symmetric key means that the encryption key (e) and the decryption key (d) are similarly related. If you know the encryption key (e), then it is easy to derive the decryption key (d).

e.g. if the decryption function is the inverse permutation function of the encryption function

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

What is the Caesar Cipher?

A

A Caesar Cipher’s encryption function shifts all the letters by 3 (wrapping around at the end of the alphabet).

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

What is the difference between encoding/decoding and encrypting/decrypting?

A

In encoding/decoding there is no key involved. In encrypting/decrypting a key is used.

e.g. The Caesar Cipher uses encoding/decoding, since it just shifts letters by 3 no matter what.

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

Draw a model of symmetric-key encryption.

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

In symmetric-key encryption, on which type of channel does Alice send Bob her key? What about the ciphertext?

A
  • Alice can communicate the key to Bob by establishing a secure channel and then sending it on that secure channel.
  • Then Alice encrypts the message and sends the ciphertext across the unsecured channel. Bob receives it and decrypts the ciphertext using the key.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In symmetric-key encryption, why doesn’t Alice just send the ciphertext over the secure channel?

A

Becuase sending data over the secure channel is slow, so it would take a lot longer to send a long message on the secure channel, rather than the unsecure channel.

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

What two types of ciphers are usually used in symmetric-key encryption?

A
  1. Block Ciphers
  2. Stream Ciphers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a block cipher?

A

A block cipher is an encryption scheme which breaks up the plaintext messages into strings (called blocks) of a fixed length t over an alphabet A, and encrypts one block at a time.

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

What is a product cipher?

A

A product cipher combines substitution ciphers and transposition ciphers (i.e. first encrypt with a substitution cipher, and then encrypt with a transposition cipher). By doing this, your security may increase.

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

What is a stream cipher?

A

A stream cipher is a block cipher having a block length of one.

  • Every character is encrypted one bit/byte at a time.
  • An encryption transformation can change on every symbol.
  • It can be used when data must be processed one symbol at a time (e.g., equipment has no memory or buffering of data is limited).
  • There is no error propagation.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does a Vernam cipher work?

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

What is a one-time pad?

A

A one-time pad is a Vernam cipher where the key string is truly randomly chosen and never used again.

A one-time pad is theoretically unbreakable!

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

Why is a one-time pad impractical in practice?

A

Because it has been proven that to realize an unbreakable system requires a random key of the same length as the message.

(Neither the sender nor receiver knows how long the message will be ahead of time.)

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

What is a substitution cipher?

A

Substitution ciphers are block ciphers which replace symbols (or groups of symbols) by other symbols or groups of symbols.

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

What is a mono-alphabetic substitution cipher?

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

If the alphabet A contains q symbols, how many distinct mono-alphabetic substitution ciphers are there?

A

q!

For the English alphabet, this is 26!

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

Are mono-alphabetic substitution ciphers secure? Why or why not?

A

They are not secure because they preserve the frequency distribution of letters in the ciphertext, allowing an experienced cryptographer to crack them.

(Note that they are not insecure because the key space is too small.)

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

What does the following mean:

First-order statistics of plaintext and ciphertext are isomorphic.”

A

first-order statistics = the monogram statistics = the letter frequencies

The word isomorphic just means that if we have the two histogram distributions, then by simply renaming the letters of the ciphertext histogram we can make it match the plaintext histogram.

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

What is a homophonic substitution cipher?

A
  • In a homophonic substitution cipher, each symbol a maps to a set of strings H(a).
  • The only requirement is that each set of strings does not intersect with any other set, (i.e. the sets of strings are pairwise disjoint).
  • When you perform the encryption, you randomly select one of the strings that can represent each character and substitute it for the character.
  • This time, when the attacker looks at the ciphertext, it is much more confusing and difficult to determine which set of symbols map to which letters.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the pros and cons of a homophonic substitution cipher?

A

Pros:

  • Frequency distributions are not maintained, so it is more difficult to crack.

Cons

  • Decryption takes longer.
  • The ciphertext is much much longer than the plaintext message (data expansion), so it can take longer to transfer the encrypted message.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is a polyalphabetic substitution cipher?

A
  • A polyalphabetic substitution cipher is a block cipher with a block length of t.
  • Within each block, a set of encryption functions is used, where a unique encryption function is applied to each character within the block.
  • The same set of encryption functions are applied to each block.
  • So it is essentially a t-monoalphabetic substitution cipher.
  • Even though there is a pattern, if your t is large enough, then the pattern is too difficult to detect and it is not breakable.
22
Q

What is a transposition cipher?

A

Transposition ciphers are block ciphers which permute (i.e. scramble) symbols in a block.

A transposition cipher uses a block encryption scheme where the block length = t and K is the set of all permutations on the set {1, 2, …, t}.

23
Q

Are transposition ciphers secure?

A

Not at all!

Simple transposition ciphers perserve the number of symbols of a given type within a block (i.e., first-order statistics of plaintext and ciphertext are identical!)

24
Q

Why is composition of ciphers useful?

A

You can composite several simple ciphers together to create a more complex and difficult to crack cipher.

25
Q

What is a round of a product cipher?

A

A substitution cipher followed by a permutation cipher is called a round. Usually there are multiple rounds in a product cipher.

26
Q

What do substitution and transposition ciphers add (in the context of a product cipher round)?

A
  • Substitution in a round adds confusion, (making the relationship between the key and ciphertext as complex as possible).
  • Transposition adds diffusion, (spreading out the redundancy in the plaintext over the ciphertext).
27
Q

Define the permutation space of a block cipher.

A

The permutation space of a block cipher contains all
possible transformations from message space to ciphertext space.

28
Q

What is the relationship between key space and permutation space?

A

Usually you want the key space to be a fraction of the permutation space of a block cipher.

29
Q

Why don’t you want the key space to use up the entire permutation space?

A

The key would have to be astronomical in size and then sent to the receiver.

Also, double encryption and triple encryption would become the same thing as single encryption, since a single key could be used to accomplish the same thing as two keys or three keys.

30
Q

What is a digital signature?

A

A digital signature provides a means for an entity to bind its identity to a piece of information.

31
Q

How does someone verify your digital signature?

A

By applying the verification function VA to the message and its signature.

32
Q

What are the requirements for signing and verification transformations (in regard to digital signatures)?

A
33
Q

What is the main difference between authentication and identification?

A

In authentication, the identity of the person need not be
disclosed.

34
Q

What are the 2 types of authentication?

A
  1. Entity Authentication - i.e. identification; this is done in real time, e.g. when you call your bank and they ask you challenge questions
  2. Data Origin Authentication - this is done with a time delay, e.g. when your friend digitally signs their email, you can download the verification function from the internet (at any time) and verify that your friend sent the email.
35
Q

What is entity authentication?

A

Identification, or entity authentication, assures one party of both the identity of a second party involved, and that the second was active at the time the evidence was created or acquired.

36
Q

What is data origin authentication?

A

Data origin authentication, or message authentication, provides one party, which receives a message, assurance of the identity of the party which originated the message.

37
Q

What type of function is used for public-key cryptography?

A

A trapdoor one-way function.

38
Q

Draw a diagram of how public-key encryption works.

A
39
Q

What type of adversary can beat public-key encryption?

A

An active adversary (who can change the ciphertext) can beat this scheme.

A passive adversary (who can only read) cannot, since they don’t have Bob’s private key with which you decrypt the ciphertext.

40
Q

What is the difference between a secret key and a private key?

A

A secret key e is used in a symmetric-key cryptosystem, i.e. two or more parties share the secret.

A private key d is used in a public-key cryptosystem, i.e. only one party knows the key. It must be computationally infeasible to compute d from e, since d is available to the entire public.

41
Q

Describe how a man-in-the-middle attack works in public-key encryption.

A
  • Eve intercepts the key e that Bob tries to send to Alice, changes it to e’, and then sends it on to Alice.
  • Alice uses e’ to encrypt her message, rather than e, and sends the message back to Bob.
  • Eve intercepts the message and can read the entire thing.
  • Furthermore, Eve can encrypt the message using Bob’s actual key e, and send the message on to Bob, so that Alice and Bob think they are successfully communicating with each other.
42
Q

How do you avoid the man-in-the-middle attack on public-key cryptogrpahy?

A

Use data origin authentication, so that Alice can verify that Bob’s public key e actually came from Bob (and not Eve)!

43
Q

What is reversible public-key encryption?

A

Not only can you can encrypt a message and then decrypt it to get the original message (like normal), but you can also decrypt the message (which produces garbage), and then encrypt it to get back the original message again!

44
Q

RSA is an example of reversible public-key encryption. What is the advantage of your encryption scheme being reversible?

A

If you take a message and apply the decryption function using the private key d, then this function has essentially become a digital signature function.

Now, anyone who has your public key (which is everyone) can take your message and apply the hash function to it, encrypt it using your public key, and compare the hash value it outputs with the message’s signature. If they are equal, people know that the message came from you.

45
Q

Why is a trusted third party (TTP) good to have for public-key encryption?

A

Without it, entity A can deny having signed a message, or some other entity B could falsely claim that a signature on a message was produced by A.

But if everyone gives the TTP their public-key information (e), or their verification information, then the TTP can download any disputed documents and run the verification function against them to determine whether the documents were produced by entity A or B.

46
Q

What are some of the advantages of symmetric-key encryption over public-key encryption?

A
  • high throughput
  • short keys (relatively)
  • symmetric-key ciphers can be used as primitives to construct various cryptographic mechanisms (e.g., pseudo-random number generators, hash functions, digital signature schemes)
  • symmetric-key ciphers can be composed to produce stronger ciphers
  • symmetric-key encryption is perceived to have an extensive history
47
Q

What are some of the disadvantages of symmetric-key encryption compared to public-key encryption?

A
  • in a two-party communication, the key must be remain secret at both ends
  • in a large network, there are many key pairs to manage
  • in a two-party communication, sound cryptographic practice dictates that the key be changed frequently
  • digital signature schemes arising from symmetric-key encryption typically require either large keys for the public verification function or the use of a TTP
48
Q

What is a hash function?

A

Hash function: given x, compute h(x)

  • Maps binary strings of arbitrary length to binary strings of some fixed length, called hash-values.
  • Serves as a compact representative of an input string.
49
Q

What are the requirements of a cryptographic hash function?

A
  1. Efficient
  2. Preimage resistance (AKA one-wayness): given z, hard to find any x such that h(x) = z
  3. 2nd preimage resistance (AKA weak collision-resistance): given x, hard to find y != x such that h(x) = h(y)
  4. Collision-resistant (AKA strong collision-resistance): hard to find any x, y, y != x such that h(x) = h(y)
50
Q

In public-key cryptography, it is necessary to generate a digital signature. This can take a long time, however, for a long message. What can be used to get around this issue?

A

You can compute a cryptographic hash of the large message instead, which might end up being 128 bits long, for example. Then you can create the digital signature using the hash value and the key (rather than the entire message and the key).