Cryptography - Symmetric, Asymmetric, Basics Flashcards

(65 cards)

1
Q

Define

Symmetric Cryptography

A

Encryption key = decryption key

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

Algorithm for Symmetric Cryptography

A
  1. Generate key (KeyGen() => K )
  2. Encrypt message (E(K, M) = EK(M) = C )
  3. Decrypt message (D(C, K) = DK(C) = M )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the attacker’s goal in symmetric cryptography?

A

Find out any information on the message(s) or the key

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

What is the goal of the defender in symmetric cryptography?

A

The attacker shouldn’t be able to distinguish which 2 messages were encrypted in cipher

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

List the types of symmetric cryptography attacks

A
  • Ciphertext
  • Known plaintext
  • Chosen plaintext
  • Chosen ciphertext
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe

Ciphertext Attack

Symmetric Cryptography

A

Eve observes every instance of Cipher and has partial information Message (i.e. knows what language was used)

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

Describe

Known Plaintext Attack

Symmetric Cryptography

A

Eve knows part of Message and/or entirty of numerous Messages

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

Describe

Chosen Plaintext Attack

Symmetric Cryptography

A

Eve picks a Message for Alice to encrypt

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

Describe

Chosen Ciphertext Attack

Symmetric Cryptography

A

Eve picks a ciphertext for Bob to decrypt

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

Describe

Secure Cryptic System

A

A costly system to break into

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

Why are the costs high to break into a Symmetric Crypto system?

A
  • Expensive - exhaustion of resources and efforts
  • Useful lifetime of information may expire
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Probability of an Attacker winning

Symmetric Cryptography

A

Pr[Attacker wins] <= 50% or 1/2 + e

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

Describe

Pseudorandom Number Generators

Symmetric Cryptography

A

A random-looking value that is actually determinastically created for inital vector

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

Describe

Stream ciphers

Symmetric Cryptography

A

Encrypting a plaintext with a pseudrandom digit 1 bit/byte at a time

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

Pros of Symmetric Cryptography

A

Strong confidentiality

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

Cons of Symmetric Cryptography

A
  • Weak authenticity
  • Weak integrity
  • Difficult to manage and distribute the secret keys
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe

One-Time Pad

A

When a random key is chosen and used once for each message

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

How long is a one-time pad?

A

As long as the message itself (revealing the length of the message)

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

What type of secure are one-time pads?

A

IND-CPA and IND-KPA

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

What are the limits to one-time pads?

A
  • Must be truly random and independent
  • Requires secure distribution of secret keys
  • A large message would make a difficult one-time pad to manage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Define

IND-KPA

A

When attacker can’t distinguish between 2 encryptions of the same key while knowing 2 plaintexts

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

Define

IND-CPA

A

When the attacker can’t distinguish between encryptions of different plaintext under the same key while knowing ciphertexts

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

Which is stronger between IND-CPA and IND-KPA?

A

IND-CPA

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

What does IND-CPA imply?

A

That IND-KPA also holds true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
# Describe Caesar Cipher
Rotation of letters by the kth position
24
How can you defeat a Caesar Cipher?
* Brute force * Frequency analysis * Known plaintext attacks * Chosen plaintext attacks
25
# Upgrade Caesar Cipher
Rotate the first character by K1 position, the second character by K2 position, ... the nth character by Kn position
26
# Describe Block Cipher
A determinalistic algorithm on a fixed block/length of bits
27
A Block Cipher is not what type of secure?
IND-CPA
28
Using a Block Cipher: short message
Includes padding
29
Using a Block Cipher: long message
Repeat block cipher (Block Cipher Mode) and hide the same block encrypted twice along with inital vector (IV) for randomness
30
Block Cipher Modes
* Electronic Code Block (ECB) * Cipher Block Chaining (CBC) * Counter (CTR)
31
# Describe Electronic Code Block (ECB) Mode
The message is split into n-bit blocks where each is independently encrypted/decrypted. All blocks will then be concatenated (output)
32
# Describe Cipher Block Chaining (CBC) Mode
Uses a one time initial vector and includes the output of the previous block as input for the current block
33
What type of secure is the CBC Block Chaining Mode?
IND-CPA
34
# Describe Counter (CTR) Mode
Selects a random initial vector and increments it for each block
35
What type of secure is the CTR Block Chaining Mode?
IND-CPA
36
# Define Key
A randomly chosen value
37
# Define Cryptoanalysis
Analysis of the algorithm/implementation to interfere with cryptography
38
List all cryptographical algorithms
* Symmetric * Asymmetric * One-Way Function * One-Way Hash Function
39
# Define One-Way Function
A computation that is difficult to inverse
40
# Define One-Way Hash Function
Given any string input, a fixed binary sequence random output would be returned
41
Two ways to preserve integrity and authentication in cryptography
Strong hash functions and message authentication code (MAC)
42
Why are strong hash functions not sufficient for cryptography?
Strong hash function values can be guessed
43
Properties of a strong hash function
* One-way: given y, it's difficult to find x * Collision resistance: difficult to find x, x' * Second pre-image resistance: given x, it's difficult to find x'
44
# Describe Message Authentication Code (MAC)
A tag that verifies authentication and requires a shared secret key
45
# Define Asymmetric Cryptography
Encrypting a message with recevier's public key and decrypting the message with receiver's private key
46
Requirements for asymmetric cryptography
* Key Generation: public key can't compute the secret key (or vice versa) * Trapdoor permutation: 1-way perm without special instructions
47
# Describe RSA Key Generation | Asymmetric Cryptography
Uses Euler's Toitent to create the keys
48
# Describe Euler's Totient
Finding two very large prime numbers
49
Pros of Asymmetric Cryptography
* Secure key distribution * Confidentiality
50
Cons of Asymmetric Cryptography
* Weak integrity * No authentication * Repudiation (can be seen as falsified)
51
# Define Diffie-Hellman Key (DHK) Exchange
The same secret key is shared
52
Limitations of Diffie-Hellman Key (DHK) Exchange
* No authenticity * Subject to MITM attacks (doesn't verify who's involved)
53
# Define Ephemeral Diffie-Hellman Key (EDHK) Exchange
Temporary DH key (shared secret key) generated for every connection
54
Limitations of the Ephemeral Diffie-Hellman Key (EDHK) Exchange
Higher overhead costs
55
What does the Ephemeral Diffie-Hellman Key (EDHK) Exchange provide?
Forward secrecy
56
# Define Forward Secrecy
When future compromises of passwords/secret keys from previous sessions cannot be used to retrieve encrypted sessions/communications from the past.
57
# Define RSA Signature
A verifiable message that anyone can prove that a private key was used (digital signature algorithm)
58
# Upgrade Asymmetric Cryptography Approach
A encrypts message with A's secret key => A encrypts message again with B's public key => B decrypts ciphertext with A's public key
59
Limitation to the Upgraded Asymmetric Cryptography Approach
MITM attacks can still occur
60
What does the Upgraded Asymmetric Cryptography Approach resolve?
CIA and repudiation concerns
61
# Describe Public Key Certificates
Binds an identity with their public key and prevents interception by endorsing/guaranteeing legitimacy from the Certificate Authority (3rd party)
62
How does the Certificate Authority publish their own certificate?
Self-sign or have it signed by another Certificate Authority (company)
63
Why do Certificate Authorities have to publish their own certificates?
To avoid interception