What is SSL/TLS ?
It’s a protocol used to establish secure communications on the web
How does SSL/TLS establish secure communication ?
TLS establishes secure comms in two parts:
1. It uses a handshake protocol to create a shared secret key using public key cryptography
2. A record layer to securely transmit the data using the shared secret key
What are some applications of cryptography ?
What are the 3 steps when introducing new cryptographic primitives ?
What is a cipher ?
A pair of algorithms used to encrypt and decrypt data
What is perfect secrecy of a cipher ?
Its property of ciphers which states that a given cipher-text should reveal no information about its plaintext
What does Shannon’s bad news lemma prove ?
It shows that every cipher with perfect secrecy has a key length which is greater than or equal to the length of the message
What is a stream cipher ?
A cipher that uses a pseudo random generator to generate a much shorter key which is used to encrypt and decrypt messages. The drawback is that such a cipher cannot achieve perfect secrecy, due to Shannon’s proof.
What should a programmer keep in mind with stream ciphers ?
The same key should not be used more than once
* For network sessions always negotiate a new key
* Stream ciphers should typically not be used for disk encryption
What do we mean when we say a PRG is indistinguishable from random, what does this prove ?
Indistinguishable from random is a property that proves just how secure a PRG is. We say a PRG is IFR, if the output of the PRG (derived from a subset K) cannot be distinguished from the output of a uniform distribution (derived from a larger set which contains K).
What is a secure prg ?
A PRG is said to be secure if for all efficient statistical tests the advantage is negligible. ie no efficient statistical tests exists that can distinguish the output of the PRG from random.
What is a semantically secure cipher ?
A cipher is said to be semantically secure if for all efficient adversaries the advantage is negligible.
What is perfect secrecy (Shannon Cipher)
Its a property of a cipher such that it is difficult to guess a message from its given cipher-text
What is a block cipher ?
Its a cipher that takes in n bits of input at a time and maps that to exactly n bits of output (cipher text). Hence the term block (a set of n bit strings)
What is the intuition behind security in a block cipher ?
Simply put a block cipher is secure if it is computationally indistinguishable from a random permutation
List some attacks on block ciphers
What is a Chosen Plaintext Attack ?
A CPA is a kind of cryptanalysis attack where the adversary has the ability to choose and encrypt plain text messages of their choice and recover the corresponding ciphertext
How can a cipher protect against CPA attacks ?
There are 2 ways:
1. Using a randomized algorithm; this works by choosing a random string r from a space R, and this string is used to encrypt the plaintext. The only security requirement for this method is that the space R be significantly large enough, so that there are no repetitions.
nonce as an additional input to the key and message, to carry out encryption or decryption.When using Cipher Block Chaining mode, what are two ways to guarantee CP (Chosen Plaintext) security
nonce, but the nonce must be encrypted using a separate key. This means the cipher will require two purpose keys. One for encrypting the message blocks and the other for encrypting the nonce.When is a MAC (Message Authentication Code) secure ?
A MAC is secure when it is unforgeable under a chosen message attack
Briefly describe the Carter-Wegman MAC
The Carter-Wegman MAC is a construction that builds a many time mac from a one time mac. It does so by using a random nonce
What is the Merkle Damgard Paradigm ?
The Merkle Damgard paradigm is a mathematical construct that allows us design a hash function for large messages from a hash function for small messages.
Briefly describe the Davies-Meyer compression function
The Davies-Meyer compression function provides a construct that allows one build a secure hash function from a block cipher. It takes as input some message m and a chaining function H and encrypts the result of the chaining function using the message block as a key. The final output is Xored with the output of the chaining function. H(m,h).= E(m, H) Xor H
What guarantee does CPA-Secure (Chosen Plain Text Security) encryption provide ?
CPA-Secure encryption only provides confidentiality and not integrity. Security is only guaranteed provided an adversary is only eavesdropping. It is broken when the adversary can tamper with the ciphertext enroute.