0% found this document useful (0 votes)
92 views

CRYPTOGRAPHY

The document provides information about cryptography including: 1. The intended learning outcomes which are for learners to understand basic cryptography concepts and perform encryption/decryption techniques. 2. The topics to be covered include related terms, Caesar cipher, substitution cipher, transposition cipher using columns and keywords. 3. Examples are given of the Caesar cipher, substitution cipher, and transposition cipher for both encryption and decryption. The security of encryption methods and brute force attacks are also discussed.

Uploaded by

Angelic Pantoja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

CRYPTOGRAPHY

The document provides information about cryptography including: 1. The intended learning outcomes which are for learners to understand basic cryptography concepts and perform encryption/decryption techniques. 2. The topics to be covered include related terms, Caesar cipher, substitution cipher, transposition cipher using columns and keywords. 3. Examples are given of the Caesar cipher, substitution cipher, and transposition cipher for both encryption and decryption. The security of encryption methods and brute force attacks are also discussed.

Uploaded by

Angelic Pantoja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Prelims – Topic 1, Week 1

Cryptography

1.1 Teaching learning outcomes and list of Topics


1.1.1 Intended Learning Outcomes:
At the end of the topic the learners are able to:
 understand the basic concepts of cryptography and use different
types of coding schemes to encrypt and decrypt different types of
information for identification, privacy and security purposes.
 perform basic substitution cipher and transposition cipher
 encrypt and decrypt messages
 perform transposition cipher using a keyword for decryption

1.1.2 List of Topics


 Cryptography – related terms and definitions
 Ceasar Cipher & Substitution Cipher
 Transposition Cipher using Columns
 Transposition Cipher using Keywords for decryption
1.2 Teaching and learning Activities
1.2.1Activate Prior Knowledge
Today, most of our documents and files are stored in computers
where they are converted into electronic form. Due to this advancement
of technology, these files and documents are vulnerable to hacking and
the information in these files could be used to steal one’s identity or steal
one’s money. Cryptography is one of the ways to protect information.
Can you read the lines?
Let’s see if you have a natural talent in cryptography....... ... ... ..
1. A dootcr has a tageene ceacnr pintaet who deid aetfr a hatospil durg
blendur.
2. Big ccunoil tax ineesacrs tihs yaer hvae seezueqd the inmcoes of mnay
nrsues.
3. Tihs pgae ‘jbemlus’ txet, keepnig the frist and lsat lteetr of ecah wrod
and ralmnody sbrnlamicg enyveihtrg in beetwen. Sinrlrsigpuy, it’s stlil pttrey
rdlaaebe. You can raed mroe aoubt it hree. Try it for yelsrouf!

This page ‘jumbles’ text, keeping the first and last letter of each word and
randomly scrambling everything in between. Surprisingly, it’s still pretty
readable.
1.2.2 Acquire New Knowledge
1.2.2.1 Definition of Terms
Cryptography is the science of using mathematics to encrypt and decrypt data.
Cryptography enables you to store sensitive information or transmit it across
insecure networks so that it cannot be read by anyone except the intended
recipient.
Plaintext - is the original message or original data that needs to be encrypted. In
simple terms, and original message that needs to be encrypted is known as
plain text.
Ciphertext - is the encrypted message or output message which is produced as
output. It mainly depends on plaintext and secret key.
Encryption Algorithm - is an algorithm which transforms and substitutes the
plaintext in to Ciphertext.
Decryption - is the process of converting from ciphertext to plain text is called as
decryption or deciphering.
Cryptanalysis - is a technique which used to decipher a ciphertext without
knowledge of encryption details. “Breaking of Code”
Cryptology - Cryptography and cryptanalysis have together known as
cryptology.
1.2.2.2 Basic Cryptography
I. Substitution Cipher - each letter is replaced with a letter some fixed
number of positions in the alphabet
A. Shifted Alphabet Code / Ceasar Cipher - each letter is replaced with a letter
some fixed number of positions in the alphabet
Example 1: Use the Caesar cipher with shift of 3 to encrypt the message: DURA
LEX SED LEX.
Mapping:

Image Credit:https://en.wikipedia.org/wiki/Caesar_cipher

Original Message: DURA LEX SED LEX


Encrypted Message: GXUD OHA VHG OHA
Note: To obscure the message, the letters are often rearranged into EQUAL sized blocks
to hide the size of the words used and nonsense letters are added to complete the last
block.

