Compression and Encryption Flashcards

1
Q

What is the advantages of compression?

A
  • less space required to store information
  • more files can be stored
  • less bandwidth used in transmission
  • reduce congestion
  • increased transmission speed
  • improves playback with less buffering
  • multiple files can be stored in a single archive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is data compression?

A

Compression software uses algorithms to remove repeated or unnecessary data, to reduce the number of bits/bytes to store the file

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

What files can and cannot be compressed?

A
  • All can be compressed but only some use lossy compression e.g. audio, images
  • Text files can be compressed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between lossy and lossless compression?

A

Lossy: permanently losing information in order to reduce file size, e.g. reduce resolution in images or sound

Lossless: using algorithms to efficiently represent repeating patterns without losing data e.g. in text and EXE

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

What is run-length encoding?

A
  • reduce file size of a file by removing repeated information by replacing it with one example of what needs to be run followed by the number of times it needs to be run
  • not all data suitable if no repeating patterns
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are dictionary-based methods?

A
  • Words are stored in a dictionary, each with an **index number pointing to it **
  • The text is then encoded using the dictionary index values to represent each word
  • Dictionary must also be sent with the original file
  • Works best for long documents with many common words (not short texts with little repetition)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is encryption?

A
  • process of converting plaintext to ciphertext so it is not understandable if intercepted during transmission without the key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Define plaintext, ciphertext and cipher.

A

Plaintext: unencrypted information

Ciphertext: encrypted information

Cipher: encryption algorithm used

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

How does Caesar ciphers work?

A
  • substition cipher / shift cipher where key is distance that each letter is shifted by
  • e.g. key of +8 shifts it right 8, with loop from Z to A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why are Caesar ciphers bad?

A
  • not computationally secure
  • frequency analysis used to find common letters e.g. many E’s
  • finding one gives you whole key
  • can use crypt analysis (brute force) to break quickly
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do Vernam ciphers work?

A

1) Align plaintext and key (both in binary and key.Length >= plaintext.Length)
2) Apply logical XOR bitwise on each
3) Convert binary back to characters

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

Why is a Vernam cipher secure?

A
  • key is generated randomly
  • cannot be cracked in a reasonable timeframe with current computing power (computationally secure), perfectly secure
  • only known computationally secure cipher
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is computational security?

A

If a cipher cannot be cracked within a reasonable timeframe with current computing power, it is computationally secure.

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

Why is the Vernam cipher perfectly secure?

A

MARK SCHEME:
- Brute force would not work as key is randomly chosen, too many possible keys to try all of them (and multiple plaintexts can be derived)
- Different plain text letters can map onto the same plaintext letter, so frequency analysis does not happen as cipher text letters have uniform probability

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

What is run-length encoding in images?

A
  • Stores the colour of a pixel and a count, where the count is the total numbers of pixels of that pixel’s colour in a run until the next different coloured pixel
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What conditions must be satisfied for the Vernam cipher to offer perfect security?

A

1) key must be generated completely at random
2) key must be greater than or equal to the length of the plaintext
3) key must be used only once