Encoding

Encryption

Encryption in the simplest form is meant to keep data safe and secure and only meant to be used by people who have been authorised by a secret key that can unlock the original text. Digital devices use encryption in their systems all the time when people are using Wi-Fi or credit cards for payment. Nearly every activity in the digital world has layers of encryption. If we didn’t have encryption, then we’d be in a lot of trouble as our information would be open for everyone to see. Anyone would be able see the data that is on your Wi-Fi, hard drives and SIM cards, all of which have some sort of information about you which would then make your device unusable.

Often, an encryption consists of two computer programs: one that in encrypts the data into a form that doesn’t make sense (cipher text) and the other decrypts the cipher text back into the normal text(plaintext). The encryption and decryption is carried out using clever math on the text with a chosen key.

Caesar Cipher

The Caesar Cipher is a simple form of encryption which uses a key (e.g. K=a) to tackle encrypted messages. For example, if I get a Caesar Cipher wheel and set the Capital K to equal lower-case a, I can write a message that requires that to be the key to be solved. Using K=a if I wanted to encrypt the word “HELLO WORLD” it would be ROVVY GYBVN. In terms of shifting the key I have used K as the key which means that I have shifted the key 10 times K is the 11th letter on the alphabet. This means that the key is 10.

Compression

Compression reduces the amount of data space needed to store files. If you can half the size of the file let it be text, audio or image then you can store more on a hard drive for the same cost as the original file. The common forms of compression that are currently used as of now are JPEG(images), MP3(audio), MPEG (videos including DVDs), and ZIP (for many types of data) e.g. the JPEG file method can reduce a photo to a tenth or smaller of its original size which means that not only can it upload to a website faster, but it can also download faster.

How compression works is that repetition within a file will allow for more compression. This is because of Run Length Encoding. Run Length Encoding looks for things within the file where things are repeating.


This is a quote from Little Britain that my teacher showed me to demonstrate repetition. The words from the quote have been colour-coded to show the patterns of repetition within the quote. To begin with, the phrase has started off with 32 words and 116 characters excluding spaces. With the patterns, that have been highlighted we can represent each common word with a number. Yeh=1 but= 2 no=3 nuthin= 4 …=5 on=6. Now that we can represent these common words using numbers we can make the quote.


The RLE method has now replaced the familiar words with numbers to represent this quote. Some words are still there as they’re uncommon within the quote but mostly the words in the quote have been replaced with numbers which means that it has been compressed. Now the number of characters have gone from 116 to only 72. This means that the file size of this quote from Little Britain has become smaller.

This is the way that data compression software such as ZIP compresses copious amounts of data such as pictures or music in which they are stored as binary 1’s and 0’s. There are patterns within data and this is used to make a file smaller in size which will reduce the data transmitted and the speed of that transmission.

Another example can be: AAAAAAAAAAAAAAAASSSSSUUU

This encodes to: 16A5S3U

We have a run of 16 A’s followed by 5 S’s and then 3 U’s. This was originally 24 characters which has now been compressed to 7 characters without any information loss.

This is another example of Run-Length encoding.