1.3.1 - Compression, Encryption and Hashing Flashcards

(12 cards)

1
Q

Define compression and when it is useful

A
  • The process of making a file smaller/take up less storage.
  • Particularly useful when transferring data via the internet
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define lossy compression and what types of files it would and wouldn’t be suited to.

A
  • Takes away some information from the original - Information is permanently lost in the process (irreversible)
  • Used on images as some loss of detail is acceptable and unlikely to be noticeable
  • It is unsuitable for text as the loss of small amounts of information will make it unreadable.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define lossless compression and what types of files it would and wouldn’t be suited to.

A
  • Preserves all the information from the original (No data is lost)
  • Used on files where losing data would not be an option, such as code and written texts.
  • Rewrites data in a more efficient format.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

State the two examples of lossless compression

A

Run Length Encoding

Dictionary Coding

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

Define run-length encoding and what types of scenarios it would and wouldn’t be suited to.

A
  • Not suited to natural language
  • More likely to be used in simple images
  • Relies on consecutive pieces of data
  • Each set of consecutive symbols can be represented by the symbol and its number of occurrences e.g. AAAABBBBBCCC could be represented as 4A5B3C
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define dictionary coding

A
  • Frequently occurring pieces of data or groups of characters are replaced by tokens.
  • A dictionary is then used to say which tokens match which groups of characters.
  • When decompressed the dictionary is used to replace the tokens with the original text.
  • The dictionary needs to be transmitted with the file.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define encryption

A

When data is scrambled so that if it is intercepted, it cannot be understood

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

Define symmetric encryption and its drawbacks

A
  • The same key is used to decrypt and encrypt data
  • Key exchange is required
  • The key couldn’t be transmitted over the internet as an eavesdropper monitoring the message may see it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define asymmetric encryption and give an example of where it could be used

A
  • One public key encrypts the data, and a different private key is used to decrypt
  • No key exchange required
  • Good for internet traffic as it gets around the requirement of the key being sent as there are two different keys. Used for secure online transactions (e.g. Banks)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define the term hash

A

A result that is generated by applying a hashing algorithm to a value.

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

Define the term hashing and give an example of where it could be used.

A
  • An algorithm used to convert data into a hash - one-way process
  • Used for storing passwords in databases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What main criteria can be used to judge the suitability of a hashing algorithm?

A
  1. Low chance of collisions
  2. Quick to calculate

Where possible, have a shorter output than input

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