Encryption and compression - 96 - 99 Flashcards
(33 cards)
What is the trade-off between when compressing files?
The quality of the file and the amount of processing power that will be needed to compress/decompress
What does lossy compression involve?
reduces file size by permanently discarding some data, typically information deemed less important or undetectable to the human eye
- original can’t be recovred
What does lossless compression involve?
The original data can be fully recovered if lossless compression has been used
- redundant / less important data removed
when is lossy compression used
sound and images
- in executable file, where all data is necessary
advantages of lossy compression
we can get a considerable reduction in file size and the user will notice no difference in quality
Faster Transfer and Loading
Suitable for Various Applications:
Lossy compression is well-suited for situations where some data loss is acceptable, such as web graphics
examples of lossy file formats
JPEG
MPEG
MP3
advantages of lossless compression
allows the original file to be recreated exactly
data integrity, perfect restoration, and quality preservation
how does lossless compression work
- by using redundant data
- for example, if an item occurs multiple times, then the actual item will only be stored and sensed once
example of dictionary coding formats
- ZIP
GIF
PNG
examples of lossless compression
Dictionary coding and run length encoding
How does dictionary coding work?
substrings of original data are represented by
single tokens;
A dictionary is formed using the tokens as the keys;
The strings of symbols are used as the entries;
how does run length encoding work
- a run is a sequence of the same colour
- the number of consecutive pixels of the same colour would need to be counted
- eg 7 Yellow
when is run length encoding used
source code,images
what is encryption
converting a message into a form that is only understandable by the intended parties
summarise the method of encryption
the sender will apply an encryption key to a plaintext message, the recipient receives the encrypted message and uses a decryption key to see the plaintext
disadvantages of the caesar cypher
- easy cipher to crack
- only 25 possible shifts
- Very easy to break with modern techniques; brute-force or frequency analysis can quickly reveal the key.
how to provide perfect security
- if the encryption key (one time pad) is equal to or longer than the plaintext message
- if the key is truly random
- if the key is used only once and then destroyed
whats the difference between the Vernam cipher and all the others
nothing can be learnt about the plaintext using the ciphertext
- others are based on computational theory and can be cracked in poly time
what is compression
reducing file size
advantages of dictionary based compression
a pre existing dictionary may exist so the encoder might not have to make a new one
- Efficient Compression:
This approach is particularly effective for data with repeating patterns, such as text files, images, and multimedia files. - Lossless Compression:
Dictionary-based compression ensures that no data is lost during the compression process.
The original data can be perfectly reconstructed after decompression, making it suitable for critical applications where data integrity is paramount. - Fast Decompression:
Many dictionary-based compression algorithms are designed for fast decompression. - Versatility and Adaptability
Why is the Vernam cipher considered as a cipher with perfect security?
- because if the key (one-time pad) is truly random, at least as long as the message, and never reused, then the cipher
How do you encrypt a plaintext message using the Caesar cipher?
each letter in the plaintext is shifted 5 places down the alphabet.
ciphertext
encrypted version of plaintext
plaintext
the original, readable text or message