Docsity

Notes on Computer Security - Fall 2007 | ECS 153, Study notes of Computer Science

Toggle sidebar
bg1
N
OTES
FOR
O
CTOBER
26, 2000 ECS 153 — F
ALL
2000
Version of October 26, 2000 11:03 am Page 1 of 4
Notes for October 26, 2000
1. Greetings and Felicitations!
a. Homework #2 now available on the web page
2. Puzzle of the day
3. Long key generation
a. Running-key cipher: M=THETREASUREISBURIED; K=THESECONDCIPHERISAN; C=MOIL-
VGOFXTMXZFLZAEQ; wedge is that (plaintext,key) letter pairs are not random (T/T, H/H, E/E, T/S, R/E,
A/O, S/N, etc.)
b. Enigma/rotor systems; wheels, 3 rotors and a reflecting one. Go through it; UNIX uses this for
crypt
(1) com-
mand.
c. Perfect secrecy: when the probability of computing the plaintext message is the same whether or not you
have the ciphertext
d. Only cipher with perfect secrecy: one-time pads; C=AZPR; is that DOIT or DONT?
4. DES
a. Go through the algorithm
5. Public-Key Cryptography
a. Basic idea: 2 keys, one private, one public
b. Cryptosystem must satisfy:
i. given public key, CI to get private key;
ii. cipher withstands chosen plaintext attack;
iii. encryption, decryption computationally feasible [note: commutativity
not
required]
c. Benefits: can give confidentiality or authentiction or both
6. Use of PKC
a. Normally used as key interchange system to exchange secret keys (cheap)
b. Then use secret key system (too expensive to use PKC for this)
7. Diffie-Hellman
a. Provides authenticity; used to compute shared keys for messages
b. Go through algorithm:
Idea: choose
a
; given
g
,
p
, compute
n
=
g
a
mod
p
; strength is inability to find
a
given other 3 parameters.
Public key is
n
;
g
,
p
are shared; private key is
a
.
c. Example:
p
= 53,
g
= 17. Alice’s private key is 5 and Bob’s is 7. Alice’s public key is 17
5
mod 53 = 40,
Bob’s is 17
7
mod 53 = 6.
To generate a shared key, Alice raises Bob’s public key to her private key: 6
5
mod 53 = 38. Bob raises Alice’s
public key to his private key: 40
7
mod 53 = 38
8. RSA
a. Provides both authenticity and confidentiality
b. Go through algorithm:
Idea:
C
=
M
e
mod
n
,
M
=
C
d
mod
n
, with
ed
mod
φ
(
n
) = 1.
Proof:
M
φ
(
n
)
mod
n
= 1 [by Fermat’s theorem as generalized by Euler]; follows immediately from
ed
mod
φ
(
n
) = 1.
Public key is (
e
,
n
); private key is
d
. Choose
n
=
pq
; then
φ
(
n
) = (
p
–1)(
q
–1).
c. Example:
p
= 5,
q
= 7;
n
= 35, f(
n
) = (5–1)(7–1) = 24. Pick
d
= 11. Then
de
mod
φ
(
n
) = 1, so choose
e
= 11. To encipher
pf3
pf4

Partial preview of the text

Download Notes on Computer Security - Fall 2007 | ECS 153 and more Study notes Computer Science in PDF only on Docsity!

N O T E S F O R O C T O B E R 2 6 , 2 0 0 0 E C S 1 5 3 — F A L L 2 0 0 0

