Professional Documents
Culture Documents
Number theory
Dr.S.Kalaivani
Assistant Professor/ Dept. of CSE
IRTT
*. Notes, pictures, algorithms and other details are used for educational
purpose only. It is collected from various web sites and text books for teaching
purpose only
Topics Covered
1. Services
2. Mechanisms and attacks
3. OSI security architecture
4. Network security model
5. Classical Encryption techniques
– Symmetric cipher model
• Substitution techniques
• Transposition techniques
• Steganography
– Privacy
• Assures that individuals control or influence what
information related to them may be collected and
stored and by whom and to whom that information
may be disclosed.
– System Integrity
• Assures that a system performs its intended function in
an unimpaired manner, free from deliberate or
inadvertent unauthorized manipulation of the system.
• Availability
– Assures that systems work promptly and service is
not denied to authorized users.
• Attack
– An assault on system security that derives from an
intelligent threat
– An intelligent act that is a deliberate attempt to
violate the security policy of a system.
• Traffic Analysis
– Masking content of Message (Encryption)
• Access Control
– It is the ability to limit and control access to host
systems
• Service threats
– Exploits service flaws in computer to inhibit use by
legitimate users
• Asymmetric Encryption
– Public key Encryption
• Encryption Algorithm
• Secret Key
• Cipher Text
• Decryption Algorithm
Unit 1- Introduction & Number Theory 28
Requirements for secure use of
conventional encryption
• Need of strong algorithm
• Sender and receiver must have copies of secret
key in secure fashion
• Cipher Text Y
Y=E(K,X) Encryption
• Decryption Algorithm D
X=D(K,Y) Decryption
• Block Cipher
– DES
– AES
• Polyalphabetic Ciphers
– Playfair Cipher
– Hill Cipher
– Vigenere cipher
– Vernam cipher
or
Unit 1- Introduction & Number Theory 48
C = PK mod 26
(or)
C = E(K, P) = PK mod 26
P = D(K, C) = CK-1 mod 26 = PKK-1 = P
• Commutative
• Integral domain
– Multiplicative identity
– No zero divisors
• eg.
a=3;n=10; ø(10)=4;
hence 34 = 81 = 1 mod 10
a=2;n=11; ø(11)=10;
hence 210 = 1024 = 1 mod 11
Primality Testing
• Find largest prime no with minimum amount of time
• often need to find large prime numbers
• traditionally sieve using trial division
– ie. divide by all numbers (primes) in turn less than the
square root of the number
– only works for small numbers
• alternatively can use statistical primality tests based
on properties of primes
– for which all primes numbers satisfy property
– but some composite numbers, called pseudo-primes, also
satisfy the property
• can use a slower deterministic primality test
Miller Rabin Algorithm
• a test based on Fermat’s Theorem
• algorithm is:
TEST (n) is:
1. Find integers k, q, k > 0, q odd, so that (n–1)=2kq
2. Select a random integer a, 1<a<n–1
3. if aq mod n = 1 then return (“maybe prime");
4. for j = 0 to k – 1 do
2 jq
5. if (a mod n = n-1)
then return(" maybe prime ")
6. return ("composite")
Probabilistic Considerations
• if Miller-Rabin returns “composite” the
number is definitely not prime
• otherwise is a prime or a pseudo-prime
• chance it detects a pseudo-prime is < 1/4
• hence if repeat test with different random a
then chance n is prime after t tests is:
– Pr(n prime after t tests) = 1-4-t
– eg. for t=10 this probability is > 0.99999
Chinese Remainder Theorem
• used to speed up modulo computations
• if working modulo a product of numbers
– eg. mod M = m1m2..mk
• Chinese Remainder theorem lets us work in
each moduli mi separately
• since computational cost is proportional to
size, this is faster than working in the full
modulus M
x ≡ a1 mod m1
x ≡ a2 mod m2
x ≡ a3 mod m1 Find x
Steps:
1. Find M. M= m1 × m2 × m3
2. Fine M1,M2,M3 M1=M/m1 M2= M/m2
M3=M/m3
3. Find M1-1 , M2-1, M3-1 M M1-1 ≡ 1 mod m1
4. x = (a1 × M1 × M1-1 ) + (a2 × M2 × M2-1 ) × (a3
× M3 × M3-1 ) mod M