1.3: Exchanging Data Flashcards

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

What is compression?

A

Compression is the process used to reduce the storage space required by 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

Why is compression important?

A

Compression is particularly important for sharing files over networks or the Internet. The larger a file, the longer it takes to transfer and so compressing files increases the number of files that can be transferred in a given time.

E.g. Apps like Google Photos compress files so that they can quickly be searched for and downloaded. Downloading a compressed file over the Internet is faster than downloading the full version of the file.

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

Benefits of compression?

A
  • Data is sent more quickly
  • Less bandwidth is used as transfer limits may apply
  • Buffering on audio and video streams is less likely to occur
  • Less storage is required
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is lossy compression?

A

As the name suggests, lossy compression reduces the size of a file by permanently removing data deemed non-essential. 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
5
Q

Example of lossy file type?

A

.JPG, .MP3, .MP4

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

What is lossless compression?

A

Lossless compression reduces the size of a file without losing any information by spotting and summarising patterns in the data.

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

Example of lossless file type?

A

.zip, .png

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

Difference between lossy and lossless?

A

When using lossless compression, the original file can be recovered from the compressed version. Something which is not possible when using lossy compression which reduces the size of the file by completely disregarding some information.

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

How can audio files be compressed using lossy compression?

A

For example, audio files can be compressed lossily by removing the very high or very low frequencies which are least noticeable to the ear and by removing quiet sounds that are overlapped with louder sounds. There’s no way to go from the lossy version of the recording back to the full version as there’s no record of what the high and low frequencies were.

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

What is RLE?

A

Run length encoding is a method of lossless compression in which consecutive 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.

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

When does RLE work well?

A

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. Image and sound data often have a lot of repetition.

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

What is dictionary encoding?

A

Dictionary encoding is another example of a method of lossless compression. Frequently occurring pieces of data are replaced with an index and compressed data is stored alongside a dictionary which matches the frequently occurring data to an index. The original data can then be restored using the dictionary. The dictionary produces additional overheads but the space saving negates this problem.

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

Can dictionary compressed data be used without the dictionary?

A

No - It’s important to remember that data compressed using dictionary compression must be transferred alongside its dictionary. Without a dictionary, the data cannot be used.

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

What is encryption?

A

A way of making sure data cannot be understood if you don’t possess the means to decrypt it

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

What is encryption used for?

A

Encryption is used to keep data secure when it’s being transmitted. There are a variety of different methods which can be used to scramble data before it’s transmitted and then decipher it once it arrives at its destination.

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

What are two methods of encryption?

A
  • Ceasar cipher

- Vernam cipher

17
Q

Ceasar cipher?

A

The Caesar cipher is most basic type of encryption and the most insecure

Letters of the alphabet are shifted by a consistent amount

18
Q

Methods of cracking a ceasar cipher?

A
  • Brute force attackA brute force attack attempts to apply every possible key to decrypt ciphertext until one works

-Frequency analysis

Frequency analysis consists of counting the occurrence of each letter in a text. Frequency analysis is based on the fact that, in any given piece of text, certain letters and combinations of letters occur with varying frequencies. This will help us decrypt some of the letters in the text.

19
Q

Vernam cipher (+what should the key be)?

A

The encryption key, also known as the one-time pad, is the only cipher proven to be unbreakable.

The key must be:

  • a truly random sequence greater or equal in length than the plaintext and only ever used once
  • Shared with the recipient by hand, independently of the message and destroyed immediately after use
20
Q

How are messages encrypted and decrypted? (Vernam)

A

Encryption and decryption of a message is performed bit by bit using an exclusive or (XOR) operation with the shared key. XOR means that there can only be one occurence, two occurences does not count.

21
Q

Sources where the one-time pad can be generated from?

A

Sources may include: atmospheric noise, radioactive decay, the movements of a mouse or snapshots of a lava lamp.

22
Q

Why is the one-time pad so effective?

A

A truly random key will render any frequency analysis useless as it would have a uniform distribution.

23
Q

Why can you not use computer generated random sequences for the one-time pad?

A

Computer generated ‘random’ sequences are not actually random.

24
Q

What are the things needed to crack a cipher?

A

Given enough ciphertext, computer power and time, any key (except the one-time pad) can be determined and the message cracked.

25
Q

What are the two types of encryption?

A

Symmetric Encryption, Asymmetric Encryption

26
Q

Symmetric Encryption?

A

In symmetric encryption (also known as private key encryption), both the sender and receiver share the same private key, which they distribute to each other in a process called a key exchange. This key is used for both encrypting and decrypting data.

It’s important that the private key is kept secret. If the key is intercepted during the key exchange then any communications sent can be intercepted and decrypted using the key.

27
Q

Asymmetric Encryption?

A

When sending information using asymmetric encryption, two keys are used: one public and a second, private, key. The public key can be published anywhere, free for the world to see, while the private key must be kept secret. Together, these keys are known as a key pair and are mathematically related to one another.

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.

28
Q

What does someone need to do to send you a message using asymmetric encryption?

A

If someone wants to send you a message, they must first find your public key. There are a variety of websites which can do this for you. The message is then encrypted with your public key meaning that only you can decrypt it.

29
Q

What are digital signatures?

A

If you want to prove that a message has been sent by you, you can encrypt it using your private key. This means that anyone can decrypt it (as your public key is available to anyone) and by doing so, can guarantee that you encrypted the message, as only you have access to the private key. This forms the basis of a system called digital signatures.

30
Q

What is hashing?

A

Hashing is the name given to a process in which an arbitrary length input (called a key) is turned into a fixed size value (called a hash). There are a vast number of algorithms, called hash functions, which do this.

31
Q

Difference between hashing and encryption? (And give an example of when this difference might be useful)

A

Unlike encryption, the output of a hash function can’t be reversed to form the key. This quality makes hashing useful for storing passwords. A password entered by a user can be hashed and checked against the key’s hash to see if it is correct, but a successful hacker would only gain access to the hashes, which can’t be reversed to gain the passwords.