1.3.1 Compression, Encryption and Hashing Flashcards
1
Q
What is compression?
A
- Process used to reduce the storage space required by a file
- More files in same space
- Important to share large files over internet
2
Q
What are the types of compression?
A
- Lossy
- Lossless
3
Q
What is lossy compression?
A
- Reduces size of the file by removing some of its information
- Original file cannot be recovered as information is completely disregarded
4
Q
What is lossless compression?
A
- Reduces the file size
- Original file can be recovered
5
Q
What are the types of lossless compression?
A
- Run Length Encoding
- Dictionary encoding
6
Q
What is Run Length Encoding?
A
- Repeated values are removed and replaced with one occurance of the data followed by the number of times it is repeated
- Relies on consecutive pieces of data being the same
7
Q
What is Dictionary Encoding?
A
- Frequently occuring pieces of data are replaced with an index
- Compressed data is stored alongside a dictionary
- Dictionary matches frequently occuring data to an index
- Original data can then be restored using dictionary
- Compressed data must be transferred alongside its dictionary
8
Q
What is encryption?
A
- Used to keep data secure whilst its being transmitted
- Disguises data before it is transmitted
- Dta is then deciphered once it arrives at its destination
9
Q
What are the types of encryption?
A
- Symmetric
- Asymmetric
10
Q
What is symmetric encryption?
A
- Sender and recipient share the same private key
- Distributed to each other in a process called a key exchnage
- Key is used to encrypt and decrypt data
11
Q
What is the disadvantage of symmetric encryption?
A
- Privat key must be kept a secret
- If the key is intercepted during the key exchange then any communicatons can be intercepted and decrypted
12
Q
What is asymmetric encryption?
A
- Two keys used: one public and the second a private key
- Public key can be accessed by anyone
- Private key must be kept secret
- Data encrypted by public key can only be decripted by private key
- If you wish to send data, you encrypt it with the recipients public key and then send it them so they can decrypt it using their private key
13
Q
What is hashing?
A
- An input (called a key) is turned into a fixed size value (called a hash)
- Output cant be reversed
14
Q
What are the uses of hashing?
A
- Can store passwords safetly as it cant be reversed
- Can create hash tables which allow for values stored in them to quickly be found