Encrypted Message:GXU DOH AVH GOH APH


Example 2: Decryption – Working Backwards
Decrypt the message ZHKDY HDTXL CWRPR UURZA if it was encrypted
using Caesar cipher with shift 3.
Mapping:

A B C D E F G H I J K L M N O P Q R S T U V WX Y Z

X Y Z A B C D E F G H I J K L M N O P Q R S T U V W

Obscured Message: ZHKDY HDTXL CWRPR UURZA


Original Message: WEHAV EAQUI ZTOMO RROWX
Note: To retrieve the hidden message, the letters are often rearranged to form a word /
phrase and remove the nonsense character/s added.

Original Message: WE HAVE A QUIZ TOMORROW

Example 3: Use the Caesar cipher with shift of 15 to encrypt the message:
PERICARDITIS.
Original Message: PERICARDITIS
Encrypted Message: ETGX RPGS XIXH

Example 4: Decrypt the message below if it was encrypted using a shift cipher
with shift 20.
Encrypted Message: QIL EMG ULN HIN QIL EBU LXU
Original Message: WOR KSM ART NOT WOR KHA RDA
Original Message: WORK SMART NOT WORK HARD
Alberti cipher disk (1400s)
In a cipher disk, the inner wheel could be turned to
change the cipher shift. The larger one is called Stabilis
(stationary or fixed), the smaller one is called Mobilis
(movable).
Encryption Security
• The security of a cryptographic method is very important to the person
relying on their message being kept secret. The security depends on two
factors:
a. the security of the method being used
b. the security of the encryption key used
• In the case of a shift cipher, the method is “a shift cipher is used”. The
encryption key is the “specific amount of shift” used.
• The security of any encryption method should depend only on the
encryption key being difficult to discover. It is not safe to rely on the
encryption method (algorithm) being kept secret.
• The alphabetical shift cipher has 25 encryption keys.
• The alphanumeric shift cipher has 35 encryption keys.
Example 5: Using alphanumeric shift cipher
Note: If alphabetical or alphanumeric is not stated in the problem, always used
alphabetical.

What is the obscured message from the cipher text: PECTORAL MUSCLES
using alphanumerical shift cipher with shift 8?
Original Message: PECTORAL MUSCLES
Encrypted Message: XMK1WZIT U20KTM0

Brute Force Attack – a method for breaking encryption by trying all encryption
keys.
Example 6: Suppose you intercept a message, and you know the sender is using
a Caesar cipher, but do not know the shift being used. The message begins
EQZP. What is the message?
II. Transposition Cipher -the letters are rearranged according to some
predetermined rule or key.
Example 1: Encryption
Encrypt the message:MEET ME AT THE SECRET LOCATION using rows of 8
characters each.
Step 1. Write the message in rows of 8 characters each. Nonsense characters
are added to the end to complete the last row.

M E E T M E A T

T H E S E C R E

T L O C A T I O

N X X X X X X X

Step 2. Encrypt the message by recording down the columns. For example, the
first column reading down would be MTTN.
MTTN EHLX EEOX TSCX MEAX ECTX ARIX TEOX
Note: The spaces will be removed or repositioned to hide the size of the table used
since it is the encryption key used to hide the message.

Encrypted Message: MTTNEHLX EEOXTSCX MEAXECTX ARIXTEOX (repositioned)

Encrypted Message: MTTNEHLXEEOXTSCXMEAXECTXARIXTEOX (removed)


Example 2: Decryption
Decrypt the message: CAIN FONN TAMD EECM LIRE with rows of 4
characters.
Step 1. Determine the number of rows by getting the quotient of the number of
characters and number of characters per row. Then construct a table with 5
rows and 4 columns.
20/4 = 5 rows
Step 2. Start writing by putting the first 5 letters, CAINF, down the first column.

C O M M

A N D L

I N E I

N T E R
F A C E

Step 3. To decrypt the message, read across the rows.


