Beruflich Dokumente
Kultur Dokumente
Presented by
Naveed I. Salman MS(CS)
Encryption
A message sent over a network can be read by any site between the source and the destination (e.g. each hop in email). Encryption is the process of encoding a message so that it is decipherable only by its intended recipient (anyone intercepting the message would be unable to interpret it)
3
Encryption
The sender encrypts the message The sender transmits the message to the receiver The receiver decodes the message How does the receiver decode the message? The sender needs to send the key to the receiver. BUT, now this can be intercepted.
4
Encryption
Cryptography - study of methods to encrypt text. Cryptanalysis - study of how to decode an encypted text. Strong Encryption - infeasible to crack Weak Encryption - can be cracked
Example
Substitution cipher - each letter of the alphabet is substituted with a different letter or symbol. Ceasar's method - replace every letter in the alphabet with the letter 3 places after it
A->D B->E Y->B Z->C
6
An Example
For a key K=3, plaintext letter: ABCDEF...UVWXYZ ciphtertext letter: DEF...UVWXYZABC Hence TREATY IMPOSSIBLE is translated into WUHDWB LPSRVVLEOH
10
11
The above multiplicative inverse can be used to create a simple public key cipher: either x or y can be thought of as a secret key and the other is the public key. Let x = 3, y = 7, n = 10, and M be the message: M=4;
3*4 mod 10 = 2; (ciphertext) - encrypting 2*7 mod 10 = 4 = M ; (message) - decrypting
M =6 ;
3*6 mod 10 = 8; 8*7 mod 10 = 6 = M (message)
15
16
Insecure channel
Alice
Inverse Hash Function hello Set of Integers Alices Private Key Encrypted Message
18
20
21
MIT was able to resolve that issue with the NSA, which later said that the employee who contacted Rivest was acting on his own.
22
23
RSA
Ron Rivest, Adi Shamir, and Len Adleman invented the most popular instantiation of public-key encryption, which has become known as RSA. Alice, the sender, wants to send Bob, the receiver a message that Eve, the eavesdropper, cannot decrypt. Bob has published a public key, KR, which Alice is to use to encrypt her message.
24
RSA
Alice partitions her clear text message T into 32byte groups of ASCII letters, T0T1 ... Tn-1. For i = 0 to n-1, she sends Ci, the remainder of (Ti)3/KR. Bob's public key KR pq, where p and q are primes, each 2 greater than a multiple of 3. To decrypt the message Bob computes s = (1/3)(2(p-1)(q-1) + 1). He then decrypts each Ci by computing the remainder of (Ci)s)/KR, which we can show is Ti.
25
RSA
These methods hinge on the fact that it is relatively easy (computationally) to multiply two large numbers, but it is quite difficult to factor a large number if the only factors are large prime numbers. Example: Try to factor 3233. See how long it takes.
26
RSA
53 and 61.
27
Attacking RSA
Try to find primes p and q such that pq = KR.
In 1977, Rivest, Shamir and Adleman issued a challenge to the world: break a small cipher text encrypted with RSA129, a 129-digit key. RSA129 was cracked with the largest computation of all time (about 1000 computers around the world working 8 months). The secret message was: THE MAGIC WORDS ARE SQUEAMISH OSSIFRAGE. It is estimated that with 250 digit keys and current factoring algorithms, you'd need 1000 computers for about 800 million months (or 100 billion computers for 8 months). Thus, RSA is still deemed to be strong encryption.
28
Asymmetric-Key Encryption
Advantages One can send secure message to someone without having to share any secret keys. Only public key is distributed. The recipient can verify the identity of the sender.
29
Key Encryption
Send Money!
sende r
Encrypted Message
Insecure channel
Send Money!
receive r
Encrypted Message
30
Key Encryption
The key is typically smaller than the message. The message is broken into pieces and the key is used to encrypt each piece.
31
The key could be the binary number 01010101 The message could be encoded into ascii code (hex)
49 20 68 61 76 65 20 61 20 73 65 63 72 65 74
32
34
Key Encryption
The key is the hardest to determine when it is as long as the message itself. This is because the pattern left by the key does not repeat when the message gets encoded
35
36
RSA Cryptosystem
Setup:
n = pq, with p and q primes e relatively prime to (n) = (p 1) (q 1) d inverse of e in Z(n)
Example
Setup:
p = 7, q = 17 n = 717 = 119 (n) = 616 = 96 e=5 d = 77
Keys:
Public key: KE = (n, e) Private key: KD = d
Keys:
public key: (119, 5) private key: 77
Encryption:
Plaintext M in Zn C = Me mod n
Encryption:
M = 19 C = 195 mod 119 = 66
Decryption:
M = Cd mod n
Decryption:
C = 6677 mod 119 = 19
37
Encryption
C = M3 mod 55
Decryption
M = C27 mod 55
11 11 29 24 47 38
12 23 30 50 48 42
13 52 31 36 49 4
14 49 32 43 50 40
15 20 33 22 51 46
16 26 34 34 52 28
17 18 35 30 53 47
18 2 36 16 54 54
38
Frequency of letters in English text: - (A, E, O, T) is approximately 40% (38.71% in the above table)
- (A, E, O, T, N, I) is approximately 50% (52.10 in the above table)
39
Polyalphabetic substitution
a o
The cipher letter ci is found in the pi-th row and ki-th column
Key (ki) Plain text (pi) Cipher text (ci) i a m i e x i s t t h a t i s c e r H I j t
40
M A C H I u a o p m
N E S C A k m k v t
N N O T T u n h b l
N K
m e d
Cryptanalysis of polyalphabetic substitutions: Kasiski method for repeated patterns Key: dickens
Plain text
41
42
43
The End
Thanks
44