1.3.1 Compression, Encryption, Hashing Flashcards
Compression meaning
Aims to reduce file size, while trying to make the compressed file as true to the original file as possible
Benefits of compression
- Uses less storage space
- Faster streaming/downloading files from the internet as they take less bandwidth
- Web pages load faster
- Would adhere to email service restrictions to attachment sizes
Types of compression
Lossy (JPG, MP3, GIF)
Lossless (PNG, TIF, SVG, FLAC)
Image f.s (bits) formula
Width * Height * Colour Depth
Lossy
Compression techniques that result in a permanent loss of data. When decompressed, the recreated data is an approximation of the original data. Often used with images and sound, but not text or computer programs.
Reduction in quality and resolution of images.
In sound, sounds outside our frequency range are removed which doesn’t affect playback quality.
Lossless
Compression methods where no data is permanently lost. The decompressed file is identical to the original file. Often used when data cannot be approximated.
Types of compression include RLE and dictionary encoding.
Encryption meaning
Process of converting a message from plaintext to cipher text so that it cannot be intercepted and understood by unauthorised/third parties.
Symmetric encryption
Both the sender and recipient use the same key, however intercepting the key would mean accessing the message.
The key is used to encrypt the message from plaintext to ciphertext, and the recipient would then use the key to decipher the text from ciphertext to plaintext.
Asymmetric encryption
Uses a key pair (public and private)
The sender encrypts the key with the recipient’s public key, and the recipient decrypts it using their own private key.
More secure as the key cannot be intercepted.
Hashing definition
Applying a hashing algorithm to a piece of data, the key, to create a hash value. It takes large range of values and maps them into a smaller set of values.
Hashing features
- unique, two keys dont result in the same hash value
- repeatable, a hash value applied to the same key should return the same hash value
- irreversible, cannot reconvert to receive the key
Hashing uses
Keeping passwords
Searching for a record
Sending files