Professional Documents
Culture Documents
The message
before it is coded
Method changing
from ciphertext
to plaintext
Method changing
from plaintext to
ciphertext
CEASAR CIPHER
(CYCLICAL ENCRYPTING)
To encrypt, To decrypt,
key
𝐜 ≡ 𝐩 + 𝐦 𝐦𝐨𝐝 𝟐𝟔 𝐩 ≡ 𝐜 − 𝐦 𝐦𝐨𝐝 𝟐𝟔
Numerical equivalent of
the plaintext letter
Numerical
equivalent of the
ciphertext letter
CEASAR CIPHER
(CYCLICAL ENCRYPTING)
PLAINTEXT P ENCRYPTING (KEY = 5) CIPHERTEXT
S 18 18 + 5 mod 26 ≡ 23 X
I 8 8 + 5 mod 26 ≡ 13 N
N 13 13 + 5 mod 26 ≡ 18 S
G 6 6 + 5 mod 26 ≡ 11 L
K 10 10 + 5 mod 26 ≡ 15 P
O 14 14 + 5 mod 26 ≡ 19 T
CEASAR CIPHER
(CYCLICAL ENCRYPTING)
CIPHERTEXT C DECRYPTING (KEY = 5) PLAINTEXT
X 23 23 – 5 mod 26 ≡ 18 S
N 13 13 – 5 mod 26 ≡ 8 I
S 18 18 – 5 mod 26 ≡ 13 N
L 11 11 – 5 mod 26 ≡ 6 G
P 15 15 – 5 mod 26 ≡ 10 K
T 19 19 – 5 mod 26 ≡ 14 O
AFFINE CIPHER
To encrypt, To decrypt,
𝐜 ≡ 𝐚𝐩 + 𝐦 𝐦𝐨𝐝 𝟐𝟔 𝐩 ≡ 𝐛 𝐜 − 𝐦 𝐦𝐨𝐝 𝟐𝟔
𝐩 ≡ 𝐜 − 𝐦 𝐦𝐨𝐝 𝟐𝟔
VIGENÈRE CIPHER
Encrypt DAGOHOY
with keyword UST
RSA PUBLIC-KEY CRYPTOGRAPHY
Rivest – Shamir – Adleman
Is used largely to secure highly sensitive data and information especially
when these data and information are sent over networks like the internet
STEPS:
1. Choose two prime numbers p and q.
2. n = pq
3. z = (p – 1)(q – 1)
4. Randomly choose e such that
• 1 < e <z
• gcd(e,z) = 1
RSA PUBLIC-KEY CRYPTOGRAPHY
5. Solve for d where:
ed ≡ 1 mod z (multiplicative inverse of e in Zz)
6. To encrypt,
M ≡ Ne mod n N = plaintext
7. To decrypt, M = ciphertext
N ≡ Md mod n
Note: To encrypt a message, each letter of the alphabet is given a number; for
instance, A = 11, B = 12, C = 13, … .Now replace each letter in the message with its
number equivalent. Using our coding scheme, the word MATH would be 23 11 30
18.
RSA PUBLIC-KEY CRYPTOGRAPHY
Encrypt, MATH where p = 59 and q = 83.
n = 4897 z = 4756
e = 129 M ≡ Ne mod n
d = 1401
We use A = 11, B = 12, C = 13, …