Notes for October 26, 2000

  1. Greetings and Felicitations! a. Homework #2 now available on the web page
  2. Puzzle of the day
  3. Long key generation a. Running-key cipher: M=THETREASUREISBURIED; K=THESECONDCIPHERISAN; C=MOIL- VGOFXTMXZFLZAEQ; wedge is that (plaintext,key) letter pairs are not random (T/T, H/H, E/E, T/S, R/E, A/O, S/N, etc.) b. Enigma/rotor systems; wheels, 3 rotors and a reflecting one. Go through it; UNIX uses this for crypt (1) com- mand. c. Perfect secrecy: when the probability of computing the plaintext message is the same whether or not you have the ciphertext d. Only cipher with perfect secrecy: one-time pads; C=AZPR; is that DOIT or DONT?
  4. DES a. Go through the algorithm
  5. Public-Key Cryptography a. Basic idea: 2 keys, one private, one public b. Cryptosystem must satisfy: i. given public key, CI to get private key; ii. cipher withstands chosen plaintext attack; iii. encryption, decryption computationally feasible [note: commutativity not required] c. Benefits: can give confidentiality or authentiction or both
  6. Use of PKC a. Normally used as key interchange system to exchange secret keys (cheap) b. Then use secret key system (too expensive to use PKC for this)
  7. Diffie-Hellman a. Provides authenticity; used to compute shared keys for messages b. Go through algorithm: Idea: choose a ; given g , p , compute n = ga^ mod p ; strength is inability to find a given other 3 parameters. Public key is n ; g , p are shared; private key is a. c. Example: p = 53, g = 17. Alice’s private key is 5 and Bob’s is 7. Alice’s public key is 17^5 mod 53 = 40, Bob’s is 17^7 mod 53 = 6. To generate a shared key, Alice raises Bob’s public key to her private key: 6^5 mod 53 = 38. Bob raises Alice’s public key to his private key: 40^7 mod 53 = 38
  8. RSA a. Provides both authenticity and confidentiality b. Go through algorithm: Idea: C = Me^ mod n , M = Cd^ mod n , with ed mod φ( n ) = 1. Proof: M φ ( n )^ mod n = 1 [by Fermat’s theorem as generalized by Euler]; follows immediately from ed mod φ( n ) = 1. Public key is ( e , n ); private key is d. Choose n = pq ; then φ ( n ) = ( p –1)( q –1). c. Example: p = 5, q = 7; n = 35, f( n ) = (5–1)(7–1) = 24. Pick d = 11. Then de mod φ ( n ) = 1, so choose e = 11. To encipher

N O T E S F O R O C T O B E R 2 6 , 2 0 0 0 E C S 1 5 3 — F A L L 2 0 0 0

2, C = Me^ mod n = 2^11 mod 35 = 2048 mod 35 = 18, and M = C d^ mod n = 1811 mod 35 = 2. d. Example: p = 53, q = 61, n = 3233 , f( n ) = (53–1)(61–1) = 3120. Take d = 791; then e = 71. Encipher M = RENAISSANCE: A = 00, B = 01, …, Z = 25, blank = 26. Then: M = RE NA IS SA NC Eblank = 1704 1300 0818 1800 1302 0426 C = (1704)^71 mod 3233 = 3106; etc. = 3106 0100 0931 2691 1984 2927

P U Z Z L E O F T H E D A Y E C S 1 5 3 — F A L L 2 0 0 0

Drill for oil? You mean drill into the ground to try and find oil? You're crazy. — Drillers who Edwin L. Drake tried to enlist to his project to drill for oil in 1859. Stocks have reached what looks like a permanently high plateau. — Irving Fisher, Professor of Economics, Yale University, 1929. Airplanes are interesting toys but of no military value. — Marechal Ferdinand Foch, Professor of Strategy, Écßœole Superieure de Guerre. Everything that can be invented has been invented. — Charles H. Duell, Commissioner, U.S. Patent Office, 1899. Louis Pasteur's theory of germs is ridiculous fiction. — Pierre Pachet, Professor of Physiology at Toulouse, 1872. The abdomen, the chest, and the brain will forever be shut from the intrusion of the wise and humane surgeon. — Sir John Eric Ericksen, British surgeon, appointed Surgeon-Extraordinary to Queen Victoria, 1873. 640K ought to be enough for anybody. — Bill Gates, 1981.