Misc Flashcards
Modular inverse e.g 3^(-1) mod 7 means solving…
3 • x == 1 mod 7
Euler phi function phi(n) counts …
Number of integers between 1 and n that are relatively prime to n.
Chinese remainder theorem can be used to solve…
System of congruences with different moduli
Substitution cipher is vulnerable to …
- Frequency analysis attack (analysis of frequency of characters in ciphertext and matching to known letter frequency)
- Known plaintext attack (if the attacker knows part of plaintext e.g ‘May this email find you well’)
- Chosen ciphertext attack (same as known, achieved through social engineering)
Shift cipher is most vulnerable to…
Brute force (exhaustive search) because of very small key space
In a One-Time pad, the key must be at least as long as the message.
True
4 goals of cryptography
- Confidentiality (data only to authorized users)
- Integrity (guarantee that data is untampered during transmission/storage)
- Authentication (sender/receiver are who they claim to be)
- Non-repudiation (prevents denial of involvement in transaction with proof of origin or receipt that cannot be disputed, forced accountability)
Passive attacker threatens which goal?
Confidentiality
Active attacker threatens which goal?
All of them
What are pros and cons of symmetric key cryptosystems?
Pro: very fast
Cons: key management (ever user pair needs key O(n^2)
What is Kerckhoff’s Principle?
Security should only depend on the key itself. Assume attacker knows what algorithm is being used.
What is Square and Multiply used for?
Solve a^b mod n for a large exponent b
What is the concept of diffusion?
One character change in plaintext should affect as much ciphertext characters as possible
What is the concept of confusion?
The key/plaintext shouldn’t relate to ciphertext in a simple way
An affine cipher can be broken with 2 plaintexts.
True
Solving -21 mod 26 means…
Adding 26 to -21 until we get a positive result [0, 25]
RSA is secure under assumption that …
Factorization is hard
Diffie-Helman is secure under the assumption that …
Discrete log problem is hard
Rabin cryptosystem is secure under the assumption that …
Factorization is hard (factoring large composites)
Rabin is secure against passive adversary.
True
What are timing attacks?
By measuring time required to perform decryption, an attacker can figure out the private key
Name 2 countermeasures to timing attacks
- Constant exponentiation time
- Random delays
2 ways to break RSA without factoring n
- Low exponent attack
- Common modulus attack
Describe forward search attack
If message space is small, attacker can create dictionary of encrypted messages (since pk is known, encrypt all possible messages and store). When attacker seems a message, it can compare to encrypted and find out the message.
RSA and Rabin both susceptible to …
Chosen ciphertext attack
MAC ensures…. BUT NOT …
Authenticity and integrity BUT NOT non-repudiation
Purpose of ‘salt’ in hashing?
Identical x’s will result in different hashes due to salt
Describe offline dictionary attack
Attacker retrieves hashed password database, go offline and compute hash (with same algorithm used by system) for common passwords to compare with db records
Which is better for confidentiality: H(M) or MACk2(M)
MAC because H(M) is unkeyed so attacker can guess M
Name 3 adversarial goals:
- Total break (attacker finds secret for signing, so can forge any signature)
- Selective forgery (attacker able to create valid signatures on message chosen by someone else)
- Existential forgery (attacker can create a pair message, signature such that the signature of message is valid)
Does a Hash provide 1. Integrity, 2. Authentication 3. Non-repudiation. Which type of key is used?
Yes to integrity. No to authentication and non-repudiation. Unkeyed.
Does a MAC provide 1. Integrity, 2. Authentication 3. Non-repudiation. Which type of key is used?
Yes to integrity and authentication, no to non-repudiation. Symmetric keys.
Does a Digital Signature provide 1. Integrity, 2. Authentication 3. Non-repudiation. Which type of key is used?
Yes to integrity, authentication and non-repudiation. Asymmetric keys.
Digital signatures prevent replay attacks
False
Describe a replay attack
- Attacker intercepts valid communication
- Attacker replays message/request (e.g login attempt, payment authorization, command) at later time to impersonate sender
- System treats replayed message as legitimate and performs intended action
Rabin and RSA are examples of …
Public-key cryptosystems that provide encryption and digital signatures
In crowds, jondos know the final destination of messages
True
In RSA, key setup operations are performed by the sender
False
Weak collision
Given an arbitrary x1, it is hard to find an x2 such that h(x1) = h(x2)
Strong collision property
There exists no x1 and x2 such that h(x1) = h(x2)