1.3.1 Compression, Encryption and Hashing Flashcards
Explain lossy compression
Data is removed, which is not essential to the overall file
What is the advantage of lossy compression?
Achieves more compression than lossless
What are the disadvantages of lossy compression?
It is an irreversible process
Loses quality as it removes data
Explain lossless compression
Data is compressed such that none of the original data is lost
What are the advantages of lossless compression?
No data is lost
It is a reversible process
What is the disadvantage of lossless compression?
Results in less compression than lossy compression
Explain dictionary compression
Each repeated pattern is stored as its own unique binary code.
This means a short codeword represents a longer piece of data
What are examples of lossless compression?
Dictionary compression
Run Length Encoding
What is the advantage and disadvantage of dictionary compression?
Reduces the size without losing the original data
Reduces the size less than lossy compression would
Explain run length encoding
Finds sets of repeated binary patterns and replaces them with single instances.
The instance includes the pattern with a number specifying the times it repeats
What is the advantage and disadvantage of run length encoding?
Reduces the size without losing the original data
Reduces the size less than lossy compression would
Explain symmetric encryption
The same encryption key will be used to encrypt and decrypt the message
What are the advantages and disadvantages of symmetric encryption?
- The message cannot be decrypted if a hacker doesn’t have the encryption key
- The key could be intercepted
- Not secure for critical information
What are the advantages and disadvantages of asymmetric encryption?
- One key cannot be worked out from the other
- The message can be authenticated
- The receiver must have access to the sender’s public key
Define encryption
The process of changing plaintext to ciphertext using a key
Define a key pair
An encryption and decryption key used in asymmetric encryption
Define a combined key
When the sender’s private key and the receiver’s public key are used to encrypt the message
Define a public key
An encryption key that can be seen by anyone
Define a private key
An encryption key that cannot be seen by anyone
Explain asymmetric encryption
Different keys encrypt and decrypt a message, one a public key, the other a private key.
- The receiver’s public key is used to encrypt the data, then the receiver uses their private key to decrypt it
- The sender’s private key can be used as well to encrypt the key, then the receiver’s private key and the sender’s public key is used to decrypt the message
- No one can read the message
- The message can be checked if authentic or if modified
Explain hashing
A technique to map data of variable lengths to a fixed-length data value
Explain the use of hashing
It is needed to reduce the size and increase the security of the data
Explain how hashing works
A hashing algorithm is applied to a piece of data to create a hash value
What is the difference between hashing and encryption?
Hashing is a one-way process, whereas encryption is two-way
How is hashing used in sending files?
If a file is sent with errors or is modified during transfer, then the hash value will turn out differently
How is hashing used in searching a database?
If a database needs to be searched, the primary key field can be applied to a hashing algorithm.
Then the primary key of a record can be passed through the algorithm, which will then relate to only one given location in the hash table
How is hashing used in keeping passwords?
When a user enters a password, it can be hashed and then stored in a database.
When the user enters their password, it can be hashed and then compared to the stored pre-hashed passwords.
This means the original password isn’t kept
Explain a digital signature
The digital signature is an algorithm used to encrypt the data.
It is the equivalent of a hand-written signature as it is a method of authenticating received data.
How does a digital signature work?
- The data will be encrypted with the digital signature algorithm and a check-sum will be calculated
- At the receiving end, the check-sum will be recalculated and compared to the sent value
- If they match, the data has been authenticated
- Not all data is sent with a digital signature
What is a digital signature used for?
To authenticate installation files
Used to sign digital documents
Explain a digital certificate
A method of verifying the trustworthiness of a website
How does a digital certificate work?
- It will verify a website is the real edition
- The certificate details will be compared, and the user will be notified if the details match
- This usually is shown next to the UML as a padlock