Compression, Encryption and Hashing Flashcards
Compression
Reducing the amount of file space that a given file takes up.
- reduces download times
- it reduces storage requirements
- makes better use of bandwidth
- better performance
LOSSY compression
some info is lost during the process. The original file cannot be perfectly reconstructed.
LOSSLESS compression
reduces the file size without losing any info. The original file can always be perfectly restored. Best for text documents and executable programs.
Run-Length Encoding
- Widely used method of lossless compression that relies on consecutively repeating data to effectively compress a file
- this rarely happens in text, but is common in other types of data (images, scientific research)
Dictionary Coding
This method of lossless compression is ideal for the compression of text-based documents.
It works by building an index that we visualise as a table.
Every data item or entry in the file is recorded along with an indexed reference/ unique code
frequently occurring pieces of data are replaced with an index and the compressed data is stored alongside a dictionary which matches the frequently occurring data to an index.
- without a dictionary, data cannot be used.
SYMMETRIC Encryption
the process of decryption is the opposite of the process used to encrypt.
They are quick to set up and easy to execute, however, the key can be intercepted during key exchange over the internet and then any communications sent can be intercepted and decrypted using the key
ASYMMETRIC Encryption
The encryption and decryption keys are different. If someone possess the decrypt key, they can read the info they receive but cannot encrypt their response using the same algorithm/ key. Almost impossible for computers to hack. The public key can be given out or published online, whereas the private key must be kept secret.
Hashing
Hashing transforms a string of characters into a fixed length value or key that represents the original input string.
You cannot get back to the original value, even if you have access to the original hashing algorithm.
- ideal for PINS.