Compression, Encryption and Hashing Flashcards
What is Compression
The process used to reduce the storage space required by a file
Why do we use Compression
- The larger a file, the longer it takes to transfer
- By compressing files it increases the number of files that can be transferred in a given time
- This reduces buffering and enables files to be loaded faster
What are the Two Types of Compression
- Lossy
- Lossless
What is Lossy Compression
Reduces the size of a file by removing some of its information so less data needs to be stored
Describe Examples of Lossy Compression
- Music - removes frequencies in the sound file that are too high for humans to hear
- Movie - dropping of quality makes it more compressed
What is Lossless Compression
A type of compression that reduces the file sizes in such a way that no data is lost so the original file can be recovered from the compressed version
How is Lossless Compression Achieved
Makes use of repeating data so that if a data item occurs multiple times the item is stored once along with the number of repetitions
Describe Examples of Lossless Compression
- Run-length Encoding - repeated values are removed and replaced with one occurence followed by the number of times it should be repeated,
- However relies on repeated data being identical and doesn’t give a good reduction if there is little repetition
- Dictionary Encoding - replace the most common pieces of data with an index
- Compressed data is stored alongside a dictionary that macthes the frequently occuring data to an index, this means the original data can be restored
What is the purpose of Encryption
To keep data secure when it’s being transmitted
What are the are Two types of Encryption Technologies
- Symmetric Encryption
- Assymetric Encryption
What is Symmetric Encryption
- Both sender and receiver share the same private key
- The key is distributed in a process called a key exchange
- This key is used for both encrypting and decrypting data
- The key must be kept secret
- If the key is intercepted then any communications sent can be intercepted
What is Asymmetric Encryption
- Two keys are used: public and private
- The public key can be published anywhere
- The private key must be kept secret
- Together, the keys are known as a key pair
- Messages encrypted with the public key can only be decrypted with the corresponding private key
- Encrypting a message using your private key verifies that the message was sent by you. If your public key can decrypt a message, then it must have been encrypted with your private key, which only you have access to.
Describe the Process of a Digital Signature
- Digital Signatures show that a message has been sent by you
- You can encrypt a message using your private key.
- This means that anyone can decrypt it (as your public key is available to anyone) and by doing so, can guarantee that you encrypted the message, as only you have access to the private key
What is Hashing
The process in which an input (called a key) is turned into a fixed size value (called a hash)
What are the features of hashing
- Cannot be reversed
- Gives a fixed size value