0% found this document useful (0 votes)
55 views18 pages

CH.6 Ed.5.30

Uploaded by

annamicaella0913
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)
55 views18 pages

CH.6 Ed.5.30

Uploaded by

annamicaella0913
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/ 18

CHAPTER 6

Nature of Codes and Cryptography

Learning Objectives

In this lesson, you will be able to:

➢ define cryptography and codes;


➢ enumerate different types of codes;
➢ explain different methods of encryption and decryption;
➢ distinguish compression from decompression methods of coding;
➢ demonstrate and apply substitution and transposition cypher;
➢ discuss the error detecting codes;
➢ illustrate examples in UPC and KSA cryptology system; and
➢ encrypt and decrypt message by RSA-public-key algorithm.

Introduction
Individuals, groups or organizations who are engaged in highly confidential matters use secret
codes in sending messages for security and privacy purposes. This will keep the secrecy of transactions
or communications intended only for the sender and receiver who can understand and process it. The
other uses of codes are for creating passwords in computer, secret accounts such as digital currency or
online accounts. Coding is also use for authenticity and non-repudiation of information for protection
against fraud, hackers or intruders, and there are a lot more uses of codes in everyday life and to name
just a few. This method of encoding messages through secret codes is known as encryption, and the
study of writing or solving secret codes is called cryptography.

Nature of Codes and Cryptography 180


Definition 6-1
Cryptography is a technique in writing or solving secret codes.
Encryption is the process of writing or encoding messages and transform into secret codes from
readable to unreadable forms.
Decryption is the process of transforming an encrypted message back to its original form from
unreadable to readable format.
Universal Product Code(UPC) is an of 1D barcode used to identify and distinguish products
and are mostly printed on retail product packaging and labeling to determine the identity of each
product.
Key Schedule Algorithms (KSA) are secret keys which are used for an encryption algorithm
that generates session keys for encryption and decryption to secure a communication
session.
Cypher or cipher code is an algorithm method of converting information by performing
encryption or decryption following the step by step procedure.

6.1 Caesar Cipher


A Code which was used by Julius Caesar to send secret message to his troop in 58 BC, by way
shifting letters in a message to make it unreadable if intercepted. This type of encryption is known as
a substitution cipher, due to the substitution of one letter for another in a consistent mode.
Illustration 6.1. To encrypt the message, take each letter and select number of shift, say go three(3)
along the alphabet and use the cipher substitution, replace letter a into d, b into e and so on.

Alphabet a b c d e f g h i j k l m n o p q r s t u v w x y z
Cipher d e f g h i j k l m n o p q r s t u v w x y z a b c

Illustrative Example 6-1


Encrypt the message “ prepare for battle” using Caesar Cipher by rotating or shifting
alphabet letter with three (3) places(see illustration 6.1)
Answer: suhduh iru edwwoh

Nature of Codes and Cryptography 181


Illustrative Example 6-2
Encrypt the message “ we promise to do our very best to succeed ” with a shift of 3.
Answer: zh surplvh wr gr rxu yhub ehvw wr vxffhhg

Illustrative Example 6-3


Decrypt the message “bhvvluzhduhdozdbvuhdgb” using Caesar Cipher method.

Answer: convert the cipher letters to the original alphabet by referring to table 6-1. since the given
is the cipher text, then, look for the equivalent plaintext(alphabet) of each cipher’s letter just above it.
Then, the message means: “ yes sir we are always ready”

Illustrative Example 6-4


Decrypt the message “st tsj nx lwjfy jstzlm bnymtzy ymj ytzhm tk mnx inansj nsxunwfynts”
using Caesar Cipher method by rotating or shifting alphabet letter with five (5) places .
Solution: Rotate or shift 5 letters from the alphabet and look for the equivalent plaintext(alphabet) of each
cipher’s letter just above it
alphabet a b c d e f g h i j k l m n o p q r s t u v w x y z
cipher f g h i j k l m n o p q r s t u v w x y z a b c d e

Answer: “no one is great enough without the touch of his divine inspiration”

6.2. Transposition Cipher

Transposition cipher (also known as a permutation cipher) is a cryptographic algorithm


where letters of the plain text is scrambled in a different sequence. The plaintexts are written horizontally
and placed in rows without changing the actual texts, while the encrypted characters are placed and written
vertically or in column to form a cipher text. It uses a keyword that follows the alphabetical order when
writing the encrypted characters vertically.

