17 Security Notes
17 Security Notes
Encryption is the conversion of electronic data into another form, called cipher text, which cannot
be easily understood by anyone except authorized parties.
The word encryption comes from the Greek word kryptos, meaning hidden or secret.
Encryption makes the data meaningless unless the recipient has the necessary decryption tools.
There are two types of encryption:
SYMMETRIC ENCRYPTION is a method of encryption in which one key is required to encrypt and
decrypt the data.
ASYMMETRIC ENCRYPTION (also known as Public Key Encryption)is a method of encryption in which
one key (public key) is required to encrypt and other key (private key) to decrypt the data.
Symmetric Encryption
Message character N O P Q R S T U V W X Y Z
Substitute character X M W J B K E A H S Y R T
Assume all messages are made up from the upper-case characters only.
Show the string after the message AT SEVEN is encrypted.
................................................................................................................................................
................................................................................................................................................
...........................................................................................................................................[2]
Show the string after a cypher text “FMIWKGD IPKEOBK” is decoded.
................................................................................................................................................
................................................................................................................................................
......................................................................................................................................... [2]
Symmetric encryption uses a single key.
Explain how a message is encrypted and decrypted using symmetric encryption.
................................................................................................................................................
................................................................................................................................................
......................................................................................................................................... [2]
4 | Page
ASYMMETRIC (PUBLIC KEY) ENCRYPTION
Public-key encryption is a cryptographic system that uses two keys
-- a public key known to everyone
-- and a private or secret key known only to the owner of the key.
If a message is encrypted by Public key it can only be decrypted by associated Private
key.
If a message is encrypted by private key it can only be decrypted by associated public key.
Example 1: When Bob wants to send a secure message to Alice, he uses Alice’s public
key to encrypt the message. Alice then uses her private key to decrypt it. (To make not-
understandable for others)
Example 2: When Alice wants to ensure that the message is sent by her (to verify the
sender and message is not altered, not to make message secure (may remain readable
for others), she encrypts her message using her own private key.
Then the message is transmitted to Bob.
Bob decrypts the message using Alice’s public key.
The decryption of message by Alice’s public key confirms that this is Alice’s message, and
is without any alteration.
5 | Page
Example 3 (Exam style question): Bill, a manager of a company, sent an email with very
sensitive information to a work colleague, Alison. However, Bill also accidentally sent it to
everybody in the company.
Describe the method used that ensured only Alison was able to read the original contents
of the email.
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
..................................................................[4]
Answer Key
Manager encrypts email using Alison’s public key
Alison decrypts email his own private key
https://www.us-cert.gov/ncas/tips/ST04-014
If an organization wants to have a secure web site that uses encryption, it needs to obtain a
site, or host, certificate.
There are two elements:
➢ a closed padlock,
➢ URL that begins with "https:"
rather than "http:"
If a web site has a valid certificate, it means that a certificate authority has taken steps to
verify that the web address actually belongs to that organization. When you type a URL or
follow a link to a secure web site, your browser will check the certificate for the following
characteristics:
1. The web site address matches the address on the certificate
2. The certificate is signed by a certificate authority that the browser recognizes as a
"trusted" authority
If the browser senses a problem, it may present you with a dialog box that claims that there
is an error with the site certificate.
If you have chosen not to trust the company who issued the certificate, or if the certificate
has expired. You will usually be presented with the option to examine the certificate, after
which you can accept the certificate forever, accept it only for that particular visit, or choose
not to accept it.
7 | Page
Obtaining Digital/Security certificates
Digital certificates are used in Internet communications. A Certificate Authority (CA) is
responsible for issuing digital certificates.
It contains Name of certification authority, Public key of company and Expiry date.
The method of issuing a digital certificate is as follows:
1. A user starts an application for a digital certificate using their computer. On this
computer a key pair is generated. This key pair consists of a public key and an
associated private key.
2. The user submits the application to the CA. The generated public key and other
application data are sent.
3. The key and data are encrypted using the CA’s private key.
4. The CA creates a digital document containing all necessary data items and signs it
using the CA’s public key.
5. The CA sends the digital certificate to the individual.
8 | Page
HASHING ALGORITHM
The hashing algorithm takes a message or a key and translates it into a string of
characters usually shown in hexadecimals essentially makes the message or key almost
impossible to read ‘meaningless’ text. This is also known as message digest.
Plain Text
1234 5678 9012 3456
Message Digest Algo 4 MD4
Cypher Text
543FC7DDEA0CF5EAF84279CBADCA180D
Authentication
Authentication means the receiver is certain who sent the cipher text.
For authentication passwords, digital certificates and digital signatures are used/
Digital signature
A digital signature is a mathematical scheme for verifying the authenticity
of digital messages or documents. A valid digital signature gives a recipient reason to
believe that the message was created by a known sender (authentication), that the sender
cannot deny having sent the message (non-repudiation), and that the message was not
altered in transit.
How digital signature works
• Sender applies HASH algorithm on the message.
• Message digest is created.
• Sender encrypts the message digest using his own private key. This encrypted
message digest is called Digital Signature.
• Plain text along with digital signature is sent to recipient.
Lower- and
upper-case
letters, symbols
Lowercase and numbers
letters Characters long 8 hours to
5 sec to hack
hack.
13
4 mins to hack. letters
16K years
to hack
Lower and
upper case
letters, symbols
Lowercase and numbers
Characters long
letters
1 year to hack 2M years to
hack
11 | P a g e
Quantum Key Distribution
Quantum key distribution (QKD) is a secure communication method which implements a cryptographic
protocol involving components of quantum mechanics. It enables two parties to produce a shared random
secret key known only to them, which can then be used to encrypt and decrypt messages.
https://www.youtube.com/watch?v=LaLzshIosDk
How Does QKD Work?
QKD works by transmitting millions of polarized light particles (photons) over a fibre optic
cable from one entity to another. Each photon has a random quantum state, and collectively
all the photons create a bit stream of ones and zeros. For example:
Bit values sent 1 0 1 1 0 0 0 1 0 1
Polarisation basis
When the photons arrive at the endpoint, the receiver uses beam splitters (horizontal/vertical
and diagonal) to “read” the polarization of each photon. The receiver does not know which
beam splitter to use for each photon and has to guess which one to use. After the receiver
tells the sender which beam splitter was used for each of the photons in the sequence they
were sent, the sender then compares that information with the sequence of polarizers used
to send the photons. The photons that were read using the wrong beam splitter are
discarded, and the resulting sequence of bits becomes a unique optical key that can be used
to encrypt data.
Bit values sent 1 0 1 1 0 0 0 1 0 1
Polarisation basis by sender
Polarisation chosen by receiver
Bit values confirmed 1 0 0 1
Encryption Key generated 1001
12 | P a g e
What makes QKD unbreakable?
The security of QKD stems from the ability to detect any intrusion on the QKD transmission.
Because of the unique and fragile properties of photons, any third party (or eavesdropper)
who tries to read or copy the photons in any way will change the photons’ state.
The change will be detected by the endpoints, alerting them that the key has been tampered
with and must be discarded. A new key is then transmitted. Moreover, since the keys
generated are truly random, they are protected from future hacking attempts.
Drawback of Quantum Key Distribution
The main drawback of quantum cryptography is that it cannot be implemented using
standard communication media. It requires a dedicated, special purpose ‘quantum
channel’ between sender and receiver. The costs of providing this are very high so routine
use is unlikely.
0-9618 Specimen Paper 3
5 Ed wants to send a message securely. Before sending the message, the software
encrypts it using a symmetric key.
(a) (i) Describe what is meant by symmetric key encryption.
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
............................................................................................................. [2]
(ii) State two drawbacks of using symmetric key encryption.
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
............................................................................................................. [2]
(b) The symmetric key is to be exchanged before the message is sent.
To exchange the key securely, the use of quantum cryptography is being considered.
State two possible benefits of using quantum cryptography.
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
13 | P a g e
................................................................................................................................................
........................................................................................................................................ [2]
8 (a) Describe the purpose of the Secure Sockets Layer (SSL) and Transport Layer
Security (TLS) protocols.
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
.......................................................................................................................................... [2]
(b) Explain how SSL/TLS protocols are used when a client-server communication is
initiated.
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
................................................................................................................................................
.......................................................................................................................................... [4]
14 | P a g e
Q1) In a simple symmetric encryption system, each letter of the alphabet is substituted
with another. The plain text message:
The Quick brown Fox jumps over a lazy dog.
becomes the cypher text message:
Zag towns jumpy Dmh coilv mwgu f bfke rmq