1.3.1 Flashcards

1
Q

compression

A

Compression is the process used to reduce the overall size of a file, meaning you can store more files with the same amount of storage space.

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

methods of compression

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

lossy

A

lossy compression reduces the size of a file while also removing some of its information (quality). This could result in a more pixelated image or less clear audio recording.

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

lossyless

A

lossless compression reduces the size of a file without losing any information.

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

lossy vs lossyless

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

lossless compression types

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

dictionary coding

A

Frequently occurring pieces of data are replaced by symbols (smaller groups of characters).
A dictionary is then used to say which matches the frequently occurring data to an index. The
original data can then be restored using the dictionary. Works by creating an index visualised as a table.
When decompressed the dictionary is used to replace the tokens with the original text.

Now consists of
- dictionary index
- sequence of occurrences needed to recreate the file.

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

run length coding

A

Ideal for compressing bitmap images, RLE, is 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.

For example, the string AAAAAABBBBBCCC could be represented as A6B5C3.

In order to work well, run length encoding relies on consecutive pieces of data being the
same - if there’s little repetition, run length encoding doesn’t offer a great reduction in file size.

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

encryption

A

Encryption is used to keep data secure when it’s being transmitted., the process of encoding a message so it can only be read by the sender and the intended recipient.

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

key

A

to decrypt the message, the recipient needs to know how many places the alphabet has been sifted by (key). If they know the key, they can decrypt it, aim of encryption is to make the original message impossible to crack without the key.

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

symmetric encryption

A

A single key is used for both encrypting and decrypting a message, both the sender and receiver share the same private key, which they distribute to each other in a process called a key exchange. Both need to keep it secret.
The same key can be used multiple times. A unique key can be generated each time in an attempt to make it harder to crack.
However there is a danger that a message can be cracked by either the interception of the key, duplication of the key production process to acquire a copy of the key.

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

asymmetric encryption

A

Used when sending/receiving sensitive info like card details as it’s more secure.
Two different keys are used, starting with the un-encrypted message and encrypt it with the first key. Then when sent, the recipient decrypts the message with the second key.
Virtually impossible to derive one key from another, which is why its more secure for encryption.
Keys are generated so anything encrypted with one of the keys can be decrypted with the other = key pairs. One being public and second, private.

The public key can be published anywhere, free for the world to see, often stored in secure servers (key safes), so anyone can access it while the private key must be kept secret.

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

How does the public/private key make encryption more secure

A

First thing that happens is the sender and recipient exchange copies of public key. If the recipient want to communicate privately, they will use the senders public key to encrypt her message, then the sender would use the private key to decrypt it. No one can intercept the massage as they can’t decrypt it without the private key.
Another advantage is the sender can encrypt their message with their private key, and as their public key can be accessed by anyone, anyone can decrpyt it. This means the message can only be decypted if it’s originally encrypted with their private key, confirming the message is authentic.

If the sender wants to send a message, they would sue their private key and the recipients public key (combined encryption key). Using the CEK to encrypt a message and send it. To decrypt it the recipient would use their private key and their copy of the senders public key.

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

advantages to asymmetric encryption

A

No one else will be able to read the senders message
The recipient knows no one else can read the senders message
Can be sure the message is authentic
Can be sure the message hasn’t been modified.

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

difference between symmetric and symmetrical encryption

A

In contrast to symmetric encryption, a single key cannot be used to both encrypt and decrypt communication. Instead, messages encrypted with the recipient’s public key can only be decrypted with the recipient’s private key, which should only be in the possession
of the recipient.

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

Hashing

A

Hashing functions transforms a string of characters into a fixed length value or key that represents the original input string. Hashing function contains an algorithm that converts the input data, e.g. SHA-1 or MD5.
Since the hash value is generated from the entire input message, even a slight change produces a different hash value.

17
Q

difference between encryption and hashing

A

Hashing is a one way process., you can’t go back to the original value from the hashed value even if you have access to the original hashing algorithm.
This makes hashing useful for storing passwords.

18
Q

Uses of hashing

A

For preventing info like passwords being read by hacker. A hashing function is applied allows the password to not be sent in plain text or stored in the online system, meaning a hacker accessing the password file will only see the hashed values of them. And since hash is one way, they cant obtain the actual passwords.
The next time a user attempts log in , the password is checked by applying a hashing function to the password entered, then comparing the hashed value to the one stored.

Can also be used for quick searching, insertion and deletion of data structures. By using hashing, we don’t need to search the data structure to find an entry, just input what we are looking for and apply has function to find the item we want. Items don’t need to be sorted.
Hashing provides a constant O(1) time complexity.

19
Q

Hash tables

A

Another use of hashing is hash tables. A hash table is a data structure which holds key-value pairs. Formed from a bucket array and a hash function, hash tables can be used to lookup data in an array in constant time. 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.
Hash tables are used extensively in situations where a lot of data needs to be stored with
constant access times. For example, in caches and databases.
If two pieces of data (keys) produce the same hash, a collision is said to have occurred.

A good hash function should have a low chance of collision and should be quick to calculate. Furthermore, a hash function should provide an output which is smaller than the input it was provided, otherwise searching for the hash could take longer than simply searching for the key.