3.0 KiB
3.0 KiB
CSE4303 Introduction to Computer Security (Lecture 5)
Cryptography: Foundations
Definitions
Cryptography is the study of techniques that enable secure communication and computation in the presence of adversaries, by providing formal guarantees such as confidentiality, integrity, and authenticity.
Cryptanalysis is the study of techniques for breaking cryptographic systems, by recovering secret information or violating security guarantees without knowing the secret key
Background: security guarantee
- Well-defined statement about difficulty of compromising a system
- ...with clear implicit or explicit assumptions about:
- Parameters of the system
- Threat model
- Attack surfaces
- ...with clear implicit or explicit assumptions about:
- Example: "A one-time pad cipher is secure against any cryptanalysis, including a brute-force attack, assuming:
- the key is the same length as the plaintext,
- the key is truly random, and
- the key is never re-used.
- Example: "Given that keys remain uncompromised (by human error, side channel, etc.), recovering an RSA private key from a given public key is at least as hard as integer factorization."
- I.e. we can reduce RSA to integer factorization.
- Note: correct implementation is not guaranteed!
- Non-example: "This app is secure."
- Empty claim: what does it mean?
Overview: Encryption and Decryption
- The message m is called the plaintext.
- Alice will convert plaintext m to an encrypted form using an encryption algorithm E that outputs a ciphertext c for m
Cryptography goals
- Confidentiality:
- Mallory and Eve cannot recover original message from ciphertext
- Integrity:
- Mallory cannot modify message from Alice to Bob without detection by Bob
- Authenticity:
- Mallory cannot craft a message that Bob would accept as coming from Alice
Cryptosystem compoents
- The set of possible plaintexts (M)
- The set of possible ciphertexts (C)
- The set of encryption keys (K)
- The set of decryption keys (usually K as well)
- The correspondence between encryption keys and decryption keys
- The encryption algorithm to use (E)
- The decryption algorithm to use (D)
Symmetric ciphers:
A cipher defined over (K,M,C) is a pair of efficient algorithms (E,D) where E: K\times M\to C and D: K\times C \to M
Correctness Property:
\forall m\in M, \exists k\in K, E(k,m) = c\in C, and D(k,c) = m
DandEare often efficient (polynomial time | concrete time)Eis encryption, often randomized.Dis decryption, always deterministic.
Threat models
Attackers may have:
- collection of ciphertexts (ciphertext-only attack)
- collection of plaintext/ciphertext pairs (known plaintext attack: KPA )
- collection of plaintext/ciphertext pairs for plaintexts selected by the attacker (chosen plaintext attack: CPA )
- collection of plaintext/ciphertext pairs for ciphertexts selected by the attacker (chosen ciphertext attack: CCA/CCA2 )
Symmetric (shared-key) encryption
Refer to this lecture notes