1.4 Coding, Encoding and Encrypting Data A Level IT
1.4 Coding, Encoding and Encrypting Data A Level IT
1.4 Coding, Encoding and Encrypting Data A Level IT
to coding of
Garbage Out). If you collect data and enter it
into the system without careful consideration at
the planning stage then the output from your
What is
coding of This usually means shortening the original data in an agreed
manner.
data?
The agreement is between the users of the system.
Example 1
Coded data: Mon; Tues; Wed;
Thurs; Fri
Original data: Xtra Large; Large;
Medium; Small
Example 2
Coded data: XL; L; M; S
• What do you think the following codes might
represent?
• RG935LR
• CV183TP
Example 3 • The above examples could be postcodes.
They represent a street name, a particular
part of the street and the town where the
street is located.
• How about:
• SK12BN
• TR14GN
• Let's propose that these are codes for clothes in an online shop.
• These might be a little bit more difficult because the code is
made up from different representative parts. Let's have a closer
look.
Increase
accuracy of Instead of entering 'Male' or 'Female' you could code the data and
instead enter it as 'M' or 'F'.
data entry
Data entry can be more accurate Meaning of data can be obscured Advantages and
Validation can further improve accuracy
Coded data can be more secure if people Might run out of code combinations
don't know what it means
Encoding
Data
Learning • evaluate the need for encoding data and
analyse the different methods that can be
Objectives used to encode data (including: codecs)
When data is encoded,
it is stored in a specific
format.
Computers do not
recognise text, sound One means on and
and images in the zero means of .
same way we do.
Encoding
Computers use binary A typical binary
digits which are 1s and number would look
0s. like this: 11011010.
4 = 16 colours
16 = 65536 colours
24 = 16 million colours
Compression Type
• Sampling
• Sample Rate: Number of audio samples
per second
• Higher sample rate, higher quality
Encoding Sound of sound
• More samples, more storage
required
• Measured in Hertz
Encoding Sound
Bit Depth: Number of bits used for each sound clip
• Higher bit depth, high quality of sound
• A CD sound file has a sample rate of 44.1 kHz, a bit depth of 16 bits and
two channels (left and right for stereo)
• Bit Rate= 44100 x 16 x 2 = 1411200 bps = 1.4Mbps
• 1.4 Megabits are required to store every second of audio.
• For a 3 minute 30 second audio file(210 seconds)
• File size= 1411200x 210 = 29635200 bits
• 296 Megabits
Compressing
Audio Files May Use lossless or lossy Lossy compression reduces
compression bit rate, decreasing quality
Example
Encoding Videos
Bit Rate VS Frame Rate
Bit Rate: Number of Bits Frame Rate: Number of Higher frame rate
processed per second frames per second requires higher bit rate
Compressing Videos
evaluate the need for encryption and how it can be used to protect data such as on a hard
Evaluate disk, email or in HTTPS websites
discuss encryption protocols (including: the purpose of Secure Socket Layer (SSL)/Transport
Discuss Layer Security (TLS) and the use of SSL/TLS in client server communication)
Encryption is the
process of scrambling
Encryption data in such a way that
only legitimate users
can read it.
Plaintext, Ciphertext
Types of
Encryption
Assymetric key encryption
Symmetric Encryption
• The word 'symmetric' is used because the same key is used for both
encryption and decryption.
Symmetric Encryption
• The symmetric key must be kept secret by legitimate systems using it.
• A symmetric digital key must be long enough that it becomes infeasible for a
normal sized computer to crack the encrypted message in a reasonable
amount of time.
Symmetric Encryption
• The strength of the key is determined by its bit length. For example a 128 bit
symmetric key would take a maximum of 2128 brute force attempts to guess
it. At the moment 128 bits is a good balance between privacy for day-to-day
use and the processing overhead needed to do the encrypt and decrypt.
• You have probably seen this used in wartime spy movies. Agent A and Agent
B agree to use a certain book, the huge 'War and Peace' book maybe. Then the
message is created by referencing a letter or word in various pages within the
book.
• For example the code might be 434. Meaning use the 34th letter on page 4.
• The whole scheme relies on no-one knowing which book is being used.
Asymmetric Encryption
SSL/TLS
could process bank card payments securely and
to help reduce card fraud. This is achieved by
setting standards for the storage, transmission
and processing of bank card data that
businesses deal with.
• improve customer trust. If customers know that
a company is using the SSL/ TLS protocol to
protect their website, they are more inclined to
do business with that company.
• As well as encrypting internet traffic, this protocol
verifies the identity of the server.
• Any website with an HTTPS address uses SSL/TLS.
In order to verify the identity of the server, the
SSL/TLS
web browser and the server to be the
website.
works
In order to open an SSL/TLS connection,
a client needs to obtain the public key.
Step 2:
A handshake, in IT terms, happens when two
devices want to start communicating.
g
channel.
Step 3: The list of ciphersuites has the client’s preferred type at the
top and its least favourite at the bottom.
Choosing
the type of
The server responds with a message which contains the
ciphersuite it has chosen from the client’s list.
Encryption The server also shows the client its SSL certificate.
completion
of Authentication of the client is optional in the
process.
handshake
The client sends the server another message,
encrypted using the secret key, telling the
server that the client part of the handshake
is complete.
Uses of encryption
• When a file is written to the disk, it is
automatically encrypted by specialized
software.
Hard Disk • When a file is read from the disk, the software
automatically decrypts it while leaving all
other data on the disk encrypted.
• The encryption and decryption processes are
understood by the most frequently used
application software such as spreadsheets,
databases or word processors.
• The whole disk is encrypted including data
files, the OS and any other software on the
disk.
• Full (or whole) disk encryption is your
protection should the disk be stolen, or just
left unattended.
• So, even if the disk is still in the original
computer, or removed and put into another
computer, the disk remains encrypted and
only the keyholder can make use of its
contents.
Another benefit of full disk encryption
is that it encrypts the data as soon as
Hard Disk
Encryption You do not have to do anything, unlike
with the encryption of files and
folders, where you have to individually
encrypt them as you go.
Drawbacks of Hard Disk Encryption
IF AN ENCRYPTED DISK CRASHES OR THE OS IMPORTANT TO STORE ENCRYPTION KEYS IN SAFE BOOTING UP COULD BE SLOWER
BECOMES CORRUPTED, YOU CAN LOSE ALL YOUR PLACE, BECAUSE AS SOON AS A DISK IS FULLY
DATA PERMANENTLY OR, AT THE VERY LEAST, ENCRYPTED, NO ONE CAN MAKE USE OF ANY OF
DISK DATA RECOVERY BECOMES PROBLEMATIC. THE DATA OR SOFTWARE WITHOUT THE KEY
• Using only a username and password doesn’t
guarantee emails are encrypted
• The first is to encrypt the actual connection
from the email provider, because this
prevents hackers from intercepting and
acquiring login details and reading any
messages sent (or received) as they leave (or
arrive) at the email provider’s server.
Email • Then, messages should be encrypted before
sending them so that even if a hacker
intercepts the message, they will not be able
to understand it. They could still delete them
on interception, but this is unlikely.
• Finally, since hackers could bypass your
computer’s security settings, it is important
to encrypt all your saved or archived
messages.
• Asymmetric method is used
• Sender uses public key to encrypt
• Receiver uses private key to decrypt
• It is considered good practice to encrypt
all email messages.
• If only the ones that are considered to be
HTTPS
transmit confidential information such as
credit card numbers, social security
numbers and login credentials over the
internet securely.
• If they used an ordinary HTTP website,
data is sent as plain text, which could
easily be intercepted by a hacker or
fraudster
• Indicators that you are using a secure site
are the inclusion of the HTTPS:// prefix as
Indicators of the starting part of the URL.
HTTPS
required to load an HTTPS website tends to be
greater.
• Websites have to ensure that their SSL certificate
has not expired and this creates extra work for
the host as it has to keep on top of certificate
management
• Takes more time and additional processing
power to load encrypted data.
• When browsing, the client and server must
send messages to each other several times
before any data is transmitted.
of Encryption
possible for the data to be recovered by the
reissuing of the digital certificate, but this can
take time and, in the meantime, if a hacker has
managed to get hold of the key, they will have
full access to the encrypted data.
• In addition, users can get careless and forget
that decrypted data should not be left in the
decrypted state for too long, as it then becomes
susceptible to further attack from hackers.
Disadvantages of Encryption