1.3.1 - Compression, Encryption and Hashing Flashcards
What is compression?
The process used to reduce the storage space required by a file.
What are the advantages of compression?
More files can be stored in a given storage space.
It can be transferred over a network faster.
What are the two types of compression?
Lossy and lossless.
What is the main feature of lossy compression?
Lossy compression reduces the file size greatly but at the cost of losing data.
What is the main feature of lossless compression?
It reduces the file size but the original data can be restored perfectly meaning there is no loss of data.
Is Run Length Encoding (RLE) lossy or lossless?
Lossless.
How does RLE work?
It groups together repeated values and stores them more simply.
For example, AAAABBBBCC could be stored as A4B4C2.
Is dictionary encoding lossy or lossless?
Lossless.
How does dictionary encoding work?
Frequently occurring pieces of text are replaced with an index. The original data is then restored from the dictionary using the index.
What is the purpose of encryption?
Encryption is used to keep data secure when it is being transmitted by scrambling the data.
What are the two types of encryption?
Symmetric and asymmetric.
How does symmetric encryption work?
The sender and receiver share the same private key. This is used for encrypting and decrypting data.
How does asymmetric encryption work?
Two keys are used: a private key and a public key. The shared public key can only be used to encrypt data and the private key can only be used to decrypt data.
Which method of encryption is more secure?
Asymmetric encryption.
What is hashing?
A process in which an input is put through a hashing algorithm that cannot be inverted.