1.3.1 Compression, Encryption and Hashing Flashcards

(79 cards)

1
Q

What is the overall purpose of compression?

A

To reduce file size

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

Why is making efficient use of bandwidth critical?

A

Because vast amounts of data are sent and streamed over the internet every day

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

What are the two main methods of compression?

A

Lossy compression and lossless compression.

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

What must happen to a compressed file before it can be read again?

A

It needs to be uncompressed.

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

How does color depth affect image file size?

A

The more bits per pixel used to represent colors (color depth)

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

What are two ways to reduce image file size using lossy compression?

A

Store fewer colors or store larger areas of pixels as a single color.

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

What is a key characteristic of lossy compression?

A

It reduces file size by sacrificing some quality

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

Why is lossy compression considered an acceptable compromise for images

A

audio

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

What is lossless compression?

A

A method of compression that reduces file size without sacrificing any quality

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

How does lossless compression work on images with large areas of the same color?

A

Instead of storing every pixel

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

What type of images are best suited for lossless compression?

A

Images with large continuous color areas like vector style images

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

Why is lossless compression less effective on full color photographs?

A

Because photographs have few large areas of continuous repeating colors.

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

Which file types must use lossless compression and why?

A

Text documents and executable programs

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

What happens to data in lossy compression?

A

Some data is lost and cannot be recovered.

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

What types of files are lossy compression very suitable for?

A

Images

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

What is the main advantage of lossless compression?

A

None of the original data is lost

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

What is the main disadvantage of lossy compression?

A

It causes a slight reduction in quality because some data is lost.

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

What is the key difference between lossy and lossless compression?

A

Lossy compression loses some data and quality to reduce file size

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

What is the key question to understand after watching this video?

A

What is the difference between lossy and lossless compression?

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

What are the two methods of lossless compression discussed?

A

Run-length encoding and dictionary coding.

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

Which type of files is dictionary coding ideal for?

A

Dictionary coding is ideal for text-based documents.

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

Which type of files is run-length encoding more suited for?

A

Run-length encoding is more suited for the compression of images.

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

What is the key feature of lossless compression methods?

A

They allow us to recreate the file in its original quality.

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

How does dictionary coding work?

A

