Chapter 15 Compression,Encryption,Hashing Flashcards
Why were file compression techniques created?
Reduce storage space on secondary storage, easier and quicker transmission, often easier to work with compressed files
Why are compression techniques useful on the internet?
Quicker transmission and less bandwidth used. This means less charge for using mobile phone networks. Also websites require quick loading to reduce buffering.
Why does compression do?
Reduces file sizes?
What are the two types of file compression techniques?
Lossy and lossless
What is lossy compression?
involves removing unnecessary data to reduce file size. The original data cannot be recreated
Examples of lossy compression? - file types
MP3,MP4 - audio
JPG,GIF - images
How is MP3 a type of lossy compression?
As frequencies outside of human hearing range are removed and quiet sounds played at the same time as loud ones are also removed
Where is lossy compression used on the internet?
Voice chat, quality noticeably removed but we can still hear the person
Advantages of lossy compression?
- compressed files uses less bandwidth when shared over internet
- takes up less storage space
- overall output quality is usually acceptable
Disadvantages of lossy compression?
- depending on degree of compression quality may be of very low standards
- cannot recreate original quality/file
What is lossless compression?
involves reducing file size in a way that means it can be reconstructed without any data loss
Examples of lossless file types?
WAV FLAC - audio
PNG BMP - images
Why is lossless compression required in the world?
As some programs, text files require all data to work or be useful
How does lossless compression work?
By recording patterns in data. It then uses patterns and set of information on how to use these patterns to assemble compressed data with exact accuracy
Advantages of lossless compression?
- orginal copy can be reassembled
- takes up less storage space and bandwidth (although more than lossy)
Disadvantages of lossless compression?
- a lot less space is saved compared to lossy
- a program of some sort is required to reconstruct the compressed data
How does lossless compression work in sound files?
Waveforms are condensed and reconstructed by algorithm.
What are the two types of lossless compression we have to know about?
Run Length Encoding (RLE)
Dictionary Based Compression
What does RLE stand for?
Run Length Encoding
What is RLE ?
form of lossless compression where a sequence containing repeated value of data is replaced by a single value of that data and a count of how many times it occurs
How would this example be represented by RLE? pppxxx pxxxxx pppppp where p = 1 in binary where x = 0 in binary
row RLE description
1 3,1 3,0 3 x binary 1 then 3 x binary 0
2 1,1 5,0 1 x binary 1 then 5 x binary 0
3 6,1 6 x binary 1
How does RLE reduce file size?
As 2 binary values have to be stored (bytes) instead of x number
In this example of how many bytes are we using with RLE compared to normally?
10 bytes compared to 18 bytes
What is dictionary based compression?
a substitution method of lossless compression. It uses a search to match compressed data (tokens) to that stored in a library
How does it work?
When decompressing the compressed data is used to find matching data in a library to find matching data. It then translates it.
What is used to find matching data in library?
tokens , they’re used as an index
Why does this reduce size?
As tokens take up less space than data
xxxxxxxxxx
xx
xxxxxxxxxxx
xx
What is encryption?
The transformation of data from one form to another to prevent third party access
Wha is the plaintext?
original non-encoded data
What is ciphertext?
encrypted data
What is a cipher?
The enryption method or algorithm
What is a key?
information which can be used to decrpyt ciphertext and change it into plaintext
What are the two methods of ciphers (encryption methods) I have to know about?
caesar cipher
vernam cipher
What is the caesar cipher?
method of encryption in which words are shifted x number of characters in the alphabet
Is the Vernam Cipher breakeable?
NO
What does the vernam cipher use?
A one time pad
What is a one time pad?
A technique where a plaintext character is mixed with a truly random character from the key stream.
How does the vernam cipher work?
A one time pad is used and the mixed characters (a pair of bytes) is used in an XOR operation to create cipher text
What needs to be ensured to keep vernam unbreakeable?
- only 2 copies of key
- both sides have the key
- key is used once
- key is destroyed after use
- use one time pad to ensure truly random key
What does the ciphertext need to be unbreakable?
truly random, not computer made as computer uses an algorithm to randomise
What is a cryptanalytic attack?
A study of systems in order to study hidden apsects, used to breach security and gain access to contents of encrypted messages
What is a symmetric encryption? What is another name for it?
Encryption form where the same key is used for encryption and decryption
private key
What is asymmetric encryption? What is another name for it?
Enryption form where 2 seperate but related keys are used. There is a public key used for encryption and private key used for decryption?
Why is there a public key(cipher) and private key in asymmetric encryption?
Public key is used for encryption and can be used by anyone. Private Key is only known by receiver to decrypt.
What can we do to a message to authenticate the sender?
a message can be digitally signed
What is the main advantage of assymetric encryption compared to symmetric?
Key to decrypt is not transmitted/sent so cannot be intercepted. So even if a message is intercepted it cant be decrypted
What is suitable for text encryption?
Dictionary based encryption