1.3.1 Compression, Encryption, Hashing Flashcards

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

What is compression

A

Reducing the size of a file by identifying repetitions of data

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

What are the attributes of Lossy Compression

A

Reduces File size,
Permanently deletes some data,
Useful for compressing image files

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

What are the attributes of Lossless Compression

A

Reduces File size,

Patterns in data are summarised in a shorter file format,

No data deleted,

Useful for compressing text documents

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

What’s dictionary compression

A

Splits files up into repeated data patterns,

Stores these in a dictionary

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

What’s a dictionary

A

A data structure that allow you to store key-value pairs. Each word can be stored as an ASCII-code of 8 bits

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

What’s encryption

A

The process of converting a message from plain text to cipher text,

Requires a key

Prevents data from being understood if intercepted..

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

What’s decryption

A

Process of converting cipher text back into plain text requires a key

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

What’s a message

A

Data that will be communicated between 2 parties

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

What’s plaintext

A

A message in an easily human readable form

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

What’s cipher text

A

An encrypted message

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

What’s a cipher

A

A set of instructions (algorithm) for encrypting plain text

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

What’s authentication

A

Proving the identity of the sender

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

What’s symmetric encryption

A

The same private key is used to encrypt and decrypt,

The key must be shared between the sender and receiver,

Key can be easily intercepted when sharing

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

What’s Asymmetric Encryption

A

Two different ( yet mathematically linked) keys are used to encrypt and decrypt,

Keys don’t need to be shared

Public key used to encrypt

Private key used to decrypt

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

Why do most systems use asymmetric encryption

A

To generate a symmetric key, securing limited communication sessions

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

What type of key exchange is used to generate a symmetric key

A

Diffie Hellman key exchange is used to generate it over transport layer security

17
Q

What is Transport Layer Security

A

An encryption that’s used to secure TCP/IP protocols

18
Q

What’s Caesar cypher encryption

A

Encryption that shifts each letter of plain text by an amount in a cyclical manner,

The amount is specified by the key

19
Q

Advantages of Caesar cypher

A

Quick to reveal message

20
Q

Cons of Caesar cypher

A

Easily crackable - only 25 possible keys

21
Q

What’s the one time pad

A

A substitution cipher, in which each character is encrypted using its own key,

It’s theoretically impossible to crack and used by the vernam cipher

22
Q

Define computational security

A

When a scheme cannot be cracked in reasonable time

23
Q

What are the prerequisites of computational security

A

Key must be at least the same length as the plain text,

Characters in the key must be truly random,

The key must only be used ONCE,

Must only be two copies of the key, and it must be kept secret,

Key must be destroyed after use

24
Q

What’s a hash table

A

A data structure that implements an associative array

25
Q

What’s an associative array

A

An array in which data is stored as collection of key-value pairs,

E.g. a dictionary

26
Q

Why must an array be used in a hash table

A

You have to be able to access each position of the array directly

27
Q

What’s hashing

A

Applying a hashing algorithm to the key, to determine the position of data within the array

28
Q

What’s the formula for the load factor of a hashing table

A

Number of occupied buckets divided by the total number of buckets,

Optimal load factor = 0.75

29
Q

What’s a hash function

A

An algorithm that converts a hash key to a hash value

30
Q

What are the requirements needed to use a hash function

A

Always produce the same hash value for the same key,

To provide a uniform distribution of hash values. This means every value has an equal probability of generation,

Minimise cluttering

31
Q

What causes cluttering

A

When many different keys produce the same hash value, a collision has occurred

32
Q

What’s the purpose of a hashing function

A

It provides a mapping between an arbitrary length input and a fixed length or smaller output,

Its one way - so it can’t be reverted

33
Q

What’s rehashing

A

When you rehash, a new hash table is created (larger if needed).

The key for each item in the existing table will be rehashed and the item will be inserted into the new hash table.

If the new table is larger the hashing algorithm will need to be modified as it will need to generate a larger range of hash values.

34
Q

Why might rehashing be needed

A

If the hash table starts to fill up, or a large number of items are in the wrong place, the performance of the hash table will degrade.