Compression and Encryption Flashcards
What is the advantages of compression?
- less space required to store information
- more files can be stored
- less bandwidth used in transmission
- reduce congestion
- increased transmission speed
- improves playback with less buffering
- multiple files can be stored in a single archive
What is data compression?
Compression software uses algorithms to remove repeated or unnecessary data, to reduce the number of bits/bytes to store the file
What files can and cannot be compressed?
- All can be compressed but only some use lossy compression e.g. audio, images
- Text files can be compressed
What is the difference between lossy and lossless compression?
Lossy: permanently losing information in order to reduce file size, e.g. reduce resolution in images or sound
Lossless: using algorithms to efficiently represent repeating patterns without losing data e.g. in text and EXE
What is run-length encoding?
- reduce file size of a file by removing repeated information by replacing it with one example of what needs to be run followed by the number of times it needs to be run
- not all data suitable if no repeating patterns
What are dictionary-based methods?
- Words are stored in a dictionary, each with an **index number pointing to it **
- The text is then encoded using the dictionary index values to represent each word
- Dictionary must also be sent with the original file
- Works best for long documents with many common words (not short texts with little repetition)
What is encryption?
- process of converting plaintext to ciphertext so it is not understandable if intercepted during transmission without the key
Define plaintext, ciphertext and cipher.
Plaintext: unencrypted information
Ciphertext: encrypted information
Cipher: encryption algorithm used
How does Caesar ciphers work?
- substition cipher / shift cipher where key is distance that each letter is shifted by
- e.g. key of +8 shifts it right 8, with loop from Z to A
Why are Caesar ciphers bad?
- not computationally secure
- frequency analysis used to find common letters e.g. many E’s
- finding one gives you whole key
- can use crypt analysis (brute force) to break quickly
How do Vernam ciphers work?
1) Align plaintext and key (both in binary and key.Length >= plaintext.Length)
2) Apply logical XOR bitwise on each
3) Convert binary back to characters
Why is a Vernam cipher secure?
- key is generated randomly
- cannot be cracked in a reasonable timeframe with current computing power (computationally secure), perfectly secure
- only known computationally secure cipher
What is computational security?
If a cipher cannot be cracked within a reasonable timeframe with current computing power, it is computationally secure.
Why is the Vernam cipher perfectly secure?
MARK SCHEME:
- Brute force would not work as key is randomly chosen, too many possible keys to try all of them (and multiple plaintexts can be derived)
- Different plain text letters can map onto the same plaintext letter, so frequency analysis does not happen as cipher text letters have uniform probability
What is run-length encoding in images?
- Stores the colour of a pixel and a count, where the count is the total numbers of pixels of that pixel’s colour in a run until the next different coloured pixel