Illustrative Example 6-5

Encrypt the message “ study hard for a brighter tomorrow” by transposition cipher with a keyword
“ beauty”

Nature of Codes and Cryptography 182


Solution: There are 6 characters in the keyword ”beauty”. Create 6 columns, write the plaintext
horizontally and vertically for the encrypted message by following the alphabetical order which starts
at the column of letter “a”(#1) , next is column of letter “b” (#2) up to the last column of “y” (#6)

b e a u t y
(2) (3) (1) (5) (4) (6)
s t u d y h
a r d f o r
a b r i g h
t e r t o m
o r r o w
The encrypted message is written vertically downward from numbers 1-6:

Answer: udrrr saato trber yogow dfito hrhm

Illustrative Example 6-6

Encrypt the message “ the true hero is one who conquers his own anger and hatred” by
transposition cipher with a keyword “ heroism”

Solution: There are 7 characters in the keyword ”heroism” then construct 7 columns, write the
plaintext horizontally and vertically for the encrypted message by following the
alphabetical order which starts at the column of letter “e”(#1) , next is column of
letter “h” (#2) up to the last column of “s” (#7)

h e r o i s m
(2) (1) (6) (5) (3) (7) (4)
t h e t r u e
h e r o i s o
n e w h o c o
n q u e r s h
i s o w n a n
g e r a n d h
a t r e d

Answer: heeqset thnniga riornnd eoohnh tohewae erwuorr uscsad

Nature of Codes and Cryptography 183


Illustrative Example 6-7

Decrypt the message ”otttnoeittlvnehtayshgtehoorricneegai” by transposition cipher with the key


word “parents ”

Solution: There are 36 characters to be decrypted and the key word has seven(7) characters, then,
construct 7 columns and 6 rows that may accommodate 42 characters. You may write “x” for last 6 non-
sense characters or 6 excess spaces, and write the message to be decrypted downward starting from
column of letter ”a”(#1), next is column of “e”(#2) up to the last column “t”(#7).

p a r e n t s
(4) (1) (5) (2) (3) (7) (6)
t o t o l e r
a t e e v e r
y t h i n g i
s t o t e a c
h n o t h i n
g x x x x x x

Write the decrypted message horizontally “to tolerate everything is to teach nothing “

6.3. RSA Public-key


The RSA public-key is an asymmetric cryptography algorithm that uses two unique keys in
encrypting and decrypting messages or characters namely, the public key for encryption and the private
key for decryption. The RSA" comes from the surnames of Ron Rivest, Adi Shamir and Leonard
Adleman, who publicly described the algorithm in 1977.

Figure 6.3. The flow chart of RSA public key algorithm.

The sender encrypts the plaintext using the public key, and the receiver decrypts the cipher text
with their own private key.

Nature of Codes and Cryptography 184


Steps in creating RSA public key:

Step 1. Select two distinct prime numbers represented by p and q .

Step 2. Compute the modulus(n), by the formula: n = p(q)

Step 3. Determine Euler totient[ ( n )], by the formula: ( n) = ( p – 1 )  ( q – 1 ).

Step 4. Choose integer “e “ such that gcd( greater common divisor), [( n ), e] = 1
and “e” must be in the interval of one(1) and ( n) or 1 < e < ( n ).
also, “e” has no common factors in ( n).

Step 5. Calculate an integer d from the quotient d  mod(e)[ ( n)*k+1 )], d = 𝑒 −1 [1 + ( n )] ,


or and mod(e) represents denominator “e”.

1 + ( n )∗k
d= , select k =1, 2.3…that makes [1 + ( n ) ∗ k] divisible by “e”
𝑒

Step 6. The sender encrypts a message, M, with the public key (e, n), create the ciphertext, C,
using the formula:
C = 𝑴𝒆 mod(n}, where M<n, and mod(n) represents denominator “n’
. Step 7. The receiver decrypts the ciphertext for message(plaintext) “M” with the private key
(d, n) using the formula:
M = 𝑪𝒅 mod n, the private key is (d,n)

Illustrative Example 6-8

Determine the public and private keys in RSA algorithm with p= 11, q = 5 , and e = 3, then encrypt
the message “ passed”.
Solution:
Step 1. p= 11, q = 5
Step 2. n = p(q) = 11(5) = 55,
Step 3. ( n) = ( p – 1 )  ( q – 1 ) = (11-1)(5-1) = 40
Step 4. e = 3, not a factor of n = 55
Step 5. ( n) = 40 , *k = 2 , to make the numerator divisible by “e”

Nature of Codes and Cryptography 185


1 + ( n )∗(k) 1 + 40(2)
d= = = 27
𝑒 3

Thus , the public key is (3, 55), and the private key is ( 27, 55)

Step 6. To encrypt the message “passed” convert the characters into numbers using the table:

The characters are translated to: 15 00 18 18 04 03 representing “M” in the formula.


a b c d e f g h i j k l m n o p q r s t u v w x y z
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51

Compute for the remainders of ciphertext.

C= 𝑀𝑒 mod n = 𝑀5 [Mod (85)]


153 3,375
𝑐1 = = = 61 remainder 20
40 55

03 0
𝑐2 = = = 0 remainder 00
55 55

183 5,832
𝑐3 = = = 106 remainder 02
55 55

183 5,832
𝑐4 = = = 106 remainder 02
55 55

43 64
𝑐5 = = = 1 remainder 9
55 55

33 27
𝑐6 = = = 0 remainder 27
55 55

Thus, the encrypted message is 20 00 02 02 09 27

Step 7. Decryption of cipher text 20 00 02 02 09 27


M = 𝐶 𝑑 mod n, the private key is (d,n),(27,55)

For cipher text Cipher text is 20 00 02 02 09 27

𝑀1 = 𝑐1 𝑑 [mod(n)]

𝑀1 = 2027 [mod(55)]

Nature of Codes and Cryptography 186


2027 1.34217728e35
𝑀1 = = = 2.44032233e33 r. 15
55 55
027
𝑀2 = = 0 , r. 0
55
227 134,217,728
𝑀3 = = = 2,440,322, r. 18
55 55
227 134,217,728
𝑀4 = = = 2,440,322, r. 18
55 55
927 5.8149737𝑒25
𝑀5 = = = 4.06975317e39, r. 30
55 55
2727 4.43426488𝑒38
𝑀6 = = = 8.06229979e36 r. 10
55 55

The decrypted message is 15 00 18 18 30 10, and convert to letters from table 1, whereas, the message
is “passed”

To check answers in getting the remainder of fraction, go to:


Szyk, Bogna, et. Al(2024), Remainder calculator
https://www.omnicalculator.com/math/remainder,
and enter the dividend and divisor in the calculator and look for the remainder below it:

Nature of Codes and Cryptography 187


Illustrative Example 6-9

Determine the public and private keys and encrypt the message “regroup” given p = 19, q = 11 and
e = 17.
Solution:
Step 1. p= 19, q = 11
Step 2. n = p(q) = 19(11) = 209
Step 3. ( n) = ( p – 1 )  ( q – 1 ) = (19-1)(11-1) = 180
Step 4. e = 17, not a factor of n = 190
Step 5. ( n) = 40 , *k = 5 , to make the numerator divisible by “e =7”
1 + ( n )∗(k) 1 + 180(5)
d= = = 53
17 17

Thus , the public key is (17, 209), and the private key is ( 53, 209)
Step 6. To encrypt the message “ be brave” convert the characters into numbers using the table:
The characters are translated to: 01 04 01 17 00 21 04 representing “M” in the formula.

a b c d e f g h i j k l m n o p q r s t u v w x y z
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Compute for the remainders of ciphertext.

C= 𝑀𝑒 mod n = 𝑀7 [Mod (115)]


117 1
𝑐1 = = = 0 remainder 1
209 209

417 1.71798692𝑒10
𝑐2 = = = = 82,200,331 r. 21
209 209
117 1
𝑐3 = = = 0 r. 1
209 209

1717 8.27240262𝑒20
𝑐4 = = = r. 3.98508738e18. r 2
209 209

017 0
𝑐5 = = = 0 remainder 0
209 209

2117 3.00419425𝑒22
𝑐6 = = = 1.437413352e20 remainder 75
209 209
117 1
𝑐7 = = = 0 remainder 1, Thus, the encrypted message is 0121010207501
209 209

Nature of Codes and Cryptography 188


Exercise 6.1

1. Determine the public and private keys, and encrypt the message “ faster” with p=31, q=5, e=3
using RSA-public key algorithm.

2. Decrypt the ciphertext in problem #1 using a private key of (1, 155) in RSA-public key
algorithm.

6.4. Vigenère Cipher Code

The Vigenère cipher(pronounced as viz-ner),is the given name in recognition to the French
cryptographer Blaise de Vigenère, who devised a similar cipher in 1586. It is an algorithm method of
encrypting and decrypting alphabetic text where each letter of the plaintext is translated into distinct
Caesar cipher, using Vigenère table and the increment is determined by the corresponding letter of
another text, the keyword.

Illustrative Example 6-10

Encrypt the message “ SUCCEED” using Vigenère cipher and the key word “MATH”

a b c d e f g h i j k l m n o p q r s t u v w x y z
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Translate “MATH” to numbers: 12 00 19 07, then, take there numbers as the number of shift of the
characters, where the numbers from key word are repeated“ be successful” S(12), U(0),C(19),
C(7),E(12), S(0), S(19), F(7), U(12),L(0).
With the aid of the Vigenère cipher table, each letter are shifted with their corresponding numbers,
Such that “S” is shifted by 12, and converted to ciphertext “e”, “U” is shifted by 0, and so, remains the
same letter “u”, C is shifted by 19, and translated to “v”, another “C” shifted to 7 and becomes “j”, “E”
shifted by 12 and translated to “q” and by following the same steps, the encrypted message or cipher
text is “ euvjqew”

Nature of Codes and Cryptography 189


Illustration: Vigenère Cipher Table

Illustrative Example 6-11

Decrypt the ciphertext “ EUVJQEW” from example #2 using the Vigenère cipher with the same
key.
Solution: To decrypt the message, do the reverse shift from left to right using Vigenère table.
E(-12), U(0), V(-19), J(-7), Q(-12), E(0), W(-7).

Nature of Codes and Cryptography 190


Thus, the cipher text “EUVJQEW” is decrypted to plain text “ succeed”

Illustrative Example 6-12

Encrypt the message “ GO TO THE LIBRARY’ using the Vigenere cipher and the key word “books”.

Answer: hc hy lis zstsofi

Exercise 6.2

1. Encrypt the message “WE SHALL LEAVE TOMORROW” with the key word “FIGHT” using
Vigenère cipher code.

2. Decrypt the message “ OVVZV HZVZ YQ” with the key word “BRAVE” using the Vigenère
cipher code.

6.5. Autokey Cipher


Autokey cipher is a polyalphabetic cipher that uses a keyword or a key phrase that is appended
to the plain text. Encryption and decryption using autokey cipher use the alphabet and modulo 26 with
a predetermined key value. Plain text is converted to each of the numbered letters in the alphabet using
modulo 26 starting with the key value. To encrypt is to add the plain text and the keyword and to decrypt
is to subtract the plain text and the keyword using modulo 26.
Illustration:
Autokey cipher encryption: Ci = (Pi + Ki ) mod 26
Autokey cipher decryption: Ci = (Pi - Ki + 26) mod 26
Where: P = Plain text, Pi = P1 , P2, P3 , …
K= the stream key, Ki = K1 , K2 , K3 , …
C = The encrypted text, Ci = C1 , C2 , C3 , …

Nature of Codes and Cryptography 191


Illustrative Example 6-13 . Encrypt the message “stop bullying us” by autokey cipher encryption
with an auto key of “s”.

a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Solution: From English alphabet mod 26 the corresponding number for s is 18 as follows:
Since the keyword is “s” which is Ki =18, place the keyword or letter “s” before the plain text, then
replace each by Pi values from table of alphabet. If C = 𝑃𝑖 +𝐾𝑖 ≥ 26 subtract C by 26 for Mod 26. The last
letter of the plain text will be disregarded as shown in the table below.

Plain text s t o p b u l l y i n g u s
Pi values 18 19 14 15 1 20 11 11 24 8 13 6 20 18
W/ keyword “s” s s t o p b u l l y i n g u
Keystream with
18 18 19 14 15 1 20 11 11 24 8 13 6 20
𝐾𝑖 = 18
C = 𝑃𝑖 +𝐾𝑖 36 37 33 29 16 21 31 22 35 32 21 19 26 38
Ci (Mod26) 10 11 7 3 16 21 5 22 9 6 21 19 0 12
Cipher text k l h d q v f w j g v t a m

For letter s (P=18) , K=18, C = P + K = 18+18=36 , thus C= 36 -26(mod), C= 10(k)


For t (P=19) , K=18, C = P + K , C= 37, thus C= 37 -26(mod), C= 11(l)
For o (P=14) , K=18, C = P + K , C= 32, thus C= 32 -26(mod), C= 6(i)

Illustrative Example 6-14. Decrypt the message “klhdqvfwjgvtam” by autokey cipher encryption with
an auto key of “s”.
Solution: convert each letter to the equivalent number from table of alphabet. Place the auto key (s=18)
as first letter of the message. Compute for C values using the formula Ci = (Pi - Ki ) mod 26, add 26 if the
difference is negative, then, look for the equivalent number from the table from the plain text.

Nature of Codes and Cryptography 192


Cipher
text
a l h d k v f w j g v t a m
Pi values
0 11 7 3 10 21 5 22 9 6 21 19 0 12
Key
stream
18 18 19 14 15 1 20 11 11 24 8 13 6 20
Ci
values
18 19 14 15 1 20 11 11 24 8 13 6 20 18
Plain
text
s t o p b u l l y i n g u s

Thus the decrypted message is “stop bullying us”

Exercise 6.3

1. Encrypt the message “ never give up” with an auto key of ‘h”, then, decrypt the
resulting message.
2. Encrypt the message “do the exercises ” with an auto key of ‘G”, then, decrypt
the resulting message.

6.6 Compression and Decompression


Compression is the process of reducing the size of an electronic file for possible transmission or
storage for future use. Compressing files will save space, and time in retrieval and usage. When the file
is compressed, all the data are not lost only the unnecessary bits and even the redundant data are
removed.
Decompression is the process of restoring the size of an electronic file to its original for possible
usage. The necessary design to compress the data and the amount of changes in the compression are
required then decompression of the data follows.
The examples of compression formats are the following:
JPEG – Joint Photographic Expert Group wherein the files end with a .jpeg or .jpg extension.
MPEG – Moving Pictures Expert Group where extensions include .mpg for movies while .mp3 for
music files.
ZIP/TAR – This is a lossless compression that reduces files to remove redundancy in the data using
extensions, .zip and .tar, respectively.

Nature of Codes and Cryptography 193


6.7 Universal Product Code (UPC)
The inventories of the products in a company or the items being sold in a department store or shop
are necessary to determine the remaining goods for possible profit and future recycling. To ensure the
most effective inventory system, the UPC or bar code that we see in all products is created.
The UPC of a product is a 12–digit code which is useful in grocery stores and other merchandise
outlets. The first digit has a coefficient of 3 and is then done alternatingly with the last digit as the check
digit in modulo 10.
Illustration:
d12 = 10 – (3d1 + d2 + 3d3 + d4 + 3d5 + d6 +3d7 + d8 +3d9 +d10 + 3d11 + d12 ) mod 10.
In a 12-digit UPC, the first digit determines the type of product, hence the following is a guide to use:
First digit 0 2 3 4 5 6, 7 1, 8, 9
Type of General Meat and Drugs and Non-food Coupons Other Reserved
product groceries products health items items for future
products use

Illustrative Example 6-15.


If the UPC is 4 800308-103252 of a certain product, is the check digit valid?
Solution:
Since the first digit is 4, the UPC is for a drug or health product. To check the validity of the last digit,
use 3*8 + 0 + 3*0 + 3 + 3*0 + 0 + 3*8 + 1 + 3*0 + 3 + 3*2 + 5 + 3*2 = 2 mod 10
62 = 2 mod 10 implies that the last digit 2 which is the check digit is valid.

Illustrative Example 6-16


The UPC of a certain product is 8 851717 – 90540_. Find the check digit.
Solution: With 8 as the first digit, the product is reserved for future use. To generate the check digit,
use modulo 10 as follows;
3*8 + 5 + 3*1 + 1 + 3*7 + 1 + 3*7 + 9 + 3*0 + 5 + 3*4 + x = 0 mod 10
102 + x = 0 mod 10
The only digit that will solve the equation is 8. Hence, the check digit is 8.

Nature of Codes and Cryptography 194


6.8 International Standard Book Number (ISBN).
The ISBN of a book serves as its security and is being used in any library when cataloging book
collections. The ISBN of books or any publication is a protection of an author as an intellectual property
right. It is a 13-digit number starting with 978 or 979 followed by groups of digits that cover the country,
publisher, and title with the last digit as the check digit. The formula for the ISBN check digit is based
on modulo 10.
Illustration:
d13 = 10 – (d1 + 3d2 + d3 + 3d4 + d5 + 3d6 + d7 + 3d8 + d9 + 3d10 + d11 + 3d12) modulo 10
Notice that the coefficient 3 starts in the second digit and from there it is alternating. If d13 = 10,
then the check digit is 0.

Illustrative Example 6-17


A purchase order for the book includes the ISBN 978-0-760-73261-6. Determine whether it is a
valid ISBN.
Solution:
d13 = 10 – [(9) + 3(7) + 8 + 3(0) + 7 + 3(6) + 0 + 3(7) + 3 + 3(2) + 6 + 3(1) + 6] mod 10
= 10 – 102 mod 10
= 10 – 2
=8
Since the last digit is 6 and not 8, it is not valid for the ISBN of the book.

Illustrative Example 6-18


The ISBN of a book purchased by the Mathematics Department is 978-971-9676-99-x.
Generate the last digit.
Solution:
1*9 + 3*7 + 1*8 + 3*9 + 1*7 + 3*1 +1*9 + 3*6 + 1*7 + 3*6 + 1*9 + 3*9 + x = 0 mod 10
163 + x = 0 mod 10
The last digit is 7 since 163 + 7 = 170 which gives 0 in modulo 10.

Nature of Codes and Cryptography 195


Chapter 6 Exercise
I. Multiple Choice. Select the letter corresponding the correct answer. Write “e” if the answer is
none of these

1. The algorithm method of converting information by performing encryption or decryption through


step by step procedure is called_____.
a. Encryption b. Cypher coding c. Decryption d. KSA

2. Which of the following is the process of writing or encoding messages and transform into
secret codes from readable to unreadable forms ?
a. encryption b. cypher coding c. decryption d. KSA

3. _____ is an 1D barcode used to identify and distinguish products and are mostly printed on
retail product packaging and labeling to determine the identity of each product.
a. encryption b. UPC c. decryption d. KSA

4. What is the process of transforming an encrypted message back to its original form from readable
to unreadable format?
a. encryption b. decryption c. cypher coding d. KSA

5. ______is a secret keys which is used for an encryption algorithm that generates session keys
for encryption and decryption to secure a communication session.
a. encryption b. KSA c. decryption d. UPC

6. The process of transforming an encrypted message back to its original form from unreadable to
readable format is called____
a. decryption b. cypher coding c. encryption d. KSA

7. What is the technique in writing or solving secret codes.


a. decryption b. encryption c. cryptography d. KSA

8. A code which was used by Julius Caesar to send secret message to his troop in 58 BC, by way
of shifting letters in a message to make it unreadable if intercepted.
a. Caesar’s cipher b. Julius code c. KSA code d. UPC code

9. What is the encrypted message for the plaintext” passed” in Caesar cipher” with a shift of 2?
a. qbttfe b. rcuugf c. sdvvhg d. tewwih

10. What is the decrypted message for “Pdwkhpdwlfv” in Caesar cipher” with a shift of 3?
a. mathematics b. dizzymaking c. puzzlements d. Juvenilized

Nature of Codes and Cryptography 196


II. Solve the Following Problems.
1. What is the encrypted message for “ pass this subject” if the key word is “math”
in transposition cipher?
2. What is the encrypted message for “ pass this subject” with key word “math” in
Caesar cipher if the shift is 4?
3. What is the decrypted message for “OTAGMBNIKEEENIXHSTNA” in transposition
cipher if he key word is “good”
4. Decrypt the message “xjy f ltti jcfruqj” using Caesar cipher with a shift of 5.
5. Determine the public and private keys in RSA algorithm with p= 11, q = 7, and e = 3. 6.
6. Determine the public and private keys, and encrypt the message “ study hard” with p=31
q=5, e=3 using RSA-public key algorithm.
7. Decrypt the ciphertext in problem #6 using a private key of (1,155) in RSA-public key
algorithm.
8. Encrypt the plain text “be good to your parents” with a key word “love” using Vigenère
cipher code.
9. Decrypt the message “ginxk gzxtx” with a key word “trust” using Vigenère cipher
code’10. The ISBN of a book by Prof. D. De Guzman et. Al is 978-971-98-1506-8,
generate the last digit.

Nature of Codes and Cryptography 197

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