Rsa 2
Rsa 2
Rsa 2
Cryptography
(slides edited by Erin Chambers)
Cryptography
Cryptography
The field of study related to encoded information
(comes from Greek word for "secret writing")
Encryption
The process of converting plaintext into ciphertext
Decryption
The process of converting ciphertext into plaintext
2
Cryptography
Encryption
plaintext
message
ciphertext
message
Decryption
Cryptography
Cipher
An algorithm used to encrypt and decrypt
text
Key
The set of parameters that guide a cipher
Neither is any good without the other
4
Substitution Ciphers
A cipher that substitutes one character
with another.
These can be as simple as swapping a
list, or can be based on more complex
rules.
These are NOT secure anymore, but they
used to be quite common. What has
changed?
Caesar ciphers
ABCDEFGHIJKLMNOPQRSTUVWXYZ
DEFGHIJKLMNOPQRSTUVWXYZABC
Substitute the letters in the second row for the letters in the
top row to encrypt a message
Encrypt(COMPUTER) gives FRPSXWHU
Substitute the letters in the first row for the letters in the
second row to decrypt a message
Decrypt(Encrypt(COMPUTER))
= Decrypt(FRPSXWHU) = COMPUTER
6
Transposition Cipher
TODAY
+IS+M
ONDAY
Write the letters in a row of five, using '+' as a blank. Encrypt by starting
spiraling inward from the top left moving counter clockwise
Encrypt(TODAY IS MONDAY) gives T+ONDAYMYADOIS+
Decrypt by recreating the grid and reading the letters across the row
The key are the dimension of the grid and the route used to encrypt the
data
Cryptanalysis
Cryptanalysis
The process of decrypting a message
without knowing the cipher or the key used
to encrypt it
Substitution and transposition ciphers are
easy for modern computers to break
To protect information more sophisticated
schemes are needed
8
Encryption on computers
Roughly speaking, there are two different broad
types of encryption that are used on computers
today
Symmetric encryption relies on keeping keys totally
secret
Asymmetric encryption actually publicizes one key,
but keeps some information private also
Public/Private Keys
What is it?
An approach in which each user has two related
keys, one public and one private
One's public key is distributed freely
A person encrypts an outgoing message, using
the receiver's public key.
Only the receiver's private key can decrypt the
message
11
RSA
In 1977, Rivest, Shamir, and Adleman
came up with another way to use public
key cryptography
Rather than secure key exchanges, this
one actually lets you encrypt whole
messages
Today, this is the most commonly used
public key cryptosystem on the market
RSA (cont.)
So (n) = (p-1)(q-1), which we can compute.
Note that this is hard to find if you dont know p
and q, but its easy if you do.
Now pick a value e, where e is relatively prime to
(n) . This is your public key.
Compute another value d, where we must have
de = 1 mod (n). This is your private key.
Example: Suppose e = 2, n = 11. Then d = 6, since
we know (6)(2) mod 11= 12 mod 11 = 1