1.3.1 - Compression, Encryption and Hashing Flashcards

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

What is compression?

A

A way of reduceing data and file sizes

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

What factors need to be taken into account when using compression?

A

The available bandwidth

The expected processing power of the user’s computer

The expected storage requirements.

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

What are the two types of compression?

A

Lossy Compression

Lossless Compression

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

What is lossy compression?

A

An algorithm that REMOVES DATA from the file to make file storage space or size smaller but the accuracy with
which it represents.

The data and information that is reduced is lost in the process and is not recoverable.

Assumes there is enough data remaining to be acceptable and similar to before hand (ei readable or still looks like the same image)

Commonly used for sound and image files:
- JPEG
- MPEG
- MP3.

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

What is lossless compression?

A

An algorithm is used to retain all the information in a file while reducing its size.

Files are stored and transmitted intact so the original can be reconstructed from this data.

Commonly used for the following files:
- program code
- ZIP
- GIF
- PNG.

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

What is run length encoding? (RLE)?

A

Is an algorithm that will loop through data. It then uses dictionaries to store the number of like data. For example here is some data:

aaaabbbbcccccddddddeee

Here it would create a dictionary of an integer and a string with the integer being the amount of strings in the data set:

4a4b5c6d3e

In simpler terms:
A dictionary is used to store items such as pixels, words or other groupings of bits.

Repeated occurrences are stored in a dictionary or table, plus their number of occurrences, e.g. 100 blue pixels
can be stored as B100.

Used in TIFF and BMP files.

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

What is dictionary coding?

A

Dictionary coding replaces recurring sequences with shorter, unique codes
A ‘dictionary’ is compiled to map original sequences to special codes
This method is effective for both text and binary data
The phrase “for example” could be coded as ‘FE’ if ‘FE’ doesn’t appear in the original text
A sequence of binary numbers ‘1010’ could be replaced by a shorter unique code

It may map two strings together, say the sentence is Hello world

Hello: H
World: W

So the compressed message is HW

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

What is a dictionary?

A

Is a data structure that maps values to a key. e.g

“Fun”: 1
“Two”: 2

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

What are the advantages and disadvantages of dictionary coding and run length encoding?

A

RLE: More effective when data has lots of repetition but may create larger files when input is too complex (ieofgignhfdikdfhbgui) will make a longer message as there are more single units.
Dictionary Coding: More versatile but may require more computational resources

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

What are the uses of encryption?

A

Widely used when transmitting information on the internet and in networks because data can be intercepted.

Protects files so that if unauthorised access is gained the data is unintelligible.

It is Important in VPNs because of the number of users sharing the physical network.

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

What is encryption?

A

Is used to protect data from being stolen, changed, or compromised and works by scrambling data into a secret code that can only be unlocked with a unique digital key.

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

What is an encryption key?

A

Keys are long random numbers which have the information needed to encrypt and decrypt messages.

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

What are the two types of encryption keys?

A

Public key is publicly available to all.

Private key is kept confidential to its owner.

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

What are two types of encryption?

A

Symmetric encryption
Asymmetric encryption

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

What is symmetric encryption?

A

The same key is used to encrypt and to decrypt.

Requires both parties to have a copy of the key.

Can’t be transmitted over the Internet or an eavesdropper monitoring the message may see it.

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

What is asymmetric encryption?

A

Different keys are used to encrypt and to decrypt – this is more secure.

The public key encrypts the data.

The private key decrypts the data.

17
Q

What is hashing?

A

Hashing is a method to convert any data into a fixed-size string of characters
This fixed-size output is often called a digest

18
Q

What are some advantages of hashing?

A

Same input will always produce the same hash, providing consistency
Even a minor change in input produces a radically different hash, giving it sensitivity to data changes

19
Q

What are three examples of hashing algorithms?

A

MD5 (Message Digest 5) - Widely used but considered weak due to vulnerabilities to collision attacks

SHA-1 (Secure Hash Algorithm 1) - Previously used in SSL certificates and software repositories, now considered weak due to vulnerabilities

SHA-256 (Part of the SHA-2 family )- Commonly used in cryptographic applications and data integrity checks. Considered secure for most practical purposes

20
Q

What are 7 differences between encryption and hashing?

A

Purpose
Encryption = Securing data for transmission or storage; reversible
Hashing = Data verification, quick data retrieval, irreversible

Reversibility
Encryption = Can be decrypted to the original data
Hashing = It cannot be reversed to the original data

Keys
Encryption = Uses keys for encryption and decryption
Hashing = Doesn’t use keys

Processing Speed
Encryption = Generally slower for strong encryption methods
Hashing = Generally faster

Use Cases
Encryption = Secure communications, file storage
Hashing = Password storage, data integrity checks

Security
Encryption = Varies; potentially strong but dependent on key management
Hashing = One-way function makes it secure but susceptible to collisions

Data Length
Encryption = Output length varies; could be same or longer than input
Hashing = Fixed length output