An analogue signal is a natural sound wave that is continuous. It can change as frequently as required
A digital signal is a discrete format that aims to represent analogue signals
Analogue data would be continuous with no limits to the values it could take, while digital can only take particular values
An analogue to digital converter (ADC) takes an analogue signal output by an analogue sensor (eg a microphone) and converts it into a digital signal
A digital to analogue converted (DAC) is a device that converts a digital signal into an analogue one, most commonly to convert digital audio into analogue sound waves
The sampling rate is the speed at which something is recorded, and the sampling resolution is the detail to which it is recorded
Sampling rate is how frequently the amplitude of a sound wave is recorded. The higher/more often, the smoother the recording
Sampling resolution is the number of bits allocated to each sample - in other words, how many amplitudes can be represented
The Nyquist theorem states that to accurately record a sound, the sampling rate must be double the original frequency. Human hearing is between 20Hz to and 20,000Hz, so CDs are typically 44,100Hz.
The size of an audio file is calculated by sample rate in seconds x sample resolution x length of recording in seconds
Musical instrument digital interface - MIDI - is a technical standard that allows instruments to be synthesised electronically
Vectors are to bitmaps as MIDI is to sound recordings
Electronic instruments can be connected to computers using MIDI to directly record inputs rather than the analogue sound
MIDI stores sound as event messages, which contain instructions that recreate sound, such as the pitch, volume, timbre and duration
MIDI isn't practical for storing speech and may produce a less realistic sound than recording analogue sound
MIDI makes it easy to manipulate individual instruments and notes. File sizes are also much smaller and use lossless compression
We can compress files to make their file size smaller. This makes it faster to transfer files across a network as there is less data to send. This is most commonly done to images but we can compress audio and text too.
Lossy compression removes data from the file. The original cannot be reconstructed. This can decrease size significantly but may result in a loss of quality
Lossless compression decreases file size without removing any data, so the original quality of the file is maintained. However it does not decrease file size as much as lossy
Lossy is less suited for some file types such as text
Dictionary-based compression creates a dictionary of repeating patterns (eg words) and stores the data by referring to each entry in the dictionary. This becomes more effective the greater the data
Run length encoding (RLE) replaces any information repeated in sequence with one occurrence of it and how many times it is repeated. For some data, this is not possible
Encryption means encoding a message so it can only be read by the sender and recipient. It must be secure so that, if intercepted, it cannot be understood
Unencrypted information is knows as plaintext; encrypted information is known as ciphertext
A cipher is any method of encryption
Decrypting ciphertext requires you to know both the encryption method and the key used to encrypt
Caesar cipher is an incredibly simple cipher. It is usually a shift cipher where the alphabet is 'shifted' by whatever the key is, so that the ciphertext is however many letters further down the alphabet, consistent across all letters
Shift ciphers are the easiest to crack because there are only 25 possible keys so it is easy to brute force
Caesar ciphers could also be substitution ciphers. Letters are randomly replaced with other letters. This is easy to crack because some letters in English are more frequent than others
The Vernam cipher is a one-time pad cipher that offers perfect security if:
-The key (one-time pad) is the same length or longer than the plaintext
-The key is truly random
-The key is only used once, then destroyed
Because it is random, cryptoanalysis will not find any patterns in the ciphertext.
For Vernam cipher, the key must be delivered securely in-person to ensure it is not intercepted. However this means it is impractical for long distances and cannot be used over the internet, because the key must be sent and encrypted, and all other types of encryption are theoretically crackable
Other ciphers, in theory, could be cracked with enough ciphertext and time. They simply cannot be brute-forced in a reasonable timeframe with current computing power - so they are reliant on computational security
Vernam cipher is the only cipher that has ever been mathematically proven to be secure
The Vernam cipher works by:
-Aligning the characters of the plaintext and key
-Converting them into binary (eg with ASCII)
-Applying an XOR operation
-Converting the result back to a character - this is the ciphertext
The key in a Vernam cipher can also be used to decrypt ciphertext back into plaintext by applying the XOR operation to the key and ciphertext