18. Data compression and encryption algorithms Flashcards
What is compression?
The act of making file size smaller.
What does it mean when compression is lossless?
No data is lost in compression and original can be recreated exactly.
What does it mean when compression is lossy?
Data deemed non-essential is deleted.
An exact replica can not be recovered.
Run length encoding is a compression technique.
Explain how it is performed?
Searches for patterns in code that can be shortened.
What is encryption?
The conversion of data into a form that is difficult to read by an unauthorised third party
What is decryption?
The process of turning scrambled data into data that can be understood
What is a cipher?
The algorithm for encryption
What is a key? - In terms of encryption and decryption
The secret information used to encrypt / decrypt the data
What is plaintext?
The original form of data
What is cipher text?
The encrypted data
How does a caesar (shift) cipher work?
Shifts letters across a few places in the alphabet to create a cipher text
In which direction would a positive shift go?
A –> B
In which direction would a negative shift go?
A
How does a keyword cipher work?
Use of a keyword to fill in the first few spaces in the alphabet, then fill the rest in in alphabetical order
Explain dictionary based compression?
Lossless.
Uses common strings of characters.
Identify common patterns and create a dictionary value based upon this.
what is encryption and why is it used?
encryption is the conversion of data into a form that cannot be read by a third party
why are substitution ciphers, caesar cipher relatively easy to crack?
frequency analysis can be used to identify patterns in cipher text
(brute force methods)
e.g E and T are the most commonly used letters in the english alphabet
explain how vernam ciphers work
based on the principle that each plaintext character from the message to be encrypted is combined with one character from a key (XOR)
if a random key is used the result will be a random cipher text which bears no relation to the original plaintext
why is it said that a vernam cipher is theoretically unbreakable?
‘one time’ pads are used in vernam ciphers.
as long as the pads are unique and never re used, no statistical analysis or pattern matching techniques can be applied.
making a vernam cipher theoretically unbreakable
identify the two commonly used methods to crack codes
frequency analysis and dictionary attacks
what are public and private keys and how are they used?
in public key encryption, the recipient generates two keys together, a public encryption key and a private decryption key
the message is encrypted with the public key and can only be decrypted with the private key
strengths of lossy compression
uses less space when stored
quicker to transmit because smaller
limitations of lossy compression
permanently loses quality when compressed that cannot be restored when decompressed
cannot be used on data where every bit is integral to the end product, i.e. text documents or source code
strengths of lossless compression
user has the ability to keep all the original data and revert to the original
limitations of lossless compression
Larger files than if you were to use lossy compression
lossless compression can only be used once, whereas lossy compression can be used multiple times on a piece of data