LECTURE NOTE 4 Flashcards

(19 cards)

1
Q

What is padding in block ciphers?

A

Extra bytes added to the last block to make it the right size for encryption.

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

How does PKCS#7/PKCS#5 padding work?

A

Add c bytes, each with the value c (the number of padding bytes needed).

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

What’s the difference between symmetric and public-key cryptography?

A

Symmetric uses the same secret key for both encrypting and decrypting; public-key uses a pair of keys (public and private).

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

What is the main advantage of public-key cryptography?

A

You don’t have to secretly share keys with everyone—just publish your public key!

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

How many keys does each person need in public-key crypto?

A

Two: a public key (shared with everyone) and a private key (kept secret).

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

What are the main uses of public key cryptography?

A

Encryption (for secrecy), digital signatures (for authentication and non-repudiation), and key distribution.

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

How does public key encryption provide confidentiality?

A

Anyone can encrypt a message with your public key, but only you can decrypt it with your private key.

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

What is a digital signature?

A

A way to “sign” a message with your private key so anyone can check it with your public key, proving you sent it.

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

Why is public key crypto slower than symmetric crypto?

A

It uses more complex math, so it’s often used just to set up a secret key for faster symmetric encryption.

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

What is a one-way function in cryptography?

A

A math problem that’s easy to do one way but super hard to reverse (unless you know a secret).

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

What are the three main families of public-key crypto?

A

Integer factorization (RSA), discrete logarithms (Diffie-Hellman/DSA), and elliptic curves (ECC).

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

Why do asymmetric keys need to be longer than symmetric keys?

A

Because the math problems are easier to attack than just guessing random keys, so longer keys are needed for the same security.

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

How big should RSA keys be for strong security?

A

At least 2048 bits (NIST recommends 2048 bits since 2015).

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

Which public-key method gives strong security with shorter keys?

A

Elliptic curve cryptography (ECC).

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

What does Euler’s Totient Function φ(N) count?

A

How many numbers less than N are relatively prime to N (no common factors except 1).

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

What is φ(p) if p is a prime?

A

φ(p) = p – 1

17
Q

What are the public and private keys in RSA?

A

Public key: (e, N). Private key: (d, N).

18
Q

How do you encrypt a message M in RSA?

A

C = M^e mod N

19
Q

How do you decrypt a ciphertext C in RSA?

A

M = C^d mod N