Unit 5
Encryption
Encryption: The process of changing a message to make it unreadable without a special key
Cipher: A method of encrypting a message
Plaintext: The message before encryption
Ciphertext: The message after encryption
Caesar Cipher
Works by offsetting by a fixed amount
Reason it worked
There was very little movement at the time, so people didn't know many other languages
People were also less educated so higher illiteracy rates
Easily broken using frequency analysis
Finds the most common characters and replaces them with the most common characters in the language
Vernam Cipher
Mathematically perfect cipher
Uses a one-time pad, each key should only be used for one cipher, so a new key is used each time
Uses XOR gates to create the key and ciphertext
Main problem is that the key cannot be encrypted, so if the key is intercepted, the cipher is easy to decrypt
Sound
Sample Rate: Number of samples per second (Hz)
Sample Resolution: Number of bits per sample
ADC: Analogue to digital converter
Used because computers cannot store analogue
Analogue is continuous whereas digital is discrete
Quantinisation: Mapping sound onto binary
Nyquist Theorem
MIDI
Suggests to get an accurate recording, the sample rate has to be at least double of the highest frequency in the original sound
Musical Instrument Digital Interface
It is a standard to transmit and store music
Originally designed for digital music synthesizers
Describes
A protocol
Digital Interface
Standard set of connectors
Controllers send and receive an event message to each device including
Duration of note
Pitch
Volume Change
Vibrato
Tempo Synchronisation
NOT a digital recording
It is a list of instructions
MIDI file uses less disk space than traditional digital recording
Files are easier to edit
Compression
Lossless
Data is compressed without permanently removing data
Run length encoding
Generally larger file size than lossy
Useful for things with long runs of data such as binary
Not good for text as there is not many repeated long runs of data.
Dictionary Based Methods
Works by identifying sequences that are repeated at various points in a file
Works by identifying long runs of data and replaces them with the data and a symbol of how many times it is repeated
Maps a key with a value and then replaces all the instances of the value with the key
Lossy
Works by permanently removing parts of the data that aren't needed
They have generally smaller file sizes than lossless compression
Good for things like images but not text
JPEG, MP3
Error Checking