1.3.1 Compression and Encryption Flashcards
Compression
Compression : Process of reducing number of bits in a file.
Advantages:
- Quicker file transmission
- More files can be stored in same amount of space
- Reduces transmission bandwidth used over internet
- Reduces chance of data collisions
- Files more quickly downloaded
Lossy Compression
Lossy : Permanently reduces file size more significantly while removing some information and permanently removes data.
- Attempts to remove unnoticeable data
- Cannot be used on executable files
- Best for use on images and sound - reduce sample rate/depth, resolution
Lossless Compression
Lossless : Reduces file size without removing any information (by less than lossy)
- Original file recovered using algorithm
- Great for text files (where removing information makes file obsolete)
Types of Lossless Compression
Run Length Encoding : Consecutive repeated values replaced number of repeats followed by one occurrence of data.
- Relies on consecutive repetitions
- Works well in images and sound
Dictionary Encoding : Frequently occurring pieces of data replaced with token/index
- Information on tokens stored in dictionary
- File must be sent with dictionary to restore data
- Works well on large text - lots of repeated words and phrases
Encryption
Encryption : Scrambles data so that it is unreadable
- Modern encryption can be used without specialist software so widely use don internet
- 2 way - encrypted data can be deciphered with key
- Keeps data safe during transmission - if intercepted it is unreadable
Symmetric encryption
Symmetric encryption : Single key used for encryption and decryption
- Faster than asymmetric (less processing)
- Keys distributed in Key exchange - vulnerability as key can be intercepted
- best where same person encrypting and decrypting
Asymmetric encryption
Asymmetric : One Key publicly distributed while other kept private
- Often used when exchanging data as more secure e.g. E-commerce
- Slower than symmetric as more processing in algorithm
- Can be used to secure keys in key exchange
- Can be used to validate sender (double encryption)
- Keys mathematically related
Hashing
Hashing : Process of turning input into hash by mathematical algorithm
- One way (cannot be reversed)
- Same input always produces same hash - but works on bit level so if metadata slightly different then completely different hash
Useful for storing passwords as cannot be reversed even if hacker gets data
- Input passwords can be validated by checking hash against stored hash
Hashing and encryption uses in security
Hashing :
- Useful for storing passwords as cannot be reversed even if hacker gets data
- Input passwords can be validated by checking hash against stored hash
- Not useful for data that needs to be returned to user
Encryption :
- Useful for most data storage as hackers wont be able to understand data
- Useful in data transmission as intercepted data cannot be read but can be deciphered (especially over open networks)