1.3.1 exams q's: compression, encryption and hashing Flashcards

1
Q

Why is there a need to compress files? [2]
(mention reasons and describe what file types compression is useful for)

A
  • to reduce file size + reduce storage space needed to store file
  • improve transmission as less bandwidth required thus file would be sent faster since there’s less time for packet switching.
  • convenient for text files, images and videos sent or broadcasted on the internet
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a similarity between lossy and lossless compression?

What are differences between lossy and lossless compression?
( include which one loses more data, how they compress data and what file types are they used on)

A
  • Both reduce size of a file
  • however lossy compression compresses the file more than lossless as more original unnecessary data is lost + original file can’t be reverted back to.
  • This compares to lossless as none of original data is lost + original file can be reverted back to.
  • Lossless compression also uses algorithms to identify patterns to compress the data.
  • Lossy is used on images and sound compared to lossless which is mainly used for text and executable program files.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Provide an example of how lossy compression may reduce the size of a file? [2]

A
  • Lossy compression can be used on multimedia (images, sounds etc)
  • it works successfully to reduce file size significantly as data is lost when compressed but allows file size to be smaller although quality degrades + data isn’t retained.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Provide two different lossless compression methods

A

2 lossless compression methods include:

-Run length Encoding
- Dictionary Coding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Run-Length Encoding

(include file type its best suited to, what it does relating it to file type mentioned previously)

A
  • suits compression of bitmap images particularly as it seeks to find patterns in data that can be reconstructed later.
  • It stores data in a simplified, compressed format
  • using images as an example, it stores the contiguous colour pairs as well as the run (length of how long the colour is used before switching to a different colour).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is Dictionary-Based compression

(include file type its best suited to, what it does relating it to file type mentioned previously)

A
  • suited to text files as it builds an index reference of repeating patterns.
  • These indexed references build a dictionary of indexed which are referenced to in order to recreate the original file.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain what encryption is and state the 2 methods

A
  • It is the process of encoding data from plaintext to cipher text to avoid 3rd party from being able to understand it and can instead only be read by the intended recipient + sender.
  • Encryption has 2 methods: symmetric and asymmetric
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is symmetric encryption

A
  • singular key is used to encrypt and decrypt data so both parties need to have the key per-determined and secret so data can’t be intercepted and read over the internet by an unintended user. This process is called key exchange.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is asymmetric encryption

A
  • different to symmetric encryption as 2 keys are used: public and private.
  • These are known as key pairs + are used by both parties as a combined encryption key to successfully decrypt data and can’t be intercepted and understood.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain why asymmetric encryption is more secure than symmetric. [4]

A
  • more secure as 2 keys are used. The pairs of keys generated are the public key which is available to everyone and can only be used to decrypt messages with use of the private which is kept secret (private and public key is a combined encryption key). - This reduces the dangers that symmetric encryption poses as there is the risk that the single key may be duplicated thus sensitive information can be decrypted. Each user has their own private key and the other persons public key which work as a combined encryption key to encrypt and decrypt information. These keys are different and so it’s impossible for them to be derived so an eavesdropper has less chance of interception the data meaning this method is more secure than symmetric encryption.
  • symmetric encryption involves sending a single key which poses security risks as in key production, duplication could occur and so if intercepted by a third party, this allows them to decrypt the sensitive data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain how hashing algorithms can be used to irreversibly map data to a fixed-length value and explain where we may wish to use hashing. [4]

A
  • hashing function, an algorithm that converts inputs, can be used to transform a string of characters into a fixed length value that represents the original value but is instead stored as a hash value which can’t be reversed back to to obtain the original data.
  • This makes it an exceptionally secure method for storing passwords for example as a hacker can only see the hash value. In this example once a password is stored, the hashing algorithm is applied to it and this value is compared to the previous value saved of the same password entered. If the values are the same, access is granted.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly