Unit 1
Unit 1
Unit 1
ap = p (mod p)
Introduction
X.800 defines a security service as a service that is provided by a protocol layer
of communicating open systems and that ensures adequate security of the
systems or of data transfers.
Perhaps a clearer definition is found in RFC 2828, which provides the following
definition: a processing or communication service that is provided by a system
to give a specific kind of protection to system resources; security services
implement security policies and are implemented by security mechanisms.
X.800 divides these services into five categories and fourteen specific services
(Table 1.2).We look at each category in turn.5
The mechanisms are divided into those that are implemented in a specific
protocol layer, such as TCP or an application-layer protocol, and those that are
not specific to any particular protocol layer or security service.
Encipherment
The use of mathematical algorithms to transform data into a form that is not
readily intelligible. The transformation and subsequent recovery of the data
depend on an algorithm and zero or more encryption keys.
Digital Signature
Data appended to, or a cryptographic transformation of, a data unit that allows
a recipient of the data unit to prove the source and integrity of the data unit
and protect against forgery (e.g., by the recipient).
Access Control
A variety of mechanisms that enforce access rights to resources.
Data Integrity
A variety of mechanisms used to assure the integrity of a data unit or stream of
data units.
Authentication Exchange
A mechanism intended to ensure the identity of an entity by means of
information exchange.
Traffic Padding
The insertion of bits into gaps in a data stream to frustrate traffic analysis
attempts.
Routing Control
Enables selection of particular physically secure routes for certain data and
allows routing changes, especially when a breach of security is suspected.
Notarization
Prepared By: Mrs.A.Sarkunavathi AP/IT 15
The use of a trusted third party to assure certain properties of a data exchange.
Pervasive Security Mechanisms
Mechanisms those are not specific to any particular OSI security service or
protocol layer.
Trusted Functionality
That which is perceived to be correct with respect to some criteria (e.g., as
established by a security policy).
Security Label
The marking bound to a resource (which may be a data unit) that names or
designates the security attributes of that resource.
Event Detection
Detection of security-relevant events.
Security Audit Trail
Data collected and potentially used to facilitate a security audit, which is an
independent review and examination of system records and activities.
A reversible encipherment mechanism is simply an encryption algorithm that
allows data to be encrypted and subsequently decrypted.
Irreversible encipherment mechanisms include hash algorithms and message
authentication codes, which are used in digital signature and message
authentication applications.
Table 1.4, based on one in X.800, indicates the relationship between security
services and security mechanisms.
security attacks, uses both in X.800 and RFC 2828, is in terms of passive
attacks and active attacks. A passive attack attempts to learn or make use of
information from the system but does not affect system resources.
An active attack attempts to alter system resources or affect their operation.
Passive attacks are in the nature of eavesdropping on, or monitoring of,
transmissions.
The goal of the opponent is to obtain information that is being transmitted. Two
types of passive attacks are the release of message contents and traffic analysis.
The release of message contents is easily understood (Figure 1.2a).
Passive Attacks
Passive attacks (Figure 1.1) are in the nature of eavesdropping on, or
monitoring of, transmissions. The goal of the opponent is to obtain information
that is being transmitted.
Two types of passive attacks are :
the release of message contents and
traffic analysis.
The release of message contents is easily understood. A telephone
conversation, an electronic mail message, and a transferred file may contain
sensitive or confidential information.
A second type of passive attack, traffic analysis, is subtler. Suppose that we
had a way of masking the contents of messages or other information traffic so
Active Attacks
Active attacks (Figure 1.1b) involve some modification of the data stream or the
creation of a false stream and can be subdivided into four categories:
masquerade,
replay,
modification of messages, and
denial of service.
A masquerade - A masquerade attack usually includes one of the other forms of
active attack.
Replay involves the passive capture of a data unit and its subsequent
retransmission to produce an unauthorized effect.
Modification of messages simply means that some portion of a legitimate message
is altered, or that messages are delayed or reordered, to produce an unauthorized
effect.
The denial of service prevents or inhibits the normal use or management of
communications facilities.
Threat
Viruses and worms are two examples of software attacks. They can also be
inserted into a system across a network.
The security mechanisms needed to cope with unwanted access fall into two
broad categories (see Figure 1.3).
The first category might be termed a gatekeeper function. It includes
password-based login procedures and screening logic that is designed to
detect and reject worms, viruses.
The second line of defense consists of a variety of internal controls that
monitor activity and analyze stored information in an attempt to detect
the presence of unwanted intruders.
Requirements
an estimate
The two basic building blocks of all encryption techniques are substitution and
transposition.
A substitution technique is one in which the letters of plaintext are replaced
by other letters or by numbers or symbols. If the plaintext is viewed as a
sequence of bits, then substitution involves replacing plaintext bit patterns with
ciphertext bit patterns.
Caesar Cipher
The earliest known, and the simplest, use of a substitution cipher was by
Julius Caesar. The Caesar cipher involves replacing each letter of the alphabet
with the letter standing three places further down the alphabet. For example,
Then the algorithm can be expressed as follows. For each plaintext letter p,
substitute the ciphertext letter C:
Monoalphabetic Ciphers
If, instead, the “cipher” line can be any permutation of the 26 alphabetic
characters, then there are 26! or greater than 4 * 1026 possible keys. This is 10
orders of magnitude greater than the key space for DES and would seem to
eliminate brute-force techniques for cryptanalysis. Such an approach is referred
to as a monoalphabetic substitution cipher, because a single cipher alphabet
(mapping from plain alphabet to cipher alphabet) is used per message.
Playfair Cipher
The best-known multiple-letter encryption cipher is the Playfair, which treats
digrams in the plaintext as single units and translates these units into
ciphertext diagrams.
The Playfair algorithm is based on the use of a 5 * 5 matrix of letters
constructed using a keyword. Here is an example, solved by Lord Peter Wimsey
in Dorothy Sayers’s Have His Carcase:
Polyalphabetic Ciphers
Another way to improve on the simple monoalphabetic technique is to use
different monoalphabetic substitutions as one proceeds through the plaintext
message.
The general name for this approach is polyalphabetic substitution cipher. All
these techniques have the following features in common:
1. A set of related monoalphabetic substitution rules is used.
2. A key determines which particular rule is chosen for a given transformation.
A general equation of the encryption process is
Similarly, decryption is
One-Time Pad
An Army Signal Corp officer, Joseph Mauborgne, proposed an improvement to
the Vernam cipher that yields the ultimate in security. Mauborgne suggested
using a random key that is as long as the message, so that the key need not be
repeated.
In addition, the key is to be used to encrypt and decrypt a single message, and
then is discarded. Each new message requires a new key of the same length as
the new message. Such a scheme, known as a one-time pad, is unbreakable.
It produces random output that bears no statistical relationship to the
plaintext. Because the ciphertext contains no information whatsoever about the
plaintext, there is simply no way to break the code.
For Example
Thus, in this example, the key is 4312567. To encrypt, start with the column
that is labeled 1, in this case column 3. Write down all the letters in that
column. Proceed to column 4, which is labeled 2, then column 2, then column
1, then columns 5, 6, and 7.
The transposition cipher can be made significantly more secure by performing
more than one stage of transposition. The result is a more complex permutation
that is not easily reconstructed. Thus, if the foregoing message is reencrypted
using the same algorithm,
To visualize the result of this double transposition, designate the letters in the
original plaintext message by the numbers designating their position. Thus,
with 28 letters in the message, the original sequence of letters is
10. What are the fundamental elements of branch of mathematics (Groups, Rings,
Fields)?
Contents
Groups
A1- Closure
A2 - Associative
A3 - Identity
A4 - Inverse
A5 - Commutative
Rings
M1- Closure under multiplication
M2 - Associativity of multiplication
M3 - Distributive law
M4 – Commutativity of
When the group operation is addition, the identity element is 0; the inverse
element of a is -a; and subtraction is defined with the following rule: a − b = a +
(−b).
A group G is cyclic if every element of G is a power ak (k is an integer) of a fixed
element a € G. The element a is said to generate the group G or to be a
generator of G. A cyclic group is always abelian and may be finite or infinite.
Rings
A ring R, sometimes denoted by {R, +, *}, is a set of elements with two binary
operations, called addition and multiplication, such that for all a, b, c in R
the following axioms are obeyed.
Fields
A field F, sometimes denoted by {F, +, *}, is a set of elements with two binary
operations, called addition and multiplication, such that for all a, b, c in F the
following axioms are obeyed.
11. Discuss in detail about Modular arithmetic. What are the various operations
involved in Modular Arithmetic.
Contents
The Modulus
Properties of Congruences
Modular Arithmetic Operations
Properties of Congruences
Congruences have the following properties:
Contents
Introduction
Greatest Common Divisor
Finding the Greatest Common
Divisor
Introduction
One of the basic techniques of number theory is the Euclidean algorithm, which
is a simple procedure for determining the greatest common divisor of two
positive integers. First, we need a simple definition: Two integers are relatively
prime if their only common positive integer factor is 1.
Greatest Common Divisor
Recall that nonzero b is defined to be a divisor of a if a = mb for some m, where
a, b, and m are integers.
We will use the notation gcd(a, b) to mean the greatest common divisor of a
and b. The greatest common divisor of a and b is the largest integer that divides
both a and b.
Let us now return to Equation (4.2) and assume that r1 ≠ 0. Because b > r1, we
can divide b by r1 and apply the division algorithm to obtain:
Let us now look at an example with relatively large numbers to see the power of this algorithm:
Contents
Ordinary Polynomial Arithmetic
Polynomial Arithmetic with Coefficients
in Zp
Finding the Greatest Common Divisor
Modular Polynomial Arithmetic
Where the ai are elements of some designated set of numbers S, called the
coefficient set, and an _ 0. We say that such polynomials are defined over the
coefficient set S. A zero-degree polynomial is called a constant polynomial and
is simply an element of the set of coefficients.
An nth-degree polynomial is said to be a monic polynomial if an = 1.
Addition and subtraction are performed by adding or subtracting corresponding
coefficients. Thus, if
Figure 4.4 shows an example of polynomial arithmetic over GF(2). For f(x) = (x 7
+ x5 + x4 + x3 + x + 1) and g(x) = (x3 + x + 1), the figure shows f(x) + g(x); f(x) -
g(x); f(x) * g(x); and f(x)/g(x). Note that g(x) | f(x).
1. Arithmetic follows the ordinary rules of polynomial arithmetic using the basic
rules of Algebra, with the following two refinements.
2. Arithmetic on the coefficients is performed modulo p. That is, we use the
rules of arithmetic for the finite field Zp.
3. If multiplication results in a polynomial of degree greater than n - 1, then the
polynomial is reduced modulo some irreducible polynomial m(x) of degree n.
That is, we divide by m(x) and keep the remainder. For a polynomial f(x), the
remainder is expressed as r(x) = f(x) mod m(x).
where p1 < p2< …..< pt are prime numbers and where each ai is a positive
integer. This is known as the fundamental theorem of arithmetic; a proof can be
found in any text on number theory.
It is useful for what follows to express this another way. If P is the set of all
prime numbers, then any positive integer a can be written uniquely in the
following form:
The right-hand side is the product over all possible prime numbers p; for any
particular value of a, most of the exponents ap will be 0.
exponents. Given
Define k = ab. We know that the integer k can be expressed as the product of
powers of primes: .
It follows that kp = ap + bp for all
What does it mean, in terms of the prime factors of a and b, to say that a
divides b? Any integer of the form pn can be divided only by an integer that is of
a lesser or equal power of the same prime number, p j with j ≤ n. Thus, we can
say the following.
Given
Two theorems that play important roles in public-key cryptography are Fermat’s
theorem and Euler’s theorem.
Fermat’s Theorem
Fermat’s theorem states the following: If p is prime and a is a positive integer
not divisible by p, then
Proof:
Consider the set of positive integers less than p: {1, 2, c, p - 1} and multiply
each element by a, modulo p, to get the set X = {a mod p, 2a mod p, c, (p - 1)a
mod p}.
Multiplying the numbers in both sets (p and X) and taking the result mod p yields
We can cancel the (p - 1)! term because it is relatively prime to p . This yields
Equation (8.2), which completes the proof.
Note that the first form of the theorem [Equation (8.2)] requires that a be
relatively prime to p, but this form does not.
Now suppose that we have two prime numbers p and q with p≠ q. Then we can
show that, for n = pq,
Euler’s Theorem
Euler’s theorem states that for every a and n that are relatively prime:
Proof:
Equation (8.4) is true if n is prime, because in that case, f(n) = (n - 1) and
Fermat’s theorem holds. However, it also holds for any integer n. Recall that f(n)
is the number of positive integers less than n that are relatively prime to n.
Consider the set of such integers, labeled as
That is, each element xi of R is a unique positive integer less than n with gcd(xi,
n) = 1. Now multiply each element by a, modulo n:
As is the case for Fermat’s theorem, an alternative form of the theorem is also
useful:
16. The Miller-Rabin test can determine if a number is not prime but cannot
determine if a number is prime. How can such an algorithm be used to test for
primality?
Contents
Testing for primality
Miller-Rabin Algorithm
Two Properties of Prime Numbers
Details of the Algorithm
A Deterministic Primality Algorithm
Distribution of Primes
Testing for primality
o Miller-Rabin Algorithm
The algorithm due to Miller and Rabin [MILL75, RABI80] is typically used to test
a large number for primality. Before explaining the algorithm, we need some
background.
First, any positive odd integer n ≥ 3 can be expressed as
where the mi are pairwise relatively prime; that is, gcd(mi, mj) = 1 for 1 ≤ i, j ≤ k,
and i ≠ j. We can represent any integer A in ZM by a k-tuple whose elements are
in Zmi using the following correspondence:
One of the useful features of the Chinese remainder theorem is that it provides
a way to manipulate (potentially very large) numbers mod M in terms of tuples
of smaller numbers. This can be useful when M is 150 digits or more. However,
note that it is necessary to know beforehand the factorization of M.
where φ(n), Euler’s totient function, is the number of positive integers less than
n and relatively prime to n. Now consider the more general expression:
By the definition of modular arithmetic. It follows that for any integer b and a
primitive root a of prime number p, we can find a unique exponent i such that
This exponent i is referred to as the discrete logarithm of the number b for the
base a (mod p).We denote this value as dloga,p(b).
Note the following:
PART-A