LECTURE NOTES ON INFORMATION SYSTEM SECURITY (Basic Mathematical Concepts)

advertisement
The University of Babylon
Department of Software
LECTURE NOTES ON INFORMATION SYSTEM
SECURITY
(Basic Mathematical Concepts)
By
Dr. Samaher Hussein Ali
College of Information Technology, University of Babylon, Iraq
Samaher@itnet.uobabylon.edu.iq
26 October 2013
The Modulo Operation
Definition
Let a, r, n be integers and let m > 0
We write a  r mod n if n divides a – r (or r – a) and 0  r < n
n is called the modulus
r is called the remainder
Note that r is positive or zero
Note that a = n.q + r where q is another integer (quotient)
Example:
42  6 mod 9
9 divides 42 - 6 = 36
9 also divides 6 - 42 = -36
Note that 42= 9x4 + 6
(q = 4)
26 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 7
Prime Numbers
 An integer p is said to be a prime number if its only positive divisors are
1 and itself
 Examples 1, 3, 7, 11, ..
 Any integer can be expressed as a unique product of prime numbers
raised to positive integral powers
n=p1e1 p2e2 …pkek // n: ingterger, pi:prime, e,: positive integer
 Examples
7569 = 3 x 3 x 29 x 29 = 32 x 292
5886 = 2 x 27 x 109 = 2 x 33 x 109
4900 = 72 x 52 x 22
100 = ?
,
250 = ?
 This process is called Prime Factorization
26 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 7
Greatest Common Divisor (GCD)
 Definition: Greatest Common Divisor
This is the largest divisor of both a and b
 Given two integers a and b, the positive integer c is called their GCD or
greatest common divisor if and only if
 c | a and c | b
 Any divisor of both a and b also divides c
 Notation: gcd(a, b) = c
 Notation: gcd(0, 2) = 2
 Notation: gcd(0, 0) = ????
26 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 7
Greatest Common Divisor (GCD)
 Example: gcd(15,100) = ?
a= q*b+r
100=6*15+10
15=1*10+5
10=2*5+0
Gcd(15,100)=5
 Example: gcd(49,63) = ?
a= q*b+r
63=1*49+14
49=3*14+7
14=2*7+0
Gcd(49,63)=7
26 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 7
Relatively Prime Numbers
 Two numbers are said to be relatively prime if their gcd is 1
 Example: 63 and 22 are relatively prime
Gcd(63,22)
63= 2(22)+19
22=1(19)+3
19=6(3)+1
3= 3(1)+0
- Gcd(63,22)=1
 How do you determine if two numbers are relatively prime?
 Find their gcd or
 Find their prime factors
 If they do not have a common prime factor other than 1, they are
relatively prime
 Example: 63 = 9 x 7 = 32 x 7 and
22 = 11 x 2
26 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 7
Euler phi (or totient) function
For n ≥ 1, (n) : is the number of integers in [1,n] which are relatively prime to n //
(n) is the Euler phi or totient function
 If p is prime, then (p)=p-1
 If R=p1e1 p2e2 …pkek
then
( R ) =IIi=1n(pi-1)ei Piei-1
 If gcd(m,n)=1, then (mn)= (m).(n)
Examples:
(7)=7-1=6
(96)=?
96=2^5*3
(96)=(2)5-1*(2-1)5*(3-1)1*(3)0
=2^4*2
=32
26 October 2013
Dr. Samaher Hussein Ali
Notes of Lecture 7
Download