Classical encryption Flashcards
What is cryptography?
The study of designing crypto-systems
What is cryptoanalysis?
The study of breaking cryptosystems
What is secret writing?
Transformation of data using a secret called the key
What can cryptography provide?
Confidentiality: A key is needed in order to read the message
Authentication/ (integrity): A key is needed in order to write the message
What does a cryptosystem consist of?
Plaintext
Ciphertext
Keys
Encryption function
Decryption (inverse function)
What is symmetric key cipher (private key cipher)?
Enc and Dec keys only known to sender and receiver
The key must be communicated over a secure channel,
single-key
P -> (key) -> C -> (key) -> P
What is asymmetric key cipher (public key)?
Each participant has private and public key
Used for encryption of messages, and creation of digital signatures
P -> (public key) -> C -> (private key) -> P
How does digital signatures work?
Message -> Hash
Sign w/private key
Verify with public key
What is brute force attack (exhaustive key search)?
An attack where the adversary tries all keys.
This attack cannot be prevented, so all cryptosystems must have enough keys to make this too difficult computationally.
Prevention of this attack is a minimum standard
What are the 4 types of attacks?
Known ciphertext: Know only C
Known plaintext: Know small amount of P, and its equivalent C
Chosen plaintext: Attacker can obtain the C of some chosen P. Has inside encryptor
Chosen ciphertext: Attacker can obtain some P of some chosen C. Has inside decryptor.
Which attacks should cryptosystems prevent, by the modern standard?
Chosen plaintext and chosen ciphertext
What is Kerckhoffs principle?
An attacker has complete knowledge of how the cryptosystem works. The key is the only unknown thing.
What is security through obscurity?
Systems that tries to be secure by going against Kerckhoffs principle. Meaning they try to stay secure by keeping parts of their cryptosystem hidden, and relying on this to be enough to be secure.
What is transposition?
The characters in the plaintext are mixed up with each other (permuted)
What is substitution?
Each character (or set of characters) is replaced by a different character (or set of characters)
How does transposition ciphers work?
Permutes characters usually in a fixed period d and permutation f
The plaintext can be seen as a matrix of rows of length d
Generally transposition ciphers can permute rows or columns and output in row or column order.
Key: the pair d and f, where f is a certain permutation of the plaintext, and d is the length of the permutation (period ?)
Each block of d characters is re-ordered using the permutation f
Do a cryptanalysis of transposition ciphers
Frequency of distribution of chars are the same.
If the period d is small, then the ciphers can be solved by hand using the process of anagramming (restoring disarranged characters to their original position).
we can guess the value of d and write the ciphertext in columns so that there are d columns
Knowledge of plaintext lamguage digrams and trigrams can optimize trials.
This process can be automated.
Describe substitution ciphers
Each char is replaced by a char in the Y-alphabet, as defined by a substitution table
Simple ciphers are called monoalphabetic sub. ciphers
What is the difference between transposition and substitution ciphers?
t permute plaintext chars, while s permute alphabet chars
How does the Caesar cipher work?
Move the ith letter of the alphabet to the (i+j)th letter.
Key: j
Enc: c_i = (ai + j) mod n
Dec ai = (ci - j) mod n
where n is the size of the alphabet
Do a cryptanalysis of the Caesar cipher
We only need to find where one of the most frequent chars is shifted to.
See what the key becomes when shifting the most common char to the theoretically most common alphabet char. Then use this key to decrypt.
This can be tried until the correct plaintext has been found
What is the random simple substitution cipher?
A cipher that assigns a random char of the alphabet to another char of the alphabet.
Enc and Dec are defined by the substitution table which randomly permutes the alphabet
If alphabet has 26 chars, there are 26! keys
Caesar is a special type of this cipher
Is still vulnerable to statistical methods of cryptoanalysis