1.3.1 Compression, Encryption & Hashing Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is compression?

A

A process used to reduce the storage space required by a file

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

What is the purpose of compression?

A

Increases the number of files that can be transferred in a given time
Reduce download time

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

Name two types of compression.

A

Lossy
Lossless

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

Describe lossless compression.

A

Reduces the size of a file less significantly as data isn’t removed
The original file can be recovered

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

Describe lossy compression.

A

Reduces the size of a file significantly by removing some data
The original file cannot be recovered

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

What is lossy compression suitable for?

A

Media
Not text/program files as characters will be removed

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

What is lossless compression suitable for?

A

Media but won’t reduce file size as significantly
Text/program files as can be recovered

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

What is Dictionary Encoding?

A

Method of lossless compression
Frequently occurring pieces of data are replaced with an index
Compressed data is stored with a dictionary which can be used to restore original data

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

What is Run Length Encoding?

A

Method of lossless compression
Repeated values replaced with one occurrence followed by number of repititions

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

Give two disadvantages of Run Length Encoding.

A

Relies on consecutive pieces of data being the same
Doesn’t offer much reduction in file size if little repitition

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

What is encryption?

A

A process used to ensure data is kept secure during its transmission
Data is scrambled before transmission and deciphered at its destination

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

What is asymmetric encryption?

A

Encryption used two keys

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

What is symmetric encryption?

A

Encryption using a single key

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

Describe what is meant by a key pair.

A

A public key that can be published anywhere
A private key that must remain secret
Both keys mathematically related

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

How does asymmetric encryption work?

A

Messages encrypted with the public key can only be decrypted with the corresponding private key

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

How does symmetric encryption work?

A

Both sender and receiver share the same private key
The key is distributed by key exchange and is used for both encryption/decryption

17
Q

Why can symmetric encryption be less secure?

A

If the key is intercepted, communications can be intercepted

18
Q

What is hashing?

A

An input is turned into a fixed size value (hash) by an algorithm

19
Q

Why is storing password using hash functions secure?

A

The output cannot be reserved to gain the initial input

20
Q

What is a salt?

A

A random value added to the input of a hash function to create an unique output

21
Q

What is a hash table?

A

A data structure that holds key-value pairs that can be used to look up data in an array in constant time

22
Q

What is constant time?

A

The time complexity O(1)

23
Q

List the 4 features needed to be a good hash function.

A

Take any length input & produce fixed length output
Be efficient & fast to compute
Be computationally infeasible to invert
Have a low chance of collision

24
Q

What is a collison?

A

A collison is said to have occurred if two keys produce the same hash

25
Q

Describe two methods to overcome collisons.

A

Storing items together in a list under the hash value
Using a second hash function to get a new hash