1.3.1: Compression, Encryption, and Hashing Flashcards

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

What is Lossy?

A
  • Compressing files by deleting unnecessary metadata
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the disadvantages of Lossy?

A
  • Data is lost permanently
  • Quality is sacrificed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an advantage of Lossy?

A
  • File size reduces dramatically
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How is Lossy implemented?

A
  • Reducing number of colours or cropping an image
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Lossless?

A
  • Compressing files by temporarily reducing file size
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an advantage of Lossless?

A
  • No data is lost
  • Quality is not sacrificed
  • The original data can be retrieved
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a disadvantage of Lossless?

A
  • File size isn’t as reduced as with Lossy as all the original data is still present when the file is accessed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is Lossless implemented?

A
  • Run Length Encoding
  • Dictionary Encoding
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does Run Length Encoding work?

A
  • An algorithm will identify sequences of colours and replace them
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does Dictionary Encoding work?

A
  • Repetitive characters or words are replaced
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Where would Lossy be most beneficial?

A
  • When uploading, downloading, or streaming off the internet
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Where would Lossless be most beneficial?

A
  • Compressing high quality photos over the internet, where the quality would be required to be uncompromised but the file would be originally too large to efficiently send over the internet
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Run Length Encoding?

A
  • A method of Lossless compression in which repeated values are removed and replaced with one occurrence of the data followed by the number of times it should be repeated
  • Example: AAAAAABBBBBCCC could be represented as A6B5C3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is required for Run Length Encoding to work well?

A
  • Consecutive pieces of data being the same
  • If there is little repetition, RLE doesn’t offer a great reduction in file size
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is Dictionary Encoding?

A
  • A method of Lossless compression where frequently occurring pieces of data are replaced with an index and compressed data is stored alongside a dictionary matching frequently occurring data to an index
  • The original size can be restored using the dictionary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Encryption?

A
  • The process by which plaintext (data) is transformed into an unreadable file which can be deciphered using a key authorised by users
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Why is Encryption used?

A
  • To prevent unauthorised viewing of private and confidential files
  • Used for protecting data when being sent across the internet
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is Symmetric Encryption?

A
  • The process by which plaintext is encrypted is the method by which the ciphertext is decrypted
19
Q

How does Symmetric Encryption work?

A
  • Both the sender and receiver share the same private key distributed via key exchange
20
Q

What is a disadvantage of Symmetric Encryption?

A
  • Low security because of how easy it is to crack
  • Even if the key doesn’t get intercepted during exchange, the patterns in the ciphertext render the scrambled message easy to crack
21
Q

What is Asymmetric Encryption?

A
  • The process of Encryption utilising 2 keys: A public and private key
22
Q

How does Asymmetric Encryption work?

A
  • The public key can be published anywhere so anyone can see
  • The private key must be kept secret
  • Together the keys are known as a key pair and are mathematically related to one another
23
Q

What is an advantage of Asymmetric Encryption?

A
  • A single key cannot be used to both encrypt and decrypt communication
  • Messages encrypted with the recipient’s public key can only be decrypted with the recipient’s private key (that should only be in the possession of the recipient)
24
Q

What is Hashing?

A
  • The process by which an input (a ‘key’) is turned into a fixed size value (a ‘hash’) by one of many hash functions (algorithms that turn keys into hashes)
25
Q

What is an advantage of Hashing?

A
  • The output of a Hash function cannot be reversed to form the key: Useful for storing passwords
26
Q

Why is Hashing useful for storing passwords?

A
  • A password entered by a user can be hashed and checked against the key to check if it is correct, but a hacker would only gain access to the keys, which can’t be reversed to gain the passwords
27
Q

What is a Hash Table?

A
  • A data structure that holds key-value pairs
28
Q

How is a Hash Table formed?

A
  • From a bucket array and a Hash function
29
Q

What are Hash Tables used for?

A
  • Looking up data in an array in constant time
  • Used extensively in situations where a lot of data needs to be stored with constant access (e.g. caches and databases)
30
Q

How do Hash Tables work?

A
  • When data needs to be inserted, it is used as the key for the Hash function and stored in the bucket corresponding to the Hash
31
Q

What is a Collision?

A
  • If two pieces of data (keys) produce the same Hash
32
Q

How can Collisions be overcome?

A
  • Storing items together in a list under the Hash value
  • Using a second Hash function to generate a new Hash
32
Q

What are the features of a good Hash Function?

A
  • Low chance of collision
  • Quick to calculate
  • Produce an output smaller than the input provided, otherwise searching for the Hash could take longer than searching for the key
33
Q

What is a Hash Total?

A
  • A mathematical value calculated from unencrypted message data
33
Q
A
34
Q

t

A
34
Q
A
35
Q
A
35
Q
A
36
Q
A
36
Q
A
37
Q
A
37
Q
A