Professional Documents
Culture Documents
ICS141: Discrete Mathematics For Computer Science I
ICS141: Discrete Mathematics For Computer Science I
ICS141:
Discrete Mathematics for
Computer Science I
Dept. Information & Computer Sci., University of Hawaii
Jan Stelovsky
based on slides by Dr. Baek and Dr. Still
Originals by Dr. M. P. Frank and Dr. J.L. Gross
Provided by McGraw-Hill
Lecture 18a
Chapter 3. The Fundamentals
3.6 Applications of Integers Algorithms
n Hints
n 162 = 256
cryptosystem
n Theorem 1:
n ∀a,b ∈ Z : ∃s,t ∈Z: gcd(a,b) = sa + tb
+
n Lemma 1:
n ∀a,b,c ∈ Z : gcd(a,b)=1 ∧ a | bc → a|c
+
n Lemma 2:
n If p is prime and p|a1a2…an (integers ai)
then ∃i: p|ai.
n Theorem 2:
n If ac ≡ bc (mod m) and gcd(c,m)=1, then
a ≡ b (mod m). (m∈Z+, a,b,c∈Z)
n Theorem 1:
∀a,b∈Z+: ∃s,t ∈Z such that gcd(a,b) = sa + tb
n Proof: By induction over the value of the
larger argument a.
n Example:
n Express gcd(252, 198) = 18 as a linear
198 = 3 ⋅ 54 + 36
Euclidean algorithm
54 = 1 ⋅ 36 + 18
36 = 2 ⋅ 18
n Lemma 1:
∀a,b,c ∈ Z+: gcd(a,b)=1 ∧ a|bc → a|c
Proof:
n Applying theorem 1, ∃s, t: sa + tb = 1.
An Application of Primes!
n When you visit a secure web site (https:… address,
indicated by padlock icon in IE, key icon in
Netscape), the browser and web site may be using
a technology called RSA encryption.
n This public-key cryptography scheme involves
exchanging public keys containing the product pq
of two random large primes p and q (a private key)
which must be kept secret by a given party.
n So, the security of your day-to-day web
transactions depends critically on the fact that all
known factoring algorithms are intractable!
ICS 141: Discrete Mathematics I – Fall 2011 13-16
University of Hawaii
n In public key cryptosystems, there are two complementary keys instead.
n One key decrypts the messages that the other one encrypts.
n This means that one key (the public key) can be made public, while the other
(the private key) can be kept secret from everyone.
n Messages to the owner can be encrypted by anyone using the public
key, but can only be decrypted by the owner using the private key.
n Like having a private lock-box with a slot for messages.
n Or, the owner can encrypt a message with their private key, and then
anyone can decrypt it, and know that only the owner could have
encrypted it.
n This is the basis of digital signature systems.
n 1819
13 mod 2537 = 2081; 141513 mod 2537 = 2182
n 0981
937 mod 2537 = 0704
n 0461
937 mod 2537 = 1115
operation.
n The operations may be easily parallelized on a
vector machine.
n Works so long as m > the desired result.