Encryption Flashcards
What is encryption?
The process of turning plaintext into cyphertext, which can only be understood by decrypting again
What is decryption?
The process of deciphering encrypted data
What is plaintext?
Data that is in a form readable by humans
What is ciphertext?
Data that has been encrypted
What is a key?
The data that randomises the encryption of a string
Explain how a Caesar cipher works
Each letter is shifted forwards or backwards by a set amount, i.e. a shift of two to the right would result in all Zs being replaced by Bs, all As being replaced by Cs, etc.
Explain how a substitution cipher works
A random mapping of one character to another is created, and characters are replaced according to this mapping
Explain how a polyalphabetic cipher works
It is similar to a substitution cipher, except it is passed through multiple different mappings. For example, an A may become an M according to the first mapping, and this M may become a G according to the second mapping, etc. As such, all mappings are required to decrypt the ciphertext
What is frequency analysis?
The study of how often different characters are used
Why are substitution ciphers considered weak?
Frequency analysis can be performed to make educated guesses about what each character decodes to, i.e. the most frequent character is most likely to be an E
What is a transposition cipher?
A cipher that arranges the plaintext characters in some pattern and then reads this in such a way that the letters are jumbled
Explain how a rail fence cipher works
The plaintext is written downwards and diagonally on successive “rails” of an imaginary fence, returning to the top when the bottom rail is reached. The message is then read off in rows. For example, “example” may have a top row of “eme”, a second row of “xp”, and a third row of “al”, making the ciphertext “emexpal”
Explain how a route cipher works
The plaintext is put into a grid, then read off in a pattern given in the key, i.e. “spiral inwards, clockwise, starting from the top right”
What is a one time pad?
A key that is only used to encrypt and decrypt a message once, before being discarded
Explain how a Vernam cipher works
A one time pad which is as long as the plaintext is used. Each character in both the plaintext and the key is converted to a binary value (i.e. using ASCII), and then a logical XOR is used on these binary representations to produce a new binary code, which maps back to different characters. To decrypt the ciphertext, an XOR is used again on the binary representations of the ciphertext and the key