It builds an index (a dictionary) where every data item is recorded with an indexed reference or unique code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What does the compressed file consist of in dictionary coding?
The dictionary index and the sequence of occurrences needed to recreate the original file.
26
In dictionary coding
if the original message has 105 characters and uses 8-bit ASCII encoding
27
After dictionary coding compression
if there are 46 numbers ranging from 1 to 17
28
What compression ratio is achieved in the example with dictionary coding?
The message is compressed to 27% of its original size.
29
What kind of images is run-length encoding ideal for?
Run-length encoding is ideal for bitmap images.
30
Why is storing each pixel individually inefficient for bitmap images?
Because many contiguous pixels are of the same color
31
What is the color depth in the example of run-length encoding with two colors?
Color depth is one bit per pixel (0 for white
32
How does run-length encoding store image data?
By storing frequency data pairs indicating how many contiguous pixels of a certain color occur in sequence.
33
What does the frequency data pair "22 0" represent in run-length encoding?
It represents 22 contiguous white pixels.
34
What are the key questions you should be able to answer after watching this video?
How does run-length encoding work and how does dictionary coding work?
35
What is encryption?
Encryption is the process of encoding a message so it can be read only by the sender and the intended recipient.
36
What was one of the first forms of encryption?
One of the first forms of encryption was the Caesar cipher, which replaces each letter of the alphabet with another letter a fixed distance away.
37
What is the 'key' in the Caesar cipher?
The key is the number of places the alphabet has been shifted to encrypt or decrypt the message.
38
Why is the Caesar cipher considered weak encryption?
Because it is very easy to crack even without the key.
39
What is the ultimate aim of encryption?
To make the original message impossible to crack without knowing the key.
40
What is symmetric encryption?
Symmetric encryption uses a single key to both encrypt and decrypt the message.
41
What do both parties need in symmetric encryption?
Both parties need to know and keep the single key secret.
42
Can the same key be used multiple times in symmetric encryption?
Yes, the same key can be used multiple times, or alternatively a unique key could be generated each time.
43
What is a danger of symmetric encryption?
A message can be cracked by interception or duplication of the key.
44
What type of encryption is used for sensitive information like payment card details?
Asymmetric encryption is used because it is more secure.
45
What is asymmetric encryption?
Asymmetric encryption uses two different keys: one to encrypt and a different one to decrypt the message.
46
Are the encryption and decryption keys the same in asymmetric encryption?
No, the key used to encrypt the message is not the same as the key used to decrypt it.
47
Why is asymmetric encryption more secure?
Because it is virtually impossible to derive one key from the other.
48
What do the two keys in asymmetric encryption form?
They form key pairs.
49
What are the two keys in asymmetric encryption called?
One is called the public key and the other is called the private key.
50
Can the public key be shared freely?
Yes, the public key can be made public and shared freely.
51
Should the private key be shared?
No, the private key should never be shared.
52
How do sender and recipient use public and private keys to communicate securely?
They exchange their public keys. The sender encrypts the message with the recipient's public key. The recipient decrypts it with their private key.
53
Why can messages encrypted with a public key only be decrypted by the corresponding private key?
Because the keys are mathematically linked, but one key cannot be derived from the other.
54
What happens if someone encrypts a message with their private key?
Anyone with the sender's public key can decrypt it, proving the message is authentic and from the sender.
55
What is a combined encryption key in asymmetric encryption?
It is when a message is encrypted using the sender's private key and the recipient's public key.
56
What keys are needed for the recipient to decrypt a message encrypted with a combined encryption key?
The recipient uses their private key and the sender's public key to decrypt the message.
57
What are the four assurances provided by the combined encryption key method?
1) Only sender and recipient can read the message, 2) Recipient knows the message is authentic, 3) Message hasn't been modified in transit, 4) Both parties are assured of security.
58
What is an encryption key technically?
An encryption key is a sequence of alphanumeric characters.
59
What is a common encryption key standard mentioned?
A 256-bit encryption key.
60
How many possible combinations does a 256-bit key have?
2^256 possible combinations, a number so large it is a 78-digit number.
61
How long would it take to crack a 256-bit key by brute force?
Even with the most powerful computers today, it would take billions of billions of years to crack.
62
How does the time to crack a 256-bit key compare to the age of the universe?
It would take longer to crack than the current age of the universe.
63
What is hashing?
Hashing is a function that transforms a string of characters into a fixed length value or key that represents the original input string.
64
What does a hashing function do?
It contains an algorithm that converts the inputted data into a fixed length value or key.
65
Name two popular hashing algorithms.
SHA1 and MD5.
66
What happens to the hash value if there is a slight change in the original input message?
Even a slight change produces a totally different hash value.
67
How is hashing different from encryption?
Hashing is a one-way process where you cannot get back the original value from the hashed value
68
Why can’t you reverse a hash value to get the original data?
Because hashing is a one-way function and does not allow retrieval of the original input.
69
When might we use hashing?
Hashing is ideal for preventing sensitive information like passwords and PINs from being read by hackers.
70
Why is it a bad idea to store passwords in plain text?
Because anyone who accesses the system can read the passwords directly
71
How does hashing improve password security during storage?
Passwords are hashed before being stored
72
What can a hacker see if they access a hashed password file?
They will only see hashed values which cannot be reversed to reveal the original passwords.
73
How does the system verify a password when a user logs in?
The system hashes the password entered and compares the hash value with the stored hash.
74
Is the password ever sent in plain text during login?
No
75
What happens if a hashed password is intercepted in transit?
It cannot be reverse engineered to find the original password.
76
Besides security
what is another use of hashing?
77
How does hashing speed up data retrieval?
It allows immediate access by applying a hashing function to find an item without searching or sorting.
78
What is the average time complexity of hashing for data retrieval?
Constant time
79
What key question should you be able to answer after watching this video?
What is hashing?