Lecture 1 and 2: Intro Flashcards

1
Q

Explain meaning of “cryptography” and “cryptanalysis”

A

Cryptography: Protection side
Cryptanalysis: Attacker side, trying to find weakness’

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

Explain the terms “secret key” and “public algorithm”

A

Secret keys: The key should be kept secret, be known only to authorised users
Public algorithm”: The algorithm should be public, accessible to all. E.g., to facilitate standardisation and transparency

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

Explain difference between asymmetric and symmetric encryption

A

Asymmetric: A key pair of a public key and a private key is used, where the recipients public key is used to encrypt the message which can then only be decrypted with the recipients private key
Symmetric: The same key is used for both encryption and decryption

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

What are some requirements for communication with symmetric encryption?

A
  • Strong encryption algorithm
  • Secure key transfer
  • Keeping key secure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain some basic methods of cryptanalysis

A
  • Rely on nature of algorithm
  • Use knowledge of plaintext characteristics
  • Use sample plaintext-cipher text pairs
  • Exploit characteristics of algorithm to deduce plaintext or key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give examples of mathematical properties used in encryption

A
  • Factoring: given N=pq, p
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain Message Authentication, and what is is used for

A
  • Protects against active attacks
  • Verifies that received message is authentic
  • Can use conventional encryption, or
  • Separate authentication mechanisms
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are three requirements in order for a message to be “authentic”?

A
  • Contents unaltered
  • From authentic source
  • Timely and in correct sequence
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain how Message Authentication Codes are used, a problem linked to using them, and how this problem is solved

A
  • Sender has message, and appends MAC with algorithm
  • Receiver uses algorithm to calculate MAC of message, and then compares this MAC to the one received
  • Problem: malicious users can intercept, change message, and apply new MAC
  • Solution: Use keys to encrypt message
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain what a Secure Hash Function does, and its most important feature

A
  • A secure hash function turns an arbitrarily long message into a fixed-length hash
  • Hash functions work one way only, the hash cannot be reversed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain some hash function requirements

A
  • Applied to any size data
  • H produces fixed-length output
  • H(x) is relatively easy to compute for any given x
  • One way property
  • Weak collision resistance; infeasible to find y ≠ x such that H(y) = H(x)
  • Strong collision resistance; infeasible to find any pair (x, y) such that H(x) = H(y)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Explain how the private and public keys in RSA are created

A

Choose two random prime numbers.:
p=61
q=53

n=pq
n=61∗53=3233

Compute the totient
ϕ(n)=(p−1)(q−1)
ϕ(n)=(61−1)(53−1)=3120

Choose e>1 coprime to 3120
e=17
Choose d to satisfy de modϕ(n)≡1

d=2753
17∗2753=46801=1+15∗3120

The public key is (n=3233,
e=17).

For a padded message
m, the encryption function
c=m^e mod n becomes:
c=m^17 mod 3233

The private key is (n=3233, d=2753).

The decryption function
m=c^d mod n becomes:

m=c^2753 modn 3233

For example, to encrypt
m=123, we calculate c=123^17 mod 3233=855

To decrypt c=855, we calculate

m=855^2753 mod 3233=123

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

Explain a “Certificate”, its uses and the process of appending one to a message (when sending a message)

A
  • It is used to ensure that certain properties, that have been certified by a central authority, are valid

Process:
o Hash our certificate
o Encrypt using private key, derived from certificate authority
o Then, we take the encrypted value and append it to our certificate
o Now, recipient can use the public key from certificate authority to get out hash
o Can then compare this with expected value

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

Explain a “Digital Envelope”, what it’s used for and how it works

A
  • Used to improve speed/performance, compared to using asymmetrical keys
    Process:
  • Sender creates message and appends secret key
  • Encrypt this message with secret key, creating cipher text
  • Encrypts secret key with public key of recipient
  • Recipient uses their private key to decrypt the message, and retrieve the secret key
  • The secret key can now be used for symmetrical encryption of messages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Explain the Diffie-Hellman algorithm, how it works

A
  • Choose q, a so that q is prime, a is primitive root of q
  • User A generates key: choose private X_A < q, calculate public Y_A = a^X_A mod q
  • User B: private X_B < q, public Y_B=a^X_B mod q
  • Exchange public Y
  • User A calculates secret key: K=Y_B^X_A mod q
  • User B: K=Y_A^X_B mod q
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Explain a “Man-in-the-middle attack”

A

(- Problem for Diffie-Hellman)

  • A malicious attacker intercept communication between A and B
  • By intercepting, copying, and forwarding the key-exchanges between A and B, the attacker gains access to secrets
  • Since the attacker, after copying the keys, forwards them to their intended recipient, users A and B might not notice the attack
  • All subsequent communication between A and B is compromised