Professional Documents
Culture Documents
Chapter -2
Mr.Rajasekhar Boddu
Outline
• Model of Network Security
• Internet standard and RFCs
• Mathematical tool for cryptography
• To introduce prime numbers and their applications in cryptography.
• To discuss some primality test algorithms and their efficiencies.
• To discuss factorization algorithms and their applications in
cryptography.
• To describe the Chinese remainder theorem and its application.
A Model for Network Security
• A message is to be transferred from one party to another across some
sort of internet.
• The two parties, who are the principals in this transaction, must
cooperate for the exchange to take place.
• A logical information channel is established by defining a route
through the internet from source to destination and by the cooperative
use of communication protocols (e.g., TCP/IP) by the two principals.
Cont’d…
• All the techniques for providing security have two components:
• A security-related transformation on the information to be sent.
• Eg. Encryption, addition of a code used to verify the identity of the sender
• Some secret information shared by the two principals
• Eg. Encryption key
• A trusted third party may be needed to achieve secure transmission
• Eg. Distribute the secret information and arbitrate disputes between them
Cont’d…
Cont’d…
• As shown in general model above, there are four basic tasks in
designing a particular security service
i. Design an algorithm for performing the security-related transformation
ii. Generate the secret information to be used with the algorithm
iii. Develop methods for the distribution and sharing of the secret information
iv. Specify a protocol to be used by the two principals
Internet Standards and RFCs
• Protocol, which is synonymous with “rule.”
• Standards, which are agreed-upon rules
• Many of the security techniques and applications described so far have
been specified as standards.
• Various organizations have been involved in the development or
promotion of these standards.
• Internet standard is a thoroughly tested specification that is useful to
and adhered to by those who work with the Internet.
• It is a formalized regulation that must be followed.
Cont’d…
• A specification begins as an Internet draft.
• An Internet draft is a working document with no official status and a six-month lifetime.
process(approval)
IETF procedure:
• Make a draft version of the document available as an Internet Draft,
which is placed in the IETF's "Internet Drafts" online directory.
• The document may remain as an Internet Draft for up to 6 months,
and interested parties may review and comment on the draft.
• The working-group may subsequently publish a revised version of the
draft as RFC (Request for Comment) which are the working notes of
the Internet research and development community.
• The IETF is responsible for publishing the RFCs, with approval of the
IESG.
The Standardization Process
• The decision of which RFCs become Internet standards is made by the
IESG, on the recommendation of the IETF.
• To become a standard, a specification must meet the following
criteria:
1. Be stable and well understood
2. Be technically competent
3. Have multiple, independent, and interoperable implementations with
substantial operational experience.
4. Enjoy significant public support .
5. Be recognizably useful in some or all parts of the Internet
Mathematical Tools for Cryptography:
Number theory
• Integer
• In integer we use a set and few operations
• Set of integer denoted by Z and contains all integer numbers(no fraction) -∞ to ∞
• Z={…-2,-1,0,1,2,…}
• Binary operation
• Takes two input and produce one output
• In cryptography ,We apply 3 binary operation on a set of integer
• Addition, subtraction and multiplication
• Each of this operation takes two inputs(a and b) and produce one output(c)
• The 2 inputs comes from set of integer and the output goes to set of integer
• NB: division doesn’t fit to this category. Because, it produce two output
Cont’d…
• Example
• Each input can be either +ve or -ve. So, we can have 4 cases for each
operations
Example
Checking for Primeness(primality test )
Cont’d…
Prime Factorization
• To factor a number n is to write it as a product of other numbers:
n=a x b x c
• NB: factoring a number is relatively hard compared to multiplying the factors together to generate
the number
eg. 91=7x13
3600=24x32x52
• It can be generalized as a = p1 a1 x p2 a2 x ... x pt at
• where p1 < p2 < ... pt are prime numbers and where each ai is a positive integer
Relatively Prime Numbers & GCD
• Two numbers a, b are relatively prime if have no common divisors apart from 1
eg. 8 & 15 are relatively prime since factors of 8 are 1,2,4,8 and
of 15 are 1,3,5,15 and 1 is the only common factor
• Conversely, we can determine the greatest common divisor by comparing their
prime factorizations and using least powers
GCD(18,300)=21x31x50=6
Modular Arithmetic
• When we see clock, the 12th hour is replaced with 0
• 1,2,3,4,5,6,7,8,10,11,0,1,2,3,4,5,6,…
• This is how we count in modulo 12
• When we add 1 to 11 we get back to 0
• This is how modular arithmetic system works
• It is also possible to count backward to arrive at similar answer that
fits the limitation
• -5 is the same as 2 in modulo 7
• 1,2,3,4,5,6,0,1,2,3,4,5,6
Cont’d…
• The division r/ship a = qm + r takes 2 input and produce two output
• It can also be expressed as a = r mod m
• This binary operator is called modulo operator,
• m is called modulus
• r is called remainder /residue
• The easies way to find r is dividing a by m and extract the remainder
• Eg. 17/4 is 4 with remainder 1(17=4x4+1)
• usually chose smallest positive remainder as residue , 0 <= r <= m-1
• process is known as modulo reduction
• eg. -12 mod 7 = -5 mod 7 = 2 mod 7 = 9 mod 7
• You can do the reduction when the numbers are bigger than m
Cont’d…
• In n mod m
• When n >= m,
• To calculate the value of n mod m,
• when n is +ve, we remove as many multiple of m as possible until we left with
a number/answer between 0 and m-1, inclusive
• For example, if a = 2 and p = 7, then 2 7 = 128, and 128 − 2 = 126 = 7 × 18 is an integer multiple of 7.
• If a general had 1200 soldiers at the start of a battle and if at the end there were 3 left
over when they lined up 5 at a time, 3 left over when they lined up 6 at a time, 1 left
over when they lined up 7 at a time, and none left over when they lined 11 at a time,
how many soldiers survived the battle?