LECTURE NOTE 4 Flashcards
(19 cards)
What is padding in block ciphers?
Extra bytes added to the last block to make it the right size for encryption.
How does PKCS#7/PKCS#5 padding work?
Add c bytes, each with the value c (the number of padding bytes needed).
What’s the difference between symmetric and public-key cryptography?
Symmetric uses the same secret key for both encrypting and decrypting; public-key uses a pair of keys (public and private).
What is the main advantage of public-key cryptography?
You don’t have to secretly share keys with everyone—just publish your public key!
How many keys does each person need in public-key crypto?
Two: a public key (shared with everyone) and a private key (kept secret).
What are the main uses of public key cryptography?
Encryption (for secrecy), digital signatures (for authentication and non-repudiation), and key distribution.
How does public key encryption provide confidentiality?
Anyone can encrypt a message with your public key, but only you can decrypt it with your private key.
What is a digital signature?
A way to “sign” a message with your private key so anyone can check it with your public key, proving you sent it.
Why is public key crypto slower than symmetric crypto?
It uses more complex math, so it’s often used just to set up a secret key for faster symmetric encryption.
What is a one-way function in cryptography?
A math problem that’s easy to do one way but super hard to reverse (unless you know a secret).
What are the three main families of public-key crypto?
Integer factorization (RSA), discrete logarithms (Diffie-Hellman/DSA), and elliptic curves (ECC).
Why do asymmetric keys need to be longer than symmetric keys?
Because the math problems are easier to attack than just guessing random keys, so longer keys are needed for the same security.
How big should RSA keys be for strong security?
At least 2048 bits (NIST recommends 2048 bits since 2015).
Which public-key method gives strong security with shorter keys?
Elliptic curve cryptography (ECC).
What does Euler’s Totient Function φ(N) count?
How many numbers less than N are relatively prime to N (no common factors except 1).
What is φ(p) if p is a prime?
φ(p) = p – 1
What are the public and private keys in RSA?
Public key: (e, N). Private key: (d, N).
How do you encrypt a message M in RSA?
C = M^e mod N
How do you decrypt a ciphertext C in RSA?
M = C^d mod N