Original Message: COMMAND LINE INTERFACE
III Transposition Cipher: Encryption and Decryption using a keyword
More complex versions of this rows-and-column based transposition cipher
can be created by specifying an order in which the columns should be
recorded. For example, the method could specify that after writing the message
out in rows that you should record the third column, then the fourth, then the
first, then the fifth, then the second. This adds additional complexity that would
make it harder to make a brute-force attack.
To make the encryption key easier to remember, a word could be used.
For example, if the keyword was “HEART”, it would specify that rows should have
5 characters each. The order of the letters in the alphabet would dictate which
order to read the columns in. Since A , the 3 rd letter in the keyword , is the earliest
letter in the alphabet from the word SCALPEL , the 3rd column would be used
first, followed by the 2nd column (E), the 1st column (H) , the 4th column (R) , and
the 5th column (T).
Example 3:Encryption using a keyword
Encrypt the message HIGH BLOOD PRESSURE using transposition cipher
with keyword “HEART”.
Step 1. The keyword “HEART” specifies that rows should have 5 characters each.
Write the message accross the rows. If the last row is not complete, add
nonsense character/s.

H E A R T

3 2 1 4 5

H I G H B

L O O D P

R E S S U

R E X X X

Step 2. Record the columns in order.


GOSX IOEE HLRR HDSX BPUX
Note: Remove or reposition the spaces to conceal evidence of the encryption key.

Encrypted Message: GOSXIOEEHLRRHDSXBPUX


Example 4: Decryption using a keyword
Decrypt the message “THEXRLTN AAROIEIX EYNXRPSX” with keyword:
HEALTH.
Step 1. Determine the number of rows and columns.
HEALTH =6 characters = 6 columns
THEXRLTN AAROIEIX EYNXRPSX= 24 characters/ 6 columns= 4 rows
Step 2. Set up a table.
Note: If there are repeated characters in keyword, the order depends on
earliest letter in the keyword. For example, HEALTH, letter H is repeated twice
which gives the order 3 2 1 5 6 4.

H E A L T H

3 2 1 5 6 4

Step 3. Write down the message down the columns using the order of letters in
the keyword.
a.

H E A L T H

3 2 1 5 6 4

X
b. Fill out column 2.

H E A L T H

3 2 1 5 6 4

R T

L H

T E

N X

c. Fill out the rest of the message.

H E A L T H

3 2 1 5 6 4

A R T E R I

A L H Y P E

R T E N S I

O N X X X X

Step 4. To decrypt the message, read across the rows. Remove the non-
significant characters.
Original Message: ARTERIAL HYPERTENSION
2.2.3. Analysis /Enhancement Activity
Practice: Try to answer the following to improve your skills:
A. Encrypting a message using Shifted Alphabet/Ceasar’s Cipher
1. Frequent Flyer – shifting 5 Ans. K******y K***w
2. Patient is High Risk – shifting 15 Ans. E*****i *h W**w G**z
B. Decrypting a message using Shifted Alphabet/Ceasar’s Cipher
Nursing Jargons
1. Mszzck Gipaofwbs – Shift 12 encryption Ans. *****w ********e
2. Mvek Aftbvp – Shift 9 encryption Ans. **** *****y
3. Wjtamdziy – Use brute force attack since we don’t know the number of
shifting used in encrypting the message. Ans. *********

2.2.4 Application
What is the announcement?
Everytime that there is an emergency situation, the announcement in
the bulletin board is encrypted to prevent the general public in the hospital from
reading it for security purposes.
The hospital you are working for uses transposition cipher using the
letters of the DAY as KEY encryption word. Suppose today is MONDAY, what is
the message written in the bulletin board?
Announcement:
RNBAR RXPEL REOXT SWOET OEDLE HMXHI IPDOW ETETE RX
Clue: Keyword: M O N D A Y
Number of Characters: 42 / 6 = 7

M O N D A Y
1
R
N
B
A
R
R
X

Ans. The president **** ** ******** **** ********


2.2.5. Assessment

A. Ceasar Cipher/ Shifted Alphabet


Encrypt:
1. Stethoscope – shifting 15
2. Hand Sanitizer – shifting 18
Decrypt:
1. Hujhqsjqrbu fudi – shifting 16
2. Bpmzuwumbmz – use Brute force attack
B. Using the Transposition Cipher, perform the following:
1.Encrypt:
“Adaptive Immunity” in rows of 5 characters each.
2. Encrypt:
“Cardiovascular Mortality” with the keyword: SYSTOLIC
3. Decrypt:
“KESE IYEX DDAX NISX” with rows of 4 character each.
4.Decrypt:
ADUE MOYX HYAX GYBT MRTX AXRX with the keyword: GAMETE

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy