Compression, encryption and hashing Flashcards

1
Q

Define compression

A

The process of making files smaller by representing them using less data

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

Describe lossy compression

A

Removes non-critical data from the data set. These may be frequencies of sound the human ear won’t notice or changing very similar colours to the same colour e.g. JPEG, MP3

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

Describe lossless compression

A

No data is removed from the data set. The original file that is reconstructed from the compressed version will be exactly the same before. e.g. ZIP, PNG

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

Name 2 methods of lossless compression

A

Run-length encoding and Dictionary coding

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

What is run-length encoding

A

Makes use of redundant data, so that if a data item occurs multiple times consecutively, the item is stored once in an index along with the number of repetitions

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

What is dictionary coding

A

An index is built where each data item is recorded along with an index reference. The compressed file then consists of the dictionary and the sequence of occurrences

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

Define encryption

A

The process of making data unreadable to third parties

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

What is symmetric encryption

A

Encryption where the same key is used to encrypt and decrypt data

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

What is asymmetric encryption

A

Encryption where the public key is used to encrypt data and the private key is used to decrypt it

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

What is a hash function

A

A function that takes in data of any size and returns a fixed-length output

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

Name the properties hash functions should have

A
  • Irreversibility
  • Determinism => Same input will always give the same output
  • Collision resistance => A collision is when two or more inputs give the same outputs.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Name uses of hashes

A

Passwords and proof of state

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