Gemmw: Mathematics in The Modern World Module 5: Cryptography Learning Outcomes
Gemmw: Mathematics in The Modern World Module 5: Cryptography Learning Outcomes
MODULE 5: CRYPTOGRAPHY
Learning Outcomes:
2. Analyze codes and coding scheme used for identification, privacy, and security
purposes.
CRYPTOGRAPHY
Social media applications are a trend to a lot of people. We are able to reach
and communicate with people no matter where they are. However, we use these
applications without knowing if these applications are secure enough to call it a
“private” conversation.
Users can retrieve one another’s public keys from servers to encrypt their
messages. Each message encrypted with a public key can only be decrypted by with
its corresponding private key, which is in the exclusive ownership of the recipient.
E2EE ensures that not even the company that hosts the application can access
message content. Even if hackers break into their servers or three-letter agencies
force them to hand over user data, they won’t be able to decrypt the content of
messages.
Double Encryption
Activity 1
Cryptography
- KZFO SZONLH
Message:
PRINCIPLES OF CRYPTOGRAPHY
data.
intended recipient.
communication.
and resources it would require to recover the plaintext. The result of strong
entirely dependent on two things: strength of the cryptographic algorithm and the
A cryptographic algorithm, and all possible keys and all the protocols that
encryption, involves only one key that is used for encryption and decryption.
Conventional Cryptography
asymmetric scheme that uses a pair of keys for encryption: a public key which
The concept was introduced by Whitfield Diffie and Martin Hellman in 1975.
Plaintext
Ciphertext
Plaintext
Pretty Good Privacy (PGP) combines some of the best features of both
When a user encrypts plaintext with PGP, PGP first compresses the plaintext. Data
compression saves modem transmission time and disk space and, more importantly,
PGP then creates a session key, which is a one-time-only secret key. This
key is a random number generated from the random movements of your mouse and
the keystrokes you type. This session key works with a very secure, fast
Once the data is encrypted, the session key is then encrypted to the recipient’s
public key. This public key-encrypted session key is transmitted along with the
PGP Encryption
Ciphertext +
encrypted
Session key is session key
encrypted with
Plaintext is public key
encrypted with
session key
Decryption works in reverse. The recipients’ copy of PGP uses his or her
private key to recover the temporary session key, which PGP then uses to decrypt
PGP Decryption
Encrypted
session key
recipients
session key
private key
Encrypted used to original
used to
Message decrypt plaintext
decrypt
cipher text
session key
Ciphertext
encryption is about 1,000 times faster than public key encryption. Public key
issues. Used together, performance and key distribution are improved without any
sacrifice in security.
specific ciphertext. Keys are basically really, really, really big numbers. Key size is
measured in bits. In public key cryptography, the bigger the key, the more secure
the ciphertext.
However, public key size and conventional cryptography’s secret key size are
totally unrelated. A conventional 80-bit key has the equivalent strength of a 1024-bit
public key. A conventional 128-bit key is equivalent to a 3000-bit public key. Again,
the bigger the key, the more secure, but the algorithms used for each type of
CIPHER METHOD
Caesar’s Cipher
Example: If the word “SECRET” will be encoded using Caesar’s key value of 3,
the alphabet will be offset so that the 3rd letter down (D) begins the
alphabet.
ABCDEFGHIJKLMNOPQRSTUVWXYZ
DEFGHIJKLMNOPQRSTUVWXYZABC
To allow someone else to read the ciphertext, tell them that the key is 3.
Affine Ciphers
A B C D E F G H I J K L M
1 2 3 4 5 6 7 8 9 10 11 12 13
N O P Q R S T U V W X Y Z
14 15 16 17 18 19 20 21 22 23 24 25 26
The same secret message as above would appear as (Bacon's bold and plain
characters were less obvious than those below):
M E E T M E B E
Tobeo rnott obeth atist heque stion Wheth ertis
H I N D T H E G
noble rinth emind tosuf ferth eslin gsand arrow
Y M A F T E R S
sofou trage ousfo rtune ortot akear msaga insta
C H O O L
seaof troub lesan dbyop posin gendt hem?
Columnar Transposition
First, think of a secret key word. Ours will be the word SECRET. Next, write it
above the columns of letters in the square, and number the letters of the key word as
they would fall if we placed them in alphabetical order. (If there are duplicate letters,
like the "E", they are numbered from left to right.)
5 2 1 4 3 6
S E C R E T
M E E T M E
A F T E R S
C H O O L B
E H I N D T
H E G Y M O
Now write the columns down in the order indicated by the numbers. The
resulting ciphertext looking like this:
4 Q R S T U
5 V W X Y Z
Example:
32 15 44 23 34 14 24 33 44 23 15 32 11
14 33 15 43 43
Decryption:
32 15 44 23 34 14 24 33 44 23 15 32 11
M E T H O D I/J N T H E M A
14 33 15 43 43
D N E S S
QWERTY Code
You can construct a secret message from the above table. Every time you see
an "I" you would substitute the "O" beneath and so on for the other characters. The
message "Meet me after school behind the gym," would read
Activity 2
Cipher Method
- Galileo Galilei
References: