NS by MU PDF
NS by MU PDF
3. Principles of Security:
Generally the security issues can be classified into the following categories.
(1) Confidentiality
(2) Authenticity
(3) Availability
(4) Auditability
(5) Access Control
(6) Integrity
(7) Non-repudiability
Security
Fig. 1.1
These three are the basic levels of issues, which will lead to the further loopholes.
3.1.Confidentiality:
Basically the threats can be in the area of network or in the area of application. Mainly the
insiders who are having full access with the computer system create the application levels of
threats. This can be easily detected can be avoided by using suitable mechanisms. Even though
the application level threats are easy to detect, this is also creating high level of problems to the
system.
The network levels of attacks are dangerous because of the major business transactions that
are happening through the Internet. This is maintaining the actual secrecy of the message. The
message that is traveling through the network should not be opened by any of the third parties
who are not related with the transaction.
Nowadays majority of the bank transactions are happening through the network. So that
confidentiality issue is creating lot of problems related with network, software and data.
The confidentiality related issues could be belonging to any one of the following categories:
(1) IP Spoofing
(2) Packet sniffing
(3) Alteration of message
(4) Modification of message
(5) Man-in-middle
(6) Brute force attack
(7) Password cracking
By using any of the above-mentioned methods an user can enter into others message and can
create problem related to the secrecy of the message. The intension of the user may be viewing
the message without making many changes to the hacked message.
Normally in banking system the people used to receive their bank balance-using network. In
this kind of situation any hacker who knows the IP address can get these information about
others account balance.
In some situation people may hack the message and forward it to some unknown person,
which will create confusion between the original sender and the receiver. This will also lead to
the problem related with integrity.
A Secret B
C
Fig. 1.2 Loss of Confidentiality
3.2.Authenticity:
This can be defined as an identity for a user to assure that the message is coming from the
right person. This is also an another important issue along with confidentiality which may lead to
the further security threats. This can be assured by any of the following factors:
(1) Something you have (like tokens, credit card, passport etc).
(2) Something you know (like PIN numbers, account number etc).
(3) Something you are (like fingerprints, signatures etc).
Generally with the computer system passwords are the very simple authentication
mechanism, which help the system to authenticate a particular person. The people can use one-
time passwords and key technology to assure authenticity during message transaction.
Various issues related to authenticity includes.
(1) Stealing password
(2) Fake login screen
(3) Information leakage Etc.
A I am User A B
A B
USER1 RW - W
USER2 O RW W
USER3 - OR OW
The attacks related to authenticity and availability can also create the problem related with
access control.
Attacks related to access control are as follows:
(1) Intrusion
(2) DDOS
(3) Interference
(4) Inference Etc.
The issues related with authenticity can be resolved by using hash algorithms.
3.5.Non-repudiability:
This is another issue, which is related with authenticity and integrity. Repudiability means
refusing. This is an issue, which is actually created by the sender who is participating in the
transaction. After sending a message a sender can refuse that he was not sending that message.
This is done intentionally to create problems at the receiver’s side, which creates confusion to
the receiver.
This can be done from either side. It may also be from the receiver side. The receiver can
deny after receiving the message that he doesn’t receive any message. Non-repudiation does not
allow the sender of the message to refute the claim of not sending that message.
The non-repudiability related issues can happen in any of the following three ways.
(1) Proof of origin
(2) Proof of receipt
(3) Proof of content
This can be assured by using digital signatures along with the hash algorithms. If the proper
authenticity and integrity is achieved then the problems related with non-repudiability can be
minimized. All above-mentioned issues are the basic issues of network security. Apart from
these various other threats like natural disasters, attacks, software modifications are also creating
problems with networks. But majority of the attacks are coming under the basic issues of the
network.
Ideal Route of the Message
A B
Interception
Dos Hardware (Theft)
Fabrication
(Substitution)
Fig. 1.6
Software:
Interruption
(Deletion)
Fabrication
Fig. 1.7
Data:
Interruption (Loss) Interception
Data Fabrication
Modification
Fig. 1.8
Generally the security issues can be classified into the following categories.
(1) Confidentiality
(2) Authenticity
(3) Availability
(4) Auditability
(5) Access Control
(6) Integrity
(7) Non-repudiability
Security
Fig. 1.9
These three are the basic levels of issues, which will lead to the further loopholes.
4. ATTACKS:
In the cryptographic literature, there are two types of attacker Passive and Active.
The first is a passive adversary, who can eavesdrop on all network communication, with the
goal learning as much confidential information as possible.
The other is an active intruder, who can
Modify messages at will,
Introduce packets into the message stream, or
Delete messages.
Attacks
Interception
Reading the
Traffic Analysis
message content
Alice Bob
(telnet client) (telnet server)
Mallet
(Active inbuder) Fig. 2.7 Active attack
The following are examples of different attacks this person could impose.
Inserting his own data into the data stream.
Playback of data from another connection.
Playback of data that had previously been sent in the same and opposite direction on
the same connection.
Deletion of data.
Man-in-the-middle attack: In this attack, the intruder sits in the middle of the
communication link, intercepting messages and substituting them with his own messages. In
this way, he tries to fool the parties to believe they are talking to each other directly, while
they really are talking to the attacker him-selves.
4.2.Passive Attacks:
A passive attack on a cryptosystem is one in which the cryptanalyst cannot interact with any
of the parties involved, attempting to break the system solely based upon observed data (i.e. the
cipher text). This can also include known plaintext attacks where both the plaintext and its
corresponding cipher text are known.
The passive attacks can take place in the following ways:
(1) Eavesdropping: the unauthorized capture of transmitted data either by some form of line
tapping or from the compromising emanations broadcast by the electrical signals in the line.
Radio, optical and microwave signals can be similarly intercepted covertly.
Alice Bob
(telnet client) (telnet server)
Eve
(passive cavesdropper)
5.3.Close-in Attack
A close-in attack involves someone attempting to get physically close to network components,
data, and systems in order to learn more about a network Close-in attacks consist of regular
individuals attaining close physical proximity to networks, systems, or facilities for the purpose
of modifying, gathering, or denying access to information. Close physical proximity is achieved
through surreptitious entry into the network, open access, or both.
5.4.Social Engineering:
One popular form of close in attack is social engineering in a social engineering attack, the
attacker compromises the network or system through social interaction with a person, through an
e-mail message or phone. Various tricks can be used by the individual to revealing information
about the security of company. The information that the victim reveals to the hacker would most
likely be used in a subsequent attack to gain unauthorized access to a system or network.
5.5.Phishing Attack
In phishing attack the hacker creates a fake web site that looks exactly like a popular site such as
the SBI bank or PayPal. The phishing part of the attack is that the hacker then sends an e-mail
message trying to trick the user into clicking a link that leads to the fake site. When the user
attempts to log on with their account information, the hacker records the username and password
and then tries that information on the real site.
5.6.Hijack attack
Hijack attack In a hijack attack, a hacker takes over a session between you and another
individual and disconnects the other individual from the communication. You still believe that
you are talking to the original party and may send private information to the hacker by accident.
5.7.Spoof attack
Spoof attack In a spoof attack, the hacker modifies the source address of the packets he or she is
sending so that they appear to be coming from someone else. This may be an attempt to bypass
your firewall rules.
5.8.Buffer overflow
Buffer overflow A buffer overflow attack is when the attacker sends more data to an application
than is expected. A buffer overflow attack usually results in the attacker gaining administrative
access to the system in commend prompt or shell.
5.9.Exploit attack
Exploit attack In this type of attack, the attacker knows of a security problem within an operating
system or a piece of software and leverages that knowledge by exploiting the vulnerability.
3. Playfair
4. Hill cipher
7. Steganography
1.1. Cryptography:
Plain text A B C D E F G H I J K L M N
Cipher D E F G H I J K L M N O P Q
Text
Plain text O P Q R S T U V W X Y Z
Cipher Text R S T U V W X Y Z A B C
Caesar Cipher is very simple. But this simplicity comes with a cost. Obviously it is a very
weak scheme.
Algorithm to break Caesar Cipher:
(1) Read each alphabet in the cipher text message, and search for it in the second row of the
figure above
(2) When a match is found, replace that alphabet in the cipher text message with the
corresponding alphabet in the same column but the first row of the table (e.g. if the alphabet
in cipher text is J, replace it with G).
(3) Repeat the process for all alphabets in the cipher text message.
The process shown above will reveal the original plain text. Thus, given a cipher text message
L ORYH BRX, it is easy to work backwards and obtain the plain text I LOVE YOU as shown
below.
Cipher text L O R Y H B R X
Plain text I L O V E Y O U
Caesar Cipher is good in theory, but not so good in practice.
Let Ke be the encryption key and Kd be the decryption key. Here we have assumed that the
value of Ke = 3 and thus Kd would also be 3,
Let us now try and complicate the Caesar Cipher to make an attacker's life difficult.
(2) Modified Version of Caesar Cipher:
How can we generalize Caesar Cipher a bit more? Let us assume that the cipher text alphabets
corresponding to the original plain text alphabets may not necessarily be three places down the
order, but instead, can be any places down the order. This can complicate matters a bit.
Thus, we are now saying that D would not necessarily replace an alphabet A in plain text. It
can be replaced by any valid alphabet, i.e. by E or by F or by G, and so on. Once the replacement
scheme is decided, it would be constant and will be used for all other alphabets in that message.
As we know, the English language contains 26 alphabets. Thus, an alphabet A can be replaced
by any other alphabet in the English alphabet set, (i.e. B through Z). Of course, it does not make
sense to replace an alphabet by itself (i.e. replacing A with A). Thus, for each alphabet, we have
25 possibilities of replacement. Hence, to break a message in the modified version of Caesar
Cipher, our earlier algorithm would not work.
Let us write a new algorithm to break this version of Caesar Cipher, as shown:
(1) Let k be a number equal to 1.
(2) Read the complete cipher text message.
(3) Replace each alphabet in the cipher text message with an alphabet that is k positions down
the order.
(4) Increment k by 1.
(5) If k is less than 26, then go to step 2. Otherwise, stop the process. 6. The original text
message corresponding to the cipher text message is one of the 25 possibilities produced by
the above steps.
We write down all the 25 possibilities and try to make sense. Whichever makes some sense
we keep and the other 24 are rejected. Trying out all possibilities is called Brute-Force Attack.
(3) Mono-alphabetic Cipher:
The major weakness of the Caesar Cipher is its predictability. Once we decide to replace an
alphabet in a plain text message with an alphabet that is k positions up or down the order, we
replace all other alphabets in the plain text message with the same technique. Thus, the
cryptanalyst has to tryout a maximum of 25 possible attacks, and she is assured of a success.
Now imagine that rather than using a uniform scheme for all the alphabets in a given plain
text message, we decide to use random substitution. This means that in a given plain text
message, each A can be replaced by any other alphabet (B through Z), each B can also be
replaced by any other random alphabet (A or C through Z), and so on. The crucial difference
being, there is no relation between the replacement of B and replacement of A. That is, if we
have decided to replace each A with D, we need not necessarily replace each B with E-we can
replace each B with any other character I
To put it mathematically, we can now have any permutation or combination of the 26
alphabets, which means (26 x 25 x 24 x 23 x ... 2) or 4 x 1026 possibilities I This is extremely
hard to crack. It might actually take years to tryout these many combinations even with the most
modern computers.
(4) Homophonic Substitution Cipher:
The Homophonic Substitution Cipher is very similar to Mono Alphabetic Cipher. In a plain
substitution cipher technique, we replace one alphabet with another, but in this scheme, the
difference is that instead of having a fixed substitution, we can, choose the alphabet from a set.
So in this technique, A can be replaced by D, H, P, R; B can be replaced by E, I, Q, S etc.
Homophonic Substitution Cipher also involved substitution of one plain text character with a
Cipher Text character at a time. However the cipher text character can be any one of the chosen
sets.
(5) Polygram Substitution Cipher:
In Polygram Substitution Cipher technique, rather than replacing one plain text alphabet with
one cipher text alphabet at a time, a block of alphabets is replaced with another block. For
instance, HELLO could be replaced with YUQQW, but a totally different cipher text block
TEUL could replace HELL
(6) Poly-alphabetic Substitution Cipher:
This cipher uses multiple one-character keys. Each of the keys encrypts one plain text
character. The first key encrypts the first plain text character; the second key encrypts the second
plain text character, and so on. After al the keys are used, they are recycled. Thus if we have 30
one letter keys, every 30th character in the plain text would be replaced with the same key. This
number is called as the period of the cipher.
In some cases, the mono alphabetic cipher technique is used round after round over already
converted plain text and its cipher text. The more number of rounds, the more complex the
cipher becomes.
2.2. Transposition technique:
It is the modified version of substitution technique because this not only substitutes letters
but also makes some sort of permutation over the plain text in order to generate cipher text.
Specific examples include
(a) Rail fence technique.
(b) Simple columnar transposition.
(c) Simple columnar transposition with multiple rounds.
(d) Vernam cipher,
(e) Book cipher etc.
Now let us study them (Transposition Technique) one by one:
(1) Rail Fence Technique:
It uses a simple algorithm as:
(a) Write down the plain text message as a sequence of diagonals.
(b) Read the plain text written in step 1 as a sequence of rows.
Example: Original Plain text message: “Come home tomorrow”.
(1) After we arrange the plain text diagonally, it would like as follows:
C M H M T M R O
O E O E O O R W
(2) Now read the text row by row, write it sequentially. Thus we have:
C-M-H-M-T-M-R-O-O-E-O-E-O-O-R-W
(2) Simple Columnar Transposition Technique:
Basic Technique:
The idea is to:
(a) Write the plain text message row by row in a rectangle of a pre-defined size.
(b) Read the message column-by column, however, it need not be in the order of columns 1, 2,
3 etc. It can be any random order such as 2, 1, 3 etc.
(c) The message thus obtained is the cipher text message.
Original Plain Text Message:
Secrets have to be kept:
(1) Let us consider a rectangle with S columns. Therefore, when we write the message into
the rectangle row by row it would look as follows:
C O M E H O
M E T O M O
R R O W
3. PLAYFAIR CIPHER:
The Playfair algorithm is based on the use of a 5 x 5 matrix of letters constructed using a
keyword..
1. Repeating plaintext letters that are in the same pair are separated with a filler letter,
such as x, so that balloon would be treated as ba lx lo on.
2. Two plaintext letters that fall in the same row of the matrix are each replaced by the
letter to the right, with the first element of the row circularly following the last. For
example, ar is encrypted as RM.
3. Two plaintext letters that fall in the same column are each replaced by the letter
beneath, with the top element of the column circularly following the last. For example,
mu is encrypted as CM.
4. Otherwise, each plaintext letter in a pair is replaced by the letter that lies in its own
row and the column occupied by the other plaintext letter. Thus, hsbecomes BP and ea
becomes IM (or JM, as the encipherer wishes)
Polyalphabetic cipher:
As we pointed out above the Hill Cipher is a block cipher. Here is how it works in general. After
we discuss the general process we will look at an example.
1. Find an n n matrix E that is invertible modulo 26. This is actually the encryption
key.
2. Take the message that is to be sent (the plaintext), remove all of the spaces and
punctuation symbols, and convert the letters into all uppercase.
3. Convert each character to a number between 0 and 25. The usual way to do this is
A = 0, B = 1, C = 2, . . . , Z = 25.
A B C D E F G H I J K L M
0 1 2 3 4 5 6 7 8 9 10 11 12
N O P Q R S T U V W X Y Z
13 14 15 16 17 18 19 20 21 22 23 24 25
As a historical note, Lester Hill did not use this coding of letters to numbers, he simply
mixed up the order. Mixing up the order does not make the method more secure, it
simply combines the Hill cipher with a simple substitution cipher, which are easy to
break.
5. Write each block as a column vector of size n. At this point the message is a sequence
of n-dimensional vectors, v1; v2; : : : ; vt.
6. Take each of the vectors and multiply them by the encryption matrix E, so
Ev1= w1
Ev2= w2
Ev3= w3
.
..
Evt =wt
7. Take the vectors w1; w2; : : : ; wt, write the entries of the vectors in order, convert the
numbers back to characters and you have your cipher text.
One note about this algorithm is that we can do step 6 with a single matrix multiplication. If
we let the message matrix M be the matrix produced by having the vectors v1; v2; : : : ; vt as
columns, that is, M = [v1 v2 : : : vt] then EM = [w1 w2 : : : wt] = C would be our cipher text
matrix.
Example 7: Say Alice wants to send Bob the message \Cryptography is cool!"
1. Alice chooses the block size n = 3 and chooses the encryption matrix E to be,
2 3
2 3 15
5 8 12
E = 4 1 13 4 5
Since det (E) (mod 26) = 11, and 11 is invertible modulo 26, the matrix E is also invertible
modulo 26.
2. The message that is to be sent is \Cryptography is cool!", removing the spaces and
punctuation symbols, and convert the letters into all uppercase gives
CRYPTOGRAPHYISCOOL
2 17 24 15 19 14 6 17 0 15 7 24 8 18 2 14 14 11
M=2 2 15 6 15 8 14 3
17 19 17 7 18 14
4 24 14 0 24 2 11 5
6. Multiply by the encryption matrix E,
2 3 15 2 15 6 15 8 14 25 11 11 21 22 1
EM = 2 5 8 12 3 2 17 19 17 7 18 14 3 = 2 18 5 10 3 0 2 3 =C
4 1 13 4 5 4 24 14 0 24 2 11 5 4 7 6 19 20 16 6 5
25 18 7 11 5 6 11 10 19 21 3 20 22 0 16 1 2 6
ZSHLFGLKTVDUWAQBCG
Since this is a symmetric cipher, Alice and Bob would have to share this key with each other.
They obviously could not simply call or text each other with this information since Eve could
easily intercept that call or text and would know the key. So either Alice or Bob would have to
meet in person, in a secure location, and exchange the key or they would need some other trusted
person to deliver the key from Alice to Bob. This diffculty in exchanging the key securely gave
rise to the creation of public-key systems which are commonly used today, for more information
on public-key systems please see the references [5] and [7].
Now that Bob has the encrypted message and the encryption key he can decrypt the message that
Alice had sent to him. The decryption algorithm is essentially the same as the encryption
1
algorithm, except that we use E in place of E. Since EM = C, and E is invertible we can
calculate M = E 1C. We will call D = E 1 the decryption matrix, so DC = M. Remember that this
inverse is the inverse modulo 26.
The Hill Cipher Decryption Algorithm
3. Calculate DC = M.
4. Convert the matrix M to the plaintext message. You may need to insert the appropriate
spaces and punctuation symbols since these were removed.
1. He calculates
2 3 15 1 10 19 16
2 5 8 12 3 (mod 26) = 2 4 23 7 3
4 1 13 4 5 4 17 5 19 5
2. He also converts the ciphertext to the matrix C.
ZSHLFGLKTVDUWAQBCG
25 18 7 11 5 6 11 10 19 21 3 20 22 0 16 1 2 6
47 6 19 20 16 6 5
3. Calculate DC = M.
10 19 16 25 11 11 21 22 1 2 15 6 15 8 14
DC = 2 4 23 7 3 2 18 5 10 3 0 2 3 = 2 17 19 17 7 18 14 3 = M
4 17 5 19 5 4 7 6 19 20 16 6 5 4 24 14 0 24 2 11 5
4. Convert the matrix M to the plaintext message.
2 17 24 15 19 14 6 17 0 15 7 24 8 18 2 14 14 11
CRYPTOGRAPHYISCOOL
Fig.5.11
Cryptography is also called as an art or technique to achieve secure communication between
the communicating parties by encoding the messages between them such that no third party can
gain anything useful out of interception.
Various techniques are utilized for this purpose of cryptography. Broadly these techniques
fall into two categories.
(1) Symmetric key cryptography: In which the 'key' element used, is the 'same' for both
encryption as well as decryption and
(2) Asymmetric key cryptography: In which the 'key' element used, is different for both
encryption as well as decryption.
(a) Symmetric key cryptography is also known as 'private or secret key cryptography'
Whereas
(b) Asymmetric key cryptography is also known as 'public key cryptography'
Recall that there are two basic types of encryption:
Symmetric algorithms: (also called “secret key”) use the same key for both encryption and
decryption;
Asymmetric algorithms: (also called “public key”) use different keys for encryption and
decryption.
For any encryption approach, there are two major challenges:
Key distribution: how do we convey keys to those who need them to establish secure
communication?
Key management: given a large number of keys, how do we preserve their safety and make
them available as needed.
Symmetric
1) Alice and Bob agree on a cryptosystem
2) Alice and Bob agree on a key
3) Alice takes her plaintext message and encrypts it using the encryption algorithm and the
key. This creates a ciphertext message
4) Alice sends the ciphertext message to Bob
5) Bob decrypts the ciphertext message with the same algorithm and key and reads it.
Asymmetric
1) Alice and Bob agree on a public-key cryptosystem
2) Bob sends Alice his public key
3) Alice encrypts her message using Bob’s public key and sends it to Bob
4) Bob decrypts Alice’s message using his private key
Problems:
Symmetric
• Keys must be distributed in secret
• If a key is compromised, Eve (eavesdropper) can
decrypt any message
pretend to be one of the parties
• A network requires a great number of keys
Asymmetric
• slow (~1000 times slower than the symmetric)
• vulnerable to chosen-plaintext attacks
Unit III
1. Overview of Symmetic key cryptography
4. DES,RC4
Fig. 5.12
In symmetric-key cryptography, the same key is used by the sender (for encryption) and the
receiver (for decryption). The key is shared.
In symmetric-key cryptography, the algorithm used for decryption is the inverse of the
algorithm used for encryption. This means that if the encryption algorithm uses a combination of
addition and multiplication, the decryption algorithm uses a combination of division and
subtraction.
Note that the symmetric-key cryptography algorithms are so named because the same key can
be used in both directions.
In symmetric-key cryptography, the same key is used in both directions.
Symmetric-key algorithms are efficient; it takes less time to encrypt a message using a
symmetric-key algorithm than it takes to encrypt using a public-key algorithm. The reason is that
the key is usually smaller. For this reason, symmetric-key algorithms are used to encrypt and
decrypt long messages.
1.4. Symmetric-key Cryptography is Often Used for Long Messages:
Disadvantages of symmetric key:
A symmetric-key algorithm has two major disadvantages.
(1) Each pair of users must have a unique symmetric key.
This means that if N people in the world want to use this method, there needs to be N(N -
1)/2 symmetric keys.
For example, for 1 thousand people to communicate, 1000 * 999 /2 = 4, 99, 500 (4 lakhs
99 thousand and five hundred symmetric keys are needed. The distribution of the keys
between two parties can be difficult.
(2) The sender needs to exchange the key to the receiver. It may be hijacked in between!
1.5. SYMMETRIC- KEY CRYPTOGRAPHY:
We can divide all the cryptography algorithms in the world into two groups: symmetric-key
(sometimes called secret-key) cryptography algorithms and public-key (sometimes called
asymmetric) cryptography algorithms.
In symmetric-key cryptography, the same key is used by both parties. The sender uses this
key and an encryption algorithm to encrypt data; the receiver uses the same key and the
corresponding decryption algorithm to decrypt the data
Fig. 5.13
In symmetric-key cryptography, the same key is used by the sender (for encryption) and the
receiver (for decryption). The key is shared.
In symmetric-key cryptography, the algorithm used for decryption is the inverse of the
algorithm used for encryption. This means that if the encryption algorithm uses a combination of
addition and multiplication, the decryption algorithm uses a combination of division and
subtraction.
Note that the symmetric-key cryptography algorithms are so named because the same key can
be used in both directions.
In symmetric-key cryptography, the same key is used in both directions.
Symmetric-key algorithms are efficient; it takes less time to encrypt a message using a
symmetric-key algorithm than it takes to encrypt using a public-key algorithm. The reason is that
the key is usually smaller. For this reason, symmetric-key algorithms are used to encrypt and
decrypt long messages.
Symmetric-key Cryptography is Often Used for Long Messages:
Disadvantages of symmetric key:
A symmetric-key algorithm has two major disadvantages.
(3) Each pair of users must have a unique symmetric key.
This means that if N people in the world want to use this method, there needs to be N(N -
1)/2 symmetric keys.
For example, for 1 thousand people to communicate, 1000 * 999 /2 = 4, 99, 500 (4 lakhs
99 thousand and five hundred symmetric keys are needed. The distribution of the keys
between two parties can be difficult.
(4) The sender needs to exchange the key to the receiver. It may be hijacked in between!
IP
LPT RPT
16 Rounds
FP
Cipher Text
Fig. 5.14
Explanation of the Algorithm:
IP – Initial Permutation:
Comparing the IP table performs IP. It happens only once, and it happens before the first
round. It suggests how the transposition in IP should proceed, as shown in the IP table.
After this IP, 64 bit plain text is divided into 2 halves normal LPT and RPT, 08 32 bits each.
In the rounds, step 1 is key transformation.
That is achieved by:
(a) Shifting the key position by considering the Round Table.
(b) Compare the Compression Table to get the sub key of 48 bits.
Step 2: is Expansion Permutation (EP):
In this step, the 32-bit RPT is expanded to 48 bits as it of key length. The process is shown as
under:
The 32-bit text is divided into 8 blocks of 4 bits each. Then by adding 2 bits extra, that is the
first bit of the block 1 is the last bit of the block 8 and the last bit of the block 8 is the first bit of
the 7th block the 48-bit text is obtained.
Diagram for the same is as below:
1 2 3 4 5 6 7 8 29 30 31 32
1 2 3 4 5 6 7 8 9 10 11 12 43 44 45 46 47 48
Output Block 1 (6 bits) Output Block 2 (6 bits) Output Block 8 (6 bits)
Fig. 5.15
After this expansion it will be compared with the Expansion Permutation Table.
Step 3: in Round is S-Box Substitution:
(1) This step reduces 48 bits RPT into 32 bits because LPT is of 32 bits.
(2) It accepts 48 bits, does some XOR logic and gives 32 bits.
(a) The 48 bits key (Result of Step 1) and the 48 bits of RPT (Result of Step 2) will be
XOR and the output will be 48 bits Input block and that will be given as the input for
the S-Box Substitution.
(b) The 48-bit block text will be divided into 8 blocks of 6 bits each.
(c) Decimal equivalent of the first and last bit in a block denotes the row number and
decimal equivalent of the bit 2, 3, 4 and 5 denotes the column number of the S-Box
Substitution table.
(d) Check the value and take the binary equivalent of the number.
(e) The result is 4-bit binary number.
1 0 0 1 0 1
Fig. 5.16
(f) For example if the 6-bit number is 100101 then the first and last bit is 11 and the
decimal equivalent of the number is 3. The remaining bits are 0010 and the decimal
equivalent of the number is 2. If it is the first block of input, then check the 3rd row 2nd
column value in the Sbox-1 substitution table. It is given as 1 in the table. Binary
equivalent of 1 is 0001.
(g) The input 100101 of 6-bit is now reduced to 0001 after S-Box Substitution.
2 8 24 14 32 27 3 9 19 13 30 6 22 11 4 25
For example, a 16 in the first block indicates that the bit at position 16 moves to bit at position
1 in the output.
Step 5: is XOR and Swap:
The untouched LPT, which is of 32 bits, is XORed with the resultant RPT that is with the
output produced by P-Box permutation. The result of this XOR operation becomes the new right
half. The old right half becomes the new left half in the process of swapping. This is shown
below.
32 bit Left Plain Text Block 32 bit Right Plain Text Block
XOR
32 bit Left Plain Text Block 32 bit Right Plain Text Block
Next Round
Fig. 5.17
Final Permutation (FP):
At the end of 16 rounds, the Final Permutation is performed only once. This is a simple
transposition based on the Final Permutation Table.
The output of the Final permutation is the 64-bit encrypted block.
P1 P2 P3 P4
K1
Round 1
K6
K7
Round 2
K12
K13
Round 3
K18
a
K49
Output Transformation (4 sub key)
K52
16 bits of
C1 C2 C3 C4
cipher text
Fig. 5.18
Details of first round in IDEA:
The initial key consists of 128 bits from which 6 sub-keys k1 to k6 are generated for the first
round.
Since k1 to k6 consists of 16 bits each, out of original 128 bits, the first 96 bits (6 sub keys
16 bits per sub-key) are used for the first round. Thus, at the end of the first round, bits 97-128 of
the original key are unused.
Details of second round in IDEA:
In 2nd round 31 unused bits are used. For second round we still require (96-31 = 65) more
bits. But the original key 128 bits are exhausted.
Now IDEA uses the techniques of key shifting. At this stage the original key is shifted left
circularly by 25 bits that is, the 26th bit of the original key moves to the first position and
becomes the first bit after the shift, and the 25th bit of the original key moves to the last position
and becomes the 128th bit after the shift.
Details of one round in IDEA:
(1) Multiply P1 and k1.
(2) Add P2 and k2.
(3) Add P3 and k3.
(4) Multiply P4 and k4
(5) XOR results of step 1 and step 3.
(6) XOR results of step 2 and step 4.
(7) Multiply steps 5 and k5.
(8) Add step 6 and step 7.
(9) Multiply the result of step 8 and k6.
(10) Add step 7 and step 9.
(11) XOR the results of step 1 and step 9.
(12) XOR the results of step 3 and step 9.
(13) XOR the results of step 2 and step 10.
(14) XOR the results of step 4 and step 10.
Details of output Transformation:
(1) The output transformation is a one-time operation. It takes place at the end of 8th round.
(2) It is 64 bit value divided into 4 sub-blocks (say R1 to R4 each consisting of 16 bits).
Step 1: Multiply R1 and k49.
Step 2: Add R2 and k50.
Step 3: Add R3 and k51.
Step 4: Multiply R4 and k52.
R1 R2 R3 R4
C1 C2 C3 C4
Fig. 5.19
A Symmetric Cryptosystems Comparison Table
Cipher Security Speed (486 pc) Key length
DES low 400 kb/s 56 bits
Triple DES good 150 kb/s 112 bits
IDEA good* 200 kb/s 128 bits
Triple IDEA very good* ~100 kb/s 256 bits
* The algorithm is believed to be strong
3. RC4
Mix Columns:
each column is processed separately
each byte is replaced by a value dependent on all 4 bytes in the column
effectively a matrix multiplication in GF(28) using prime poly m(x) =x8+x4+x3+x+1
to derive each new byte in col
decryption requires use of inverse matrix
with larger coefficients, hence a little harder
have an alternate characterization
each column a 4-term polynomial
with coefficients in GF (28)
and polynomials multiplied modulo (x4+1)
Lastly is the Add Round Key stage which is a simple bitwise XOR of the current block with a
portion of the expanded key. Note this is the only step which makes use of the key and obscures
the result, hence MUST be used at start and end of each round, since otherwise could undo effect
of other steps. But the other steps provide confusion/diffusion/non-linearity. That us you can
look at the cipher as a series of XOR with key then scramble/permute block repeated. This is
efficient and highly secure it is believed.
AES Round:
takes 128-bit (16-byte) key and expands into array of 44/52/60 32-bit words
start by copying key into first 4 words
then loop creating words that depend on values in previous & 4 places back
in 3 of 4 cases just XOR these together
1st word in 4 has rotate + S-box + XOR round constant on previous, before XOR 4th
back
The first block of the AES Key Expansion is shown here in Figure. It shows each group of 4
bytes in the key being assigned to the first 4 words, then the calculation of the next 4 words
based on the values of the previous 4 words, which is repeated enough times to create all the
necessary subkey information.
3. Algorithm types and modes:
3.1. Modes of Operation:
block ciphers encrypt fixed size blocks
eg. DES encrypts 64-bit blocks with 56-bit key
need some way to en/decrypt arbitrary amounts of data in practise
ANSI X3.106-1983 Modes of Use (now FIPS 81)defines 4 possible modes
subsequently 5 defined for AES & DES
have block and stream modes
3.1.1. Electronic Codebook Book (ECB):
message is broken into independent blocks which are encrypted
each block is a value which is substituted, like a codebook, hence name
each block is encoded independently of the other blocks Ci =
DESK1(Pi)
uses: secure transmission of single values
Advantages and Limitations of ECB:
message repetitions may show in ciphertext
if aligned with message block
particularly with data such graphics
or with messages that change very little, which become a code-book analysis
problem
weakness is due to the encrypted message blocks being independent
main use is sending a few blocks of data
Oi = DESK1(i)
uses: high-speed network encryptions
RC4 is a stream cipher designed in 1987 by Ron Rivest for RSA Security. It is a variable key-
size stream cipher with byte-oriented operations. The algorithm is based on the use of a random
permutation. Analysis shows that the period of the cipher is overwhelmingly likely to be greater
than 10100 [ROBS95]. Eight to sixteen machine operations are required per output byte, and the
cipher can be expected to run very quickly in software. RC4 was kept as a trade secret by RSA
Security. In September 1994, the RC4 algorithm was anonymously posted on the Internet on the
Cypherpunks anonymous remailers list.
The RC4 algorithm is remarkably simply and quite easy to explain. A variable-length key
of from 1 to 256 bytes (8 to 2048 bits) is used to initialize a 256-byte state vector S, with
elements S[0], S[1], …, S[255]. At all times, S contains a permutation of all 8-bit numbers from
0 through 255. For encryption and decryption, a byte k (see Figure 1) is generated from S by
selecting one of the 255 entries in a systematic fashion. As each value of k is generated, the
entries in S are once again permuted.
Initialization of S:
To begin, the entries of S are set equal to the values from 0 through 255 in ascending order; that
is; S[0] = 0, S[1] = 1, …, S[255] = 255. A temporary vector, T, is also created. If the length of
the key K is 256 bytes, then K is transferred to T. Otherwise, for a key of length keylen bytes, the
first keylen elements of T are copied from K and then K is repeated as many times as necessary
to fill out T. These preliminary operations can be summarized as follows:
/* Initialization */
for i = 0 to 255 do
S[i] = i;
T[i] = K[imodkeylen];
Next we use T to produce the initial permutation of S. This involves starting with S[0]
and going through to S[255], and, for each S[i], swapping S[i] with another byte in S according
to a scheme dictated by T[i]:
/* Initial Permutation of S
*/ j = 0;
fori = 0 to 255 do
Because the only operation on S is a swap, the only effect is a permutation. S still
contains all the numbers from 0 through 255.
Stream Generation
Once the S vector is initialized, the input key is no longer used. Stream generation involves
starting with S[0] and going through to S[255], and, for each S[i], swapping S[i] with another
byte in S according to a scheme dictated by the current configuration of S. After S[255] is
reached, the process continues, starting over again at S[0]:
/* Stream Generation
*/ i, j = 0;
while(true)
i = (i + 1) mod 256;
j = (j + S[i])
mod 256;
Swap (S[i],
S[j]);
t = (S[i] + S[j])
mod 256; k =
S[t];
To encrypt, XOR the value k with the next byte of plaintext. To decrypt, XOR the
value k with the next byte of ciphertext.
Strength of RC4
A number of papers have been published analyzing methods of attacking RC4.. None of
these approaches is practical against RC4 with a reasonable key length, such as 128 bits.
A more serious problem is reported in [FLUH01]. The authors demonstrate that the WEP
protocol, intended to provide confidentiality on 802.11 wireless LAN networks, is
vulnerable to a particular attach approach. In essence, the problem is not with RC4 itself
but the way in which keys are generated for use as input to RC4. This particular problem
does not appear to be applicable to other applications using RC4 and can be remedied in
WEP by changing the way in which keys are generated. This problem points out the
difficulty in designing a secure system that involves both cryptographic functions and
protocols that make use of them.
UNIT V:
1. Asymmetric Key
Algorithms
2. Digital Signatures
3. Brief history of
Asymmetric Key
Cryptography
4. Overview of
Asymmetric Key
Cryptography
5. RSA algorithm
Fig.5.20
The Sender’s Side:
Modus Operandi – Digital Signature:
After the digest has been created, it is encrypted (signed) using the sender's private
key. The encrypted digest is attached to the original message and sent to the receiver.
Figure (on previous page) shows the sender site.
Fig.5.21
The Receiver’s Side:
The receiver receives the original message and the encrypted digest. He separates the
two. He applies the same hash function to the message to create a second digest. He also
decrypts the received digest, using the public key of the sender. If the two digests are the
same, all three-security measures are preserved. Figure 30.7 shows the receiver site.
2.3.Properties of Digital Signature:
(1) Digital signature does not provide privacy. If there is a need for privacy, another
layer of encryption/decryption must be applied.
(2) Digital signatures can provide:
(a) Integrity,
(b) Authentication, and
(c) Non-repudiation.
(i) Integrity: The integrity of a message is preserved because if Eve
intercepted the message and partially or totally changed it, the decrypted
message would be unreadable.
(ii) Authentication: We can use the following reasoning to show how a
message can be authenticated. If Eve sends a message while pretending that
it is coming from Alice, she must use her own private key for encryption.
The message is then decrypted with the public key of Alice and will
therefore be nonreadable. Encryption with Eve's private key and decryption
with Alice's public key result in garbage.
(iii) Non-repudiation: Digital signature also provides for non-repudiation. Bob
saves the message received from Alice. If Alice later denies sending the
message, Bob can show that encrypting and decrypting the saved message
with Alice's private and public key can create a duplicate of the saved
message. Since only Alice knows her private key, she cannot deny sending
the message.
Digital
Signature
Sender’s
Private Key
Encrypt Hash
Message + Massage Encrypted
Receivers
Signature with Public Key Message Secret Key
COMPARE
of the Receive
Hash
AND
Calculate Signature
with Secret Key Decrypt Message Message +
Compare
with Secret Key Signature
Sender’s
Verify Signature
CONTRAST
Secret Sender’s Kay
Generator with Public Key
Key Sender’s Public Key
BETWEEN
SYMMETRIC
CRYPTOGRAPHY AND ASYMMETRIC KEY CRYPTOGRAPHY:
KEY
Sr. Categories Symmetric Key Asymmetric Key
No. Cryptography Cryptography
Key used for Same key is used One key used for
encryption/ for encryption and encryption and
(1) decryption decryption another, different
key is used for
decryption
The above table shows that both symmetric key cryptography and asymmetric key
cryptography have nice features.
Also, both have some areas where better alternatives are generally desired.
Asymmetric key cryptography solves the major problem of key agreement / key
exchange as well as scalability.
However, it is far slower and produces huge chunks of cipher text as compared to
symmetric key Cryptography (essentially because it uses large keys and complex
algorithms as compared to symmetric key cryptography).
How nice it would be, if we can combine the two cryptography mechanisms, so as to
achieve the better of the two, and yet do not compromise on any of the features? More
specifically, we need to ensure that the following objectives are met.
(1) The solution should be completely secure.
(2) The encryption and decryption processes must not take a long time.
(3) The generated cipher text should be compact in size.
(4) The solution should scale to a large number of users easily, without introducing any
additional complications.
(5) The key distribution problem must be solved by the solution.
In practice symmetric key cryptography and asymmetric key cryptography are
combined to have a very efficient security solutions.
2.4.PRETTY GOOD PRIVACY:
The implementation of security at the application layer is more feasible and simpler,
particularly when the Internet communication involves only two parties, as in the case of
email and TELNET. The sender and the receiver can agree to use the same protocol and
to use any type of security services they desire. In this section, we discuss one protocol
used at the application layer to provide security: PGP.
Pretty Good Privacy (PGP) was invented by Phil Zimmermann to provide all four
aspects of security (privacy, integrity, authentication, and non-repudiation) in the sending
of email.
Fig.5.22
PGP uses digital signature (a combination of hashing and public-key encryption) to
provide integrity, authentication, and non-repudiation. It uses a combination of secret-key
and public-key encryption to provide privacy. Specifically, it uses one hash function, one
secret key, and two private-public key pairs.
The figure shows how PGP creates secure email at the sender site. The email message
is hashed to create a digest. The digest is encrypted (signed) using Alice's private key.
The message and the digest are encrypted using the one-time secret key created by Alice.
The secret key is encrypted using Bob's public key and is sent together with the encrypted
combination of message and digest.
Figure below shows how PGP uses hashing and a combination of three keys to extract
the original message at the receiver site. The combination of encrypted secret key and
message plus digest is received. The encrypted secret key first is decrypted (using Bob's
private key) to get the one-time secret key created by Alice. The secret key then is used to
decrypt the combination of the message plus digest.
PRETTY GOOD PRIVACY:
The implementation of security at the application layer is more feasible and simpler,
particularly when the Internet communication involves only two parties, as in the case of
email and TELNET. The sender and the receiver can agree to use the same protocol and
to use any type of security services they desire. In this section, we discuss one protocol
used at the application layer to provide security: PGP.
2.5.LONGITUDINAL REDUNDANCY CHECK / CYCLIC REDUNDANCY
CHECK (LRC / CRC):
A message digest us a finger print or the summary of a message. It is similar to the
concepts of LRC and CRC which us sued to verify the integrity of the data (i.e. to ensure
that a message has not bus tampered before it reaches to the receivers). Let us understand
this concept with the help of LRC example:
(1) A block of bits is organised in the form of a list (as rows in the LRC. consider if we
want to send 32 bits, we arrange them into a list as four (horizontal) rours. Then we
count how many 1 bits occur in each of the 8 (vertical columns). [If the no. of 1’s in
the column is odd then we say that the column has odd parity (indicated by a 1 bit in
the shaded LRC row); otherwise if the no. of 1s in the columns is even, we call it as
even parity (indicated by 0 bit in the shaded LRC row).]
(2) For instance in the first column, we have two 1’s indicating an even parity and
therefore, we have a 0 in the shaded LRC row for the first column. Similarly, for the
last column, we have 3 1’s indicating an odd parity and therefore we have a 1 in the
shaded LRC row for the last column.
(3) Thus, the parity bit for each column in calculated and a new row of eight parity bits
is created. These becomes the parity bits or the whole blocks. Thus, the LRC is
actually a finger print of the original message.
(4) The data along with the LRC is then sent to the receiver. The receiver separates the
data block from the LRC block. It performs its own LRC on the data block alone. It
then compares its LRC values with the ones received from the sender. If the two
LRC values match, then the receiver has a reasonable confidence that the message
sent by the sender has not been changed, while in transit.
Original Data
111 00 100 11 011 101 00 111 001 001 010 01 00 101 001
1 1 1 0 10 0
1 1 0 1 10 1 Original data
arranged as rows
0 0 1 1 00 1 of a list
0 0 1 1 00 1
LRC
Fig. 5.23
In public-key encryption/decryption, the public key that is used for encryption is
different from the private key that is used for decryption.
The public key is available to the public; the private key is available only to an
individual.
3.1.Public-Key Encryption/Decryption has Two Advantages:
First, it removes the restriction of a shared symmetric key between two entities (e.g.,
persons) that need to communicate with each other. A shared symmetric key is shared by
the two parties and cannot be used when one of them wants to communicate with a third
party. In public-key encryption! Decryption, each entity creates a pair of keys; the private
one is kept, and the public one is distributed. Each entity is independent, and the pair of
keys created can be used to communicate with any other entity.
The second advantage is that the number of keys needed is reduced tremendously.
In this system, for I thousand users to communicate, only 1 thousand pairs of keys i.e.
2000 keys are needed, not 4,99,500, as was the case in symmetric-key cryptography.
3.2.Public-Key Cryptography also has Two Disadvantages:
The big disadvantage is the complexity of the algorithm. If we want the method to be
effective, the algorithm needs large numbers. Calculating the cipher text from plaintext
using the long keys takes a lot of time. That is the main reason that public-key
cryptography is not recommended for large amounts of text.
Public-Key Algorithms are more Efficient for Short Messages:
The second disadvantage of the public-key method is that the association between an
entity and its public key must be verified. If Alice sends her public key via an email to
Bob, then Bob must be sure that the public key really belongs to Alice and nobody else.
One point needs to re-mention that if your private key were made public you would
Get Bankrupted in no time!
4. RSA ALGORITHM:
(1) Generate two large random primes, p and q, of approximately equal size
(2) Calculate N = PXQ
(3) Select the public key that is the encryption key E such that it is not a factor of (p-1)
(q-1).
(4) Select the private key that is the decryption key D such that the following equation is
true: (DXE) mod (P-1) X (Q-1)=1
(5) For encryption, calculate the cipher text CT as CT=PTE mod N.
(6) Send CT as the cipher text to the receiver.
(7) For decryption, calculate the plain text PT as PT=CTD mod N.
A Very Simple Example of RSA Encryption:
This is an extremely simple example using numbers you can work out on a pocket
calculator (those of you over the age of 35 can probably even do it by hand).
(1) Select primes p=11, q=3.
(2) n = pq = 11.3 = 33 phi = (p-1)(q-1) = 10.2 = 20
(3) Choose e=3 Check gcd(e, p-1) = gcd(3, 10) = 1 (i.e. 3 and 10 have no common
factors except 1), and check gcd(e, q-1) = gcd(3, 2) = 1therefore gcd(e, phi) = gcd(e,
(p-1)(q-1)) = gcd(3, 20) = 1
(4) Compute d such that ed = 1 (mod phi) i.e. compute d = e-1 mod phi = 3-1 mod 20 i.e.
find a value for d such that phi divides (ed-1) i.e. find d such that 20 divides 3d-1.
Simple testing (d = 1, 2,...) gives d = 7 Check: ed-1 = 3.7 - 1 = 20, which is divisible
by phi.
(5) Public key = (n, e) = (33, 3) Private key = (n, d) = (33, 7).
This is actually the smallest possible value for the modulus n for which the RSA
algorithm works.
Now say we want to encrypt the message m = 7, c = me mod n = 73 mod 33 = 343 mod
33 = 13. Hence the cipher text c = 13.
To check decryption we compute m' = cd mod n = 137 mod 33 = 7. Note that we don't
have to calculate the full value of 13 to the power 7 here. We can make use of the fact
that a = bc mod n = (b mod n).(c mod n) mod n so we can break down a potentially large
number into its components and combine the results of easier, smaller calculations to
calculate the final value.
7
One-way of calculating m' is as follows: m' = 13 mod 33 = 13(3+3+1) mod 33 =
133.133.13 mod 33 = (133 mod 33). (133 mod 33).(13 mod 33) mod 33 = (2197 mod
33).(2197 mod 33).(13 mod 33) mod 33 = 19.19.13 mod 33 = 4693 mod 33 = 7.
What would happen if your private key were made public?
The answer is in just one word!–
Get Bankrupted!
However rich you were! Now popper!!
The receiver of your private key can, not only withdraw all that you have but also can
also avail credit for banks and enjoy and you keep paying throughout your life!
UNIT VI
1. Knapsack algorithms
2. Elliptic Curve Cryptography
3. ElGamal
1.KNAPSACK PROBLEM:
Given an integer-vector X=(x1,…,xn) and an integer c.
Determine a binary vector B=(b1,…,bn) (if it exists) such thatXBT=c.
Knapsack problem with superincreasing vector – easy
Problem
Given a superincreasing integer-vectorX=(x1,…,xn)
and an integer c,determine a binary vectorB=(b1,…,bn) (if it exists) such that
XBT=c.
Algorithm–
to solve knapsack problems with superincreasing vectors:
fori¬ndownto2do
ifcł 2xithen terminate {no solution}
elseifc>xi thenbi¬ 1; c ¬ c – xi ;
elsebi= 0;
ifc = x1then b1 ¬ 1
elseifc = 0 thenb1 ¬ 0;
else terminate {no solution}
Example:
X=(1,2,4,8,16,32,64,128,256,512)c=999
X=(1,3,5,10,20,41,94,199)c=242
Let a (knapsack) vector
A=(a1,…,an)be given.
Encoding of a (binary) message B=(b1,b2,…,bn) by A is done by the vector/vector
multiplication:
ABT=c
and results in the crypto text c
Decoding of c requires to solve the knapsack problem for the instant given by the
knapsack vector A and the crypto text c.
The problem is that decoding seems to be infeasible.
Example
If A=(74, 82,94, 83, 39, 99, 56, 49, 73, 99)and B =(1100110101) then
ABT=Each knapsack vector A=(a1,…,an)defines an integer valued
Knapsack-function
f A : x | 0 x 2n N
Specified by f A x ai
i th bit in the binary
representation of x is 1
Example A0=(43,129,215,473,903,302,561,1165,697,1523)
fA0(364)=fA0(0101101100)=129+473+903+561+1165=3231
Unambiguity of knapsack systems
For unambiguity of the decryption of the knapsack cryptosystems with knapsack
vector A, it is important that
Example: If A=(17,103,50,81,33), then 131=17+33+81=50+81
S nd therefore for crypto texts:
(131, 33, 100, 234, 33)
SAUNA FAUNA
Two plaintexts are obtained
1.. Choose a superincreasing vector X=(x1,…,xn).
2. Choose m,u such that m>2xn,gcd(m,u)=1.
3. Compute u -1modm,X'=(x1’,…,xn'),xi’=uximod m.
diffusion
confusion
Cryptosystem: X' - public key
X, u,m - trapdoor information
Encryption: of a binary vector w of length n: c = X' w
Decryption: compute c‘ = u-1c mod m
and solve the knapsack problem with X and c'.
Lemma Let X, m, u, X', c, c' be as defined above. Then the knapsack problem
instances (X,c') and (X',c) have at most one solution, and if one of them has a solution,
then the second one has the same solution.
Proof Let X'w=c. Then
c‘ºu-1cºu-1X'wºu-1uXwºXw (mod m).
Since X is superincreasing and m>2xn we have
(X w)mod m=X w
and therefore c‘=Xw.
Example X=(1,2,4,9,18,35,75,151,302,606)
m=1250, u=41
X‘=(41,82,164,369,738,185,575,1191,1132,1096)
In order to encrypt an English plaintext, we first encode its letters by 5-bit
numbers _ - 00000, A - 00001, B - 00010… and then divide the resulting binary strings
into blocks of length 10.
Plaintext: Encoding of AFRICA results in vectors
w1=(0000100110)w2=(1001001001)w3=(0001100001)
Encryption: c1’=X'w1=3061 c2’=X'w2=2081 c3’=X‘w3=2203
Crypto text :( 3061, 2081, 2203)
Decryption of crypto texts: (2163, 2116, 1870, 3599)
By multiplying with u–1=61 (mod 1250) we get new crypto texts (several new c’)
(693,326,320,789)
and in the binary form solutions B of equations XBT=c’ have the form
(1101001001, 0110100010, 0000100010, 1011100101)
That is the resulting plaintext is:
ZIMBABWE
2.ELLIPTIC CURVE CRYPTOGRAPHY:
ECC Encryption/Decryption:
several alternatives, will consider simplest
must first encode any message M as a point on the elliptic curve Pm
select suitable curve & point G as in D-H
each user chooses private key nA<n
and computes public key PA=nAG
to encrypt Pm : Cm={kG, Pm+kPb}, k random
decrypt Cm compute: Pm+kPb–nB(kG) =
Pm+k(nBG)–nB(kG) = Pm
ECC Security:
relies on elliptic curve logarithm problem
fastest method is “Pollard rho method”
compared to factoring, can use much smaller key sizes than with RSA etc
for equivalent key lengths computations are roughly equivalent
hence for similar security ECC offers significant computational advantages
NUMBER THEORY:
Prime Numbers:
prime numbers only have divisors of 1 and self
they cannot be written as a product of other numbers
note: 1 is prime, but is generally not of interest
eg. 2,3,5,7 are prime, 4,6,8,9,10 are not
prime numbers are central to number theory
list of prime number less than 200 is:
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107
109
113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199
Prime Factorisation:
to factor a number n is to write it as a product of other numbers: n=a x b x c
note that factoring a number is relatively hard compared to multiplying the factors
together to generate the number
the prime factorisation of a number n is when its written as a product of primes
3. Elgamal algorithm:
Chapter 7
1. Digital Certificates
2. Public Key Infrastructure
3. Private key management
4. Public Key Infrastructure Standards
1.Digital Certificates:
1.1.KEY DISTRIBUTION:
Every process of encryption and decryption is necessarily associated with a 'key'- the
combination used for encryption and/or decryption, and an algorithm i.e. the rules or
steps used for both encryption and decryption. The requirement of 'same' key as in case
of 'symmetric' key cryptography leads to a common problem called 'problem of key
distribution', i.e. how the two parties should agree upon a 'common' key that has to be
used for the process. This is as described below.
1.2. Problem of Key Distribution in Symmetric Key Cryptography:
As in case of symmetric key cryptography, the key that has to be used for both
encryption and decryption should be the 'same' this leads to a problem that how the two
parties requiring secure communication can 'agree' or 'decide' upon a common key,
without letting any third person know about it? There can be many ways in which the two
parties will try to communicate assuming it is secure, but it may not be so. e.g. even if
they exchange letters, seal envelopes into locked boxes, talk over open media for the
common key, or send the key along with the locked boxes, whatever may be the means
used, it turns out to be practically non-viable or difficult to implement.
That is to say, there are very much chances of intercepting the communication
between two parties if any of these methods are used. This is called the 'problem of key
distribution'.
In order to come out of this problem, one good solution was given by two scientists
jointly known as 'Diffie-Hellman key exchange algorithm'.
1.3. The Diffie-Hellman Key Exchange Algorithm:
Whitefield Diffie and Martin Hellman, in 1976 have come out with a good solution to
the problem of key distribution as mentioned above. The steps of this algorithm are as
given below. (It must be noted, that this is NOT an encryption or decryption algorithm
but is only used for agreeing upon a. symmetric key. Once it is done, some specific
algorithm should be used for the purpose of encryption/decryption.)
Fig. 5.24
Steps for Algorithm:
Assume two parties viz. 'first' and 'second' want to communicate securely.
(1) Let 'first' and 'second' agree upon two large prime nos., say n and g. These need not
be kept secured. (i.e. everyone can know these values.)
(2) 'First’ chooses another large random no. say x to calculate another number A such
that, A = g^xmod n. (Note, value of x is only known to 'first'!)
(3) This no. A is then sent by 'first' to 'second'.
(4) 'Second’ also chooses another large random no. say y to calculate another number B
such that,
(5) B = g^y mod n. (Note, value of y is only known to 'second'!)
(6) This no. B is then sent by 'second' to 'first'.
(7) Now, independently, 'first' calculates the key KI as: KI = B^xmod n
(8) Also, 'second' independently calculates the key K2 as: K2 = A^y mod n
(9) As it should be required here in symmetric key cryptography, KI = K2.
Example:
Let us take an actual example, to illustrate above algorithm. Assuming values such as
n= 11, g=7, x=3 and y=6, we have following equations:
(1) Value of A=7^3mod 11 =343 mod 11 =2.
(2) Value of B = 7^6mod 11 = 117649 mod 11 = 4.
(3) Key KI = 4^3mod 11 = 64 mod 11 = 9.
(4) And, Key K2 = 2^6mod 11 = 64 mod 11 = 9.
(5) Thus, we find that KI = K2.
(6) Hence the algorithm is proved.
1.4. Problems with the Algorithm:
Although, it is seen that this algorithm turns out to be a good solution to the above
mentioned key distribution problem, still it does not solve all the problems! This is
because the algorithm can fail if a hacker makes what is called as the man-in-the-middle
attack. This way, even though the two parties will feel that they are talking to each other,
practically they are in-turn communicating with the hacker as he places himself in
between them and switches back and forth the communication.
For example:
(1) Alice wants to communicate with Bob securely. For this purpose, she sends the
values of n and g to Bob. Let n=11 and g=7.
(2) Alice does not realize that the attacker Tom is listening quietly; to the conversation
between her and Bob. Tom simply picks up the values of n and g, and also forwards
them to Bob as they originally were.
(3) Now, let us assume that Alice, Tom and Bob select random numbers x and y.
(4) Alice calculates A and Bob calculates B whereas Tom calculates both A and B to
play the role of man in middle.
=2 =9 =8
B = gymod n
= 76 mod 11
= 117649 mod 11
=4
(5) Alice send her A2 to Bob. Tom intercepts it and send his A 9 to him.
(a) In return, Bob sends his B 8 to Alice. Tom intercepts it and send his B 4 to
Alice.
(b) Based on these values, all the three persons now calculate their keys.
Alice Tom Bob
K1 = Bx mod K1 = Bx mod n K2 = Ay mod n
n
=9 =5 =5
K2 = Ay mod n
= 26 mod 11
= 64 mod 11
=9
As we can see, the MITM attack can work against the Diffie-Hellman Key exchange
algorithm, causing it to fail. This is plainly because the person in middle makes the actual
communicators believe that they are talking to each other, whereas they are actually
talking to he man-in-the middle, who is talking to each of them.
The second problem is regarding the no. Of keys required. In our example, we have
just seen the situation of only two communicating parties. What would be the situation if
a third party say 'third' is added!
One must think of the situation when communication between first-second, second-
third as well as third-first must be secure! This would obviously require three keys! Then
assume how many keys would be required to securely communicate between 1000 people
that to independently?
To find out this answer, one formula is used. It says, the total no. of keys required to
securely communicate between 'n' individuals is = n (n-l) / 2. Hence in our example for
1000 people, 1000(999)/2 = 499500 keys would be needed. This certainly increases the
complications further.
In order to recover from these problems, the second technique (mentioned in the
beginning) comes into picture, i.e. the Asymmetric Key cryptography. This states that
two types of keys would be required, one each for encryption and decryption.
2. THE CONCEPT OF PUBLIC KEY AND PRIVATE KEY:
The Asymmetric key cryptography is also known as a 'public key cryptography',
which uses a key-pair rather than a single key. The importance of this scheme is that only
one key-pair is required to securely communicate between any number of other parties.
(unlike the huge no. of keys that we've seen with earlier method.) Hence, one problem is
overcome right away. One of these two keys is called public key (which can be
announced to the world) and another is private key (obviously to be kept with oneself).
This is to be followed by everyone who wants to communicate securely.
The working of public and private keys:
Asymmetric key cryptography (using public and private keys) works as under:
Consider the scenario, X wants to send a message to Y, without having to worry about
its security.
(7) Then X and Y should each have a private key and a public key.
(e) X should keep its private key secret.
(f) Y should keep its private key secret.
(g) X should inform Y about its public key.
(h) Y should inform X about its public key
(Both now have their own set of keys ready.)
(8) When X wants to send message to Y, X encrypts with Y's public key (as it is known
to everyone)
(9) X then sends this message to Y.
(10) Then, Y decrypts this message using his own private key (known only to Y)
[This ensures in this case, that the message can be encrypted & sent by anyone,
but can only be decrypted by Y. Hence, any interception will not result in knowing
the sensitive information as key is only with Y.]
Similarly, on the other side, if Y wants to send the message to X, reverse method
is performed.
(11) Y encrypts the message using X's public key and sends this to X.
(12) On receiving the message, X can further decrypt it using his own private key.
The basis of this working lies in the assumption of large prime number with only two
factors. If one of the factors is used for encryption process, only the other factor shall be
used for decryption.
The best example of an asymmetric key cryptography algorithm is the famous RSA
algorithm (developed by Rivest, Shamir and Adleman at MIT in 1978, based on the
framework setup by Diffie& Hellman earlier).
3.ASYMMETRIC KEY CRYPTOGRAPHY:
In public-key cryptography, there are two keys: a private key and a public key. The
receiver keeps the private key. The public key is announced to the public.
Imagine Alice, as shown in Figure 29.20, wants to send a message to Bob. Alice uses
the public key to encrypt the message. When Bob receives the message, the private key is
used to decrypt the message.
Fig. 5.25
In public-key encryption/decryption, the public key that is used for encryption is
different from the private key that is used for decryption.
The public key is available to the public; the private key is available only to an
individual.
Public-Key Encryption/Decryption has Two Advantages:
First, it removes the restriction of a shared symmetric key between two entities (e.g.,
persons) that need to communicate with each other. A shared symmetric key is shared by
the two parties and cannot be used when one of them wants to communicate with a third
party. In public-key encryption! Decryption, each entity creates a pair of keys; the private
one is kept, and the public one is distributed. Each entity is independent, and the pair of
keys created can be used to communicate with any other entity.
The second advantage is that the number of keys needed is reduced tremendously.
In this system, for I thousand users to communicate, only 1 thousand pairs of keys i.e.
2000 keys are needed, not 4,99,500, as was the case in symmetric-key cryptography.
Public-Key Cryptography also has Two Disadvantages:
The big disadvantage is the complexity of the algorithm. If we want the method to be
effective, the algorithm needs large numbers. Calculating the cipher text from plaintext
using the long keys takes a lot of time. That is the main reason that public-key
cryptography is not recommended for large amounts of text.
Public-Key Algorithms are more Efficient for Short Messages:
The second disadvantage of the public-key method is that the association between an
entity and its public key must be verified. If Alice sends her public key via an email to
Bob, then Bob must be sure that the public key really belongs to Alice and nobody else.
One point needs to re-mention that if your private key were made public you would
Get Bankrupted in no time!
4.RSA ALGORITHM:
(8) Generate two large random primes, p and q, of approximately equal size
(9) Calculate N = PXQ
(10) Select the public key that is the encryption key E such that it is not a factor of (p-1)
(q-1).
(11) Select the private key that is the decryption key D such that the following equation is
true: (DXE) mod (P-1) X (Q-1)=1
(12) For encryption, calculate the cipher text CT as CT=PTE mod N.
(13) Send CT as the cipher text to the receiver.
(14) For decryption, calculate the plain text PT as PT=CTD mod N.
A Very Simple Example of RSA Encryption:
This is an extremely simple example using numbers you can work out on a pocket
calculator (those of you over the age of 35 can probably even do it by hand).
(6) Select primes p=11, q=3.
(7) n = pq = 11.3 = 33 phi = (p-1)(q-1) = 10.2 = 20
(8) Choose e=3 Check gcd(e, p-1) = gcd(3, 10) = 1 (i.e. 3 and 10 have no common
factors except 1), and check gcd(e, q-1) = gcd(3, 2) = 1therefore gcd(e, phi) = gcd(e,
(p-1)(q-1)) = gcd(3, 20) = 1
(9) Compute d such that ed = 1 (mod phi) i.e. compute d = e-1 mod phi = 3-1 mod 20 i.e.
find a value for d such that phi divides (ed-1) i.e. find d such that 20 divides 3d-1.
Simple testing (d = 1, 2,...) gives d = 7 Check: ed-1 = 3.7 - 1 = 20, which is divisible
by phi.
(10) Public key = (n, e) = (33, 3) Private key = (n, d) = (33, 7).
This is actually the smallest possible value for the modulus n for which the RSA
algorithm works.
Now say we want to encrypt the message m = 7, c = me mod n = 73 mod 33 = 343 mod
33 = 13. Hence the cipher text c = 13.
To check decryption we compute m' = cd mod n = 137 mod 33 = 7. Note that we don't
have to calculate the full value of 13 to the power 7 here. We can make use of the fact
that a = bc mod n = (b mod n).(c mod n) mod n so we can break down a potentially large
number into its components and combine the results of easier, smaller calculations to
calculate the final value.
7
One-way of calculating m' is as follows: m' = 13 mod 33 = 13(3+3+1) mod 33 =
133.133.13 mod 33 = (133 mod 33). (133 mod 33).(13 mod 33) mod 33 = (2197 mod
33).(2197 mod 33).(13 mod 33) mod 33 = 19.19.13 mod 33 = 4693 mod 33 = 7.
What would happen if your private key were made public?
The answer is in just one word!–
Get Bankrupted!
However rich you were! Now popper!!
The receiver of your private key can, not only withdraw all that you have but also can
also avail credit for banks and enjoy and you keep paying throughout your life!
DIGITAL ENVELOPE:
In practice, symmetric key cryptography and asymmetric key cryptography are
combined to a very efficient security solution.
When using secret-key cryptosystems, users must first agree on a session key, that is, a
secret key to be used for the duration of one message or communication session. In
completing this task there is a risk the key will be intercepted during transmission. This is
part of the key management problem.
Public-key cryptography offers an attractive solution to this problem within a
framework called a digital envelope.
It is a secure container for electronic message. It includes a packet of electronic data
including an encoded message, plus authenticating information
The digital envelope consists of a message encrypted using secret-key cryptography
and an encrypted secret key. While digital envelopes usually use public-key cryptography
to encrypt the secret key, this is not necessary.
(1) If Alice and Bob have an established secret key, they could use this to encrypt the
secret key in the digital envelope.
(2) Suppose Alice wants to send a message to Bob using secret-key cryptography for
message encryption and public-key cryptography to transfer the message encryption
key.
(3) Alice chooses a secret key and encrypts the message with it, then encrypts the secret
key using Bob's public key.
(4) She sends Bob both the encrypted secret key and the encrypted message.
(5) When Bob wants to read the message he decrypts the secret key, using his private
key, and then decrypts the message, using the secret key.
(6) In a multi-addressed communications environment such as e-mail, this can be
extended directly and usefully.
(7) If Alice's message is intended for both Bob and Carol, the message encryption key
can be represented concisely in encrypted forms for Bob and for Carol, along with a
single copy of the message's content encrypted under that message encryption key.
(8) Alice and Bob may use this key to encrypt just one message or they may use it for an
extended communication.
(9) One of the nice features about this technique is they may switch secret keys as
frequently as they would like.
Not only do digital envelopes help solve the key management problem; they increase
performance without sacrificing security. The increase in performance is obtained by
using a secret-key cryptosystem to encrypt the large and variably sized amount of
message data, reserving public-key cryptography for encryption of short-length keys.
In general, secret-key cryptosystems are much faster than public-key cryptosystems.
The digital envelope technique is a method of key exchange, but not all key exchange
protocols use digital envelopes.
5.THE CONCEPT OF HASH (MESSAGE DIGEST):
Signing the Digest:
We said before that public-key encryption is efficient if the message is short.
Using a public key to sign the entire message is very inefficient if the message is very
long.
The solution is to let the sender sign a digest of the document instead of the whole
document. The sender creates a miniature version or digest of the document and signs it;
the receiver then checks the signature on the miniature.
To create a digest of the message, we use a hash function. The hash function creates a
fixed-size digest from a variable-length message, as shown in Figure.
Fig. 5.26
The two most common hash functions are called MD5 (Message Digest 5) and SHA-I
(Secure Hash Algorithm I). The first one produces a 120-bit digest. The second produces
a 160-bit digest.
Note that a hash function must have two properties to guarantee its success.
First, hashing is one-way; the digest can only be created from the message, not vice
versa.
Second, hashing is a one-to-one function; there is little probability that two messages
will create the same digest. We will see the reason for this condition shortly.
After the digest has been created, it is encrypted (signed) using the sender's private
key. The encrypted digest is attached to the original message and sent to the receiver.
Idea of a Message Digest:
The concept of message digests is based on similar principles. However, it is slightly
wider in scope. For instance, suppose that we have a number 4000 and we divide it by 4
to get 1000 Thus, 4 can become a fingerprint of the number 4000. Dividing 4000 by 4
will always yield 1000. If we change either 4000 or 4, the result will not be 1000.
Another important point is, if we are simply given the number 4, but are not given any
further information, we would not be able to trace back the equation 4 x 1000 = 4000.
Thus, we have one more important concept here. The fingerprint of a message (in this
case, the number 4) does not tell anything about the original message (in this case, the
number 4000). This is because there are infinite other possible equations, which can
produce the result 4.
Another simple example of message digest: Let us assume that we want to calculate
the message digest of a number 7391753. Then, we multiply each digit in the number
with the next digit (excluding it if it is 0), and discarding the first digits of the
multiplication operation, if the result is a two-digit number.
Thus, we perform a hashing operation (or a message digest algorithm) over a block of
data to produce its hash or message digest, which is smaller in size than the original
message. This concept is shown in fig.
Actually, the message digests are not so small and straightforward to compute.
Message digests usually consist of 128 or more bits. This means that the chance of any
two-message digests being the same is anything between 0 and at least 2128. The
message digest length is chosen to be so long with a purpose. This minimizes that the
scope for two messages digests being the same.
7391753
7 3 = 21 9 7 = 63
1 9 = 09 3 5 = 15
9 1 = 09 5 3 = 15
Fig. 5.27
Fig. 5.28
MD5:
In cryptography, MD5 (Message-Digest algorithm 5) is a widely used, partially
insecure cryptographic hash function with a 128-bit hash value. As an Internet standard
(RFC 1321), MD5 has been employed in a wide variety of security applications, and is
also commonly used to check the integrity of files. An MD5 hash is typically expressed
as a 32 digit hexadecimal number.
MD5 was designed by Ron Rivest in 1991 to replace an earlier hash function, MD4. In
2007 a group of researchers including Arjen Lenstra described how to create a pair of
files that share the same MD5 checksum
MD5 Algorithm Description:
We begin by supposing that we have a 1000-bit message as input, and that we wish to
find its message digest.
The following five steps are performed to compute the message digest of the message.
Step 1: Append Padding Bits:
The message is "padded" (extended) so that its length (in bits) is Similar to 448,
modulo 512. That is, the message is extended so that it is just 64 bits timid of being a
multiple of 512 bits long. Padding is always performed, even if the length of the message
is already similar to 448, modulo 512. Padding is performed as follows: a single "1" bit is
appended to the message, and then "0" bits are appended so that the length in bits of the
padded message becomes congruent to 448, modulo 512. In all, at least one bit and at
most 512 bits are appended.
Step 2: Append Length:
A 64-bit representation of 1000 (The message length excluding padded one) is
appended to the result of the previous step.
In the unlikely event that the message length is greater than 2^64, then only the low-
order 64 bits of b are used.
At this point the resulting message (that is message + padding + length) has a length
that is an exact multiple of 512 bits. Equivalently, this message has a length that is an
exact multiple of 16 (32-bit) words.
Step 3: Divide the input into 512-bit blocks:
Now, we divide the input message into blocks, each of length 512 bits.
Step 4: Initialize MD Buffer/Chaining Variables:
A four-word buffer (A, B, C, D) is used to compute the message digest. Here each of
A, B, C, D is a 32-bit register. These registers are initialized to the following values in
hexadecimal, low-order bytes first):
A: 01 23 45 67
B: 89 ab cd ef
C:fe dc ba 98
D: 76 54 32 10
Step 5: Process Message in 16-Word Blocks:
5.2: Divide the current 512 bit block into 16 sub blocks of 32
bit each.
a b c d
Process P
ADD
M [I] ADD
T [K] ADD
SHIFT
ADD
a b c d
Fig. 5.29
We define four auxiliary functions that is Process P in our context, that each take as
input of three 32-bit words and produce as output one 32-bit word.
Symmetric
6) Alice and Bob agree on a cryptosystem
7) Alice and Bob agree on a key
8) Alice takes her plaintext message and encrypts it using the encryption algorithm
and the key. This creates a ciphertext message
9) Alice sends the ciphertext message to Bob
10) Bob decrypts the ciphertext message with the same algorithm and key and reads
it.
Asymmetric
5) Alice and Bob agree on a public-key cryptosystem
6) Bob sends Alice his public key
7) Alice encrypts her message using Bob’s public key and sends it to Bob
8) Bob decrypts Alice’s message using his private key
Problems:
Symmetric
• Keys must be distributed in secret
• If a key is compromised, Eve (eavesdropper) can
decrypt any message
pretend to be one of the parties
• A network requires a great number of keys
Asymmetric
• slow (~1000 times slower than the symmetric)
• vulnerable to chosen-plaintext attacks
Private – Key Cryptography:
• Traditional private/secret/single key cryptography uses one key
• Key is shared by both sender and receiver
• if the key is disclosed communications are compromised
• also known as symmetric, both parties are equal
– hence does not protect sender from receiver forging a message & claiming
is sent by sender
Public Key Cryptography:
• Probably most significant advance in the 3000 year history of cryptography
• Uses two keys – a public key and a private key
• asymmetric since parties are not equal
• uses clever application of number theory concepts to function
• complements rather than replaces private key cryptography
• public-key/two-key/asymmetric cryptography involves the use of two keys:
• a public-key, which may be known by anybody, and can be used to
encrypt messages, and verify signatures
• a private-key, known only to the recipient, used to decrypt messages,
and sign (create) signatures
• is asymmetric because
• those who encrypt messages or verify signatures cannot decrypt messages
or create signatures
• public-key/two-key/asymmetric cryptography involves the use of two keys:
• a public-key, which may be known by anybody, and can be used to
encrypt messages, and verify signatures
• a private-key, known only to the recipient, used to decrypt messages,
and sign (create) signatures
• is asymmetric because
• those who encrypt messages or verify signatures cannot decrypt messages
or create signatures
Message Authentication;
message authentication is concerned with:
protecting the integrity of a message
validating identity of originator
non-repudiation of origin (dispute resolution)
will consider the security requirements
then three alternative functions used:
message encryption
message authentication code (MAC)
hash function
Security Requirements:
disclosure
traffic analysis
masquerade
content modification
sequence modification
timing modification
source repudiation
destination repudiation
Message Encryption:
message encryption by itself also provides a measure of authentication
if symmetric encryption is used then:
receiver know sender must have created it
since only sender and receiver now key used
know content cannot of been altered
if message has suitable structure, redundancy or a checksum to detect any
changes
if public-key encryption is used:
encryption provides no confidence of sender
since anyone potentially knows public-key
however if
sender signs message using their private-key
then encrypts with recipients public key
have both secrecy and authentication
again need to recognize corrupted messages
but at cost of two public-key uses on message
1.1.Message Authentication Code (MAC):
generated by an algorithm that creates a small fixed-sized block
depending on both message and some key
like encryption though need not be reversible
appended to message as a signature
receiver performs same computation on message and checks it matches the MAC
provides assurance that message is unaltered and comes from sender
Most important modern hash functions follow the basic structure shown in this figure.
This has proved to be a fundamentally sound structure, and newer designs simply refine
the structure and add to the hash code length. Within this basic structure, two approaches
have been followed in the design of the compression function, as mentioned previously,
which is the basic building block of the hash function.
Secure Hash Algorithm:
1.7.CMAC:
previously saw the DAA (CBC-MAC)
widely used in govt& industry
but has message size limitation
can overcome using 2 keys & padding
thus forming the Cipher-based Message Authentication Code (CMAC)
adopted by NIST SP800-38B
2. Kerberos:
Kerberos:
trusted key server system from MIT
provides centralised private-key third-party authentication in a distributed network
allows users access to services distributed through network
without needing to trust all workstations
rather all trust a central authentication server
two versions in use: 4 & 5
2.1. Kerberos Requirements:
its first report identified requirements as:
secure
reliable
transparent
scalable
implemented using an authentication protocol based on Needham-Schroeder
2.2.Kerberos v4 Overview:
a basic third-party authentication scheme
have an Authentication Server (AS)
users initially negotiate with AS to identify self
AS provides a non-corruptible authentication credential (ticket granting
ticket TGT)
have a Ticket Granting server (TGS)
users subsequently request access to other services from TGS on basis of
users TGT
2.3. Kerberos v4 Dialogue:
1. obtain ticket granting ticket from AS
•
once per session
2. obtain service granting ticket from TGT
•
for each distinct service required
3. client/server exchange to obtain service
•
on every service request
2.5.Kerberos Version 5:
developed in mid 1990’s
specified as Internet standard RFC 1510
provides improvements over v4
addresses environmental shortcomings
•
encryption alg, network protocol, byte order, ticket
lifetime, authentication forwarding
and technical deficiencies
•
double encryption, non-std mode of use, session keys, password
attacks
3. Diffie-Hellman Key Exchange:
Diffie-Hellman’s Algorithm:
Key agreement is a method to create secret key by exchanging only public keys.
Example:
o Bob sends Alice his public key
o Alice sends Bob her public key
o Bob uses Alice’s public key and his private key to generate a session key
o Alice uses Bob’s public key and her private key to generate a session key
o Using a key agreement algorithm both will generate same key
o Bob and Alice do not need to transfer any key
1. A ® B : A, B, tA
2. B ® A : B, A, tB , { SignB(tA, tB ) }Kab
3. A ® B : A, B, { SignA(tA, tB ) }Kab
• Good Key: as before Key
• Key Confirmation: A knows that B knows the Kab.
1. A ® E(B) : A, B, tA
1’. E ® B : E, B, tA
2’. B ® E : B,E,tB,{SignB(tA,tB)}Kab
2. E(B) ® A : B,A,tB,{SignB(tA,tB)}Kab
3. A ® E(B) : A, B, { SignA(tA, tB ) }Kab
1.Firewalls:
INTRODUCTION:
1.1.What are Firewalls?
The Internet is a vital and growing network that is changing the way many
organizations and individuals communicate and do business. Using the Internet we can
get connected to any other computer, no matter how far the two are located from each
other on the network. However, the Internet suffers from significant and widespread
security problems. Many agencies and organizations have been attacked or probed by
intruders, with resultant high losses to productivity and reputation. In some cases,
organizations have had to disconnect from the Internet temporarily, and have invested
significant resources in correcting problems with system and network configuration. Sites
that are unaware of or ignorant of these problems face a significant risk that network
intruders will attack them. Even sites that do observe good security practices face
problems with new vulnerabilities in networking software and the persistence of some
intruders. But this facility usually may be a nightmare for network support staff, which is
left with a very difficult job of trying to protect the corporate networks from a variety of
attacks. At a broad level, there are two kinds of attacks:
(1) Most corporations have large amounts of valuable and confidential data in their
networks. Leaking of this critical information to competitors can be a great setback.
(2) Apart from the danger of the insider information leaking out, there is a great danger
of the outside elements (such as viruses and Worms) entering a corporate network to
create havoc.
(a) Some of the problems with Internet security are a result of inherent
vulnerabilities in the services (and the protocols that the services implement),
while others are a result of host configuration and access controls that are poorly
implemented or overly complex to administer.
(b) Additionally, the role and importance of system management is often short-
changed in job descriptions, resulting in many administrators being, at best, part-
time and poorly prepared. We will talk about these problems in detail.
The Security Related Problems in the Internet:
Vulnerable:
TCP/IP services - a number of the TCP/IP services are not secure and can
be compromised by knowledgeable intruders; services used in the local area-
networking environment for improving network management are especially vulnerable.
Ease of spying and spoofing:
The majority of Internet traffic is unencrypted; e-mail, passwords, and file transfers
can be monitored and captured using readily available software, intruders can then reuse
passwords to break into systems.
Lack of policy:
Many sites are configured unintentionally for wide-open Internet access without
regard for the potential for abuse from the Internet; many sites permit more
TCP/IP services than they require for their operations and do not attempt to limit access
to information about their computers that could prove valuable to intruders.
Complexity of configuration:
Host security access controls are often complex to configure and monitor; controls that
is accidentally misconfigured often result in unauthorized access.
As a result of these dangers, we must have mechanisms which can ensure that the
inside information remains inside, and also prevents the outsider attackers from entering
inside a corporate network. This is where a firewall is needed.
A firewall acts like a guard, which can guard a corporate network by standing
between the network and the outside world. A firewall is a network security system
designed to prevent unauthorized access to a private network from any other network. It
works closely with a router program to determine if a packet should be forwarded to its
destination. It also provides a proxy service that makes network requests on behalf of the
users on a network.
All traffic between the network and the Internet in either direction must pass through
the firewall. The firewall decides if the traffic can be allowed to flow, or whether it must
be stopped from proceeding further. Technically, therefore, a firewall is specialized
version of a router. Apart from the basic routing functions and rules, a router can be
configured to perform the firewall functionality with the help of additional software
resources.
Fig. 4.31
Source: Basics of network security, firewalls and VPNs-NIIT.
According to the selected policies (called Rule-sets or Access Control Lists or ACLs)
it determines whether to accept a packet or reject it. This is the first line of defense
against the intruders, and is not totally foolproof. It has to be combined with other
techniques as well, to strengthen the security.
Advantages of packet filters:
(1) Simple and straightforward mechanism.
(2) It is cost effective.
(3) It is fairly effective and adequate in most cases.
(4) Operation is totally transparent to the users.
(5) Faster in operation.
(6) It has a built-in operating system optimized for security and performance. So it can
be plugged into a network, regardless of the OS being used.
Disadvantages of packet filters:
(1) It does not support user authentication as the filtering is based purely on the IP
address of the hardware system.
(2) Rule-sets to be defined for a packet filter may be very complex and rigid.
(3) In order to allow certain access, some exceptions to the rules need to be added. This
may add further to the complexity.
(4) Some packet filters do not filter on the source TCP/UDP ports at all, which may
increase the flaws in the filtering system.
(5) It does not allow you to record the logs of individual sessions. These do not possess
any auditing capabilities and auditing is considered to be of major importance in
security.
(6) All the applications on Internet may not be fully supported by packet filtering
firewalls.
(7) It does not conceal the internal architecture of the network and hence it gets exposed.
(8) Using packet filters may be complex as graphical interface is not available in most of
the cases.
Application level filtering:
An application gateway is also called as a proxy server. This is because it acts like a
proxy i.e. deputy or substitute, and decides about the flow of application level traffic.
An application gateway typically works as follows:
(1) An internal user contacts the application gateway using a TCP/IP application, such as
HTTP or TELNET.
(2) The application gateway asks the user about the remote host with which the user
wants to set up a connection for actual communication (i.e. its domain name or IP
address) The application gateway also asks for the user id and the password required
to access the services of the application gateway.
(3) The user provides the information to the application gateway.
(4) The application gateway now accesses the remote host on behalf of the user, and
passes the packets of the user to the remote host.
The virtual private network (VPN) technology included in Windows Server 2003 helps
enable cost-effective, secure remote access to private networks. VPN allows
administrators to take advantage of the Internet to help provide the functionality and
security of private WAN connections at a lower cost. In Windows Server 2003, VPN is
enabled using the Routing and Remote Access service. VPN is part of a comprehensive
network access solution that includes support for authentication and authorization
services, and advanced network security technologies.
There are two main strategies that help provide secure connectivity between private
networks and enabling network access for remote users.
VPN connections
VPN connections use either Point-to-Point Tunneling Protocol (PPTP) or Layer Two
Tunneling Protocol/Internet Protocol security (L2TP/IPSec) over an intermediate
network, such as the Internet. By using the Internet as a connection medium, VPN saves
the cost of long-distance phone service and hardware costs associated with using dial-up
or leased line connections. A VPN solution includes advanced security technologies such
as data encryption, authentication, authorization, and Network Access Quarantine
Control.
Note
Using VPN, administrators can connect remote or mobile workers (VPN clients) to
private networks. Remote users can work as if their computers are physically connected
to the network. To accomplish this, VPN clients can use a Connection Manager profile to
initiate a connection to a VPN server. The VPN server can communicate with an Internet
Authentication Service (IAS) server to authenticate and authorize a user session and
maintain the connection until it is terminated by the VPN client or by the VPN server. All
services typically available to a LAN-connected client (including file and print sharing,
Web server access, and messaging) are enabled by VPN.
VPN clients can use standard tools to access resources. For example, clients can use
Windows Explorer to make drive connections and to connect to printers. Connections are
persistent: Users do not need to reconnect to network resources during their VPN
sessions. Because drive letters and universal naming convention (UNC) names are fully
supported by VPN, most commercial and custom applications work without modification.
2.2.VPN Scenarios
Virtual private networks are point-to-point connections across a private or public network
such as the Internet. A VPN client uses special TCP/IP-based protocols, called tunneling
protocols, to make a virtual call to a virtual port on a VPN server. In a typical VPN
deployment, a client initiates a virtual point-to-point connection to a remote access server
over the Internet. The remote access server answers the call, authenticates the caller, and
transfers data between the VPN client and the organization’s private network.
Site-to-site VPN
Remote access VPN connections enable users working at home or on the road to access a
server on a private network using the infrastructure provided by a public network, such as
the Internet. From the user’s perspective, the VPN is a point-to-point connection between
the computer (the VPN client) and an organization’s server. The exact infrastructure of
the shared or public network is irrelevant because it appears logically as if the data is sent
over a dedicated private link.
Site-to-Site VPN
A site-to-site VPN connection connects two portions of a private network. The VPN
server provides a routed connection to the network to which the VPN server is attached.
The calling router (the VPN client) authenticates itself to the answering router (the VPN
server), and, for mutual authentication, the answering router authenticates itself to the
calling router. In a site-to site VPN connection, the packets sent from either router across
the VPN connection typically do not originate at the routers.
PPTP-based VPN and L2TP/IPSec-based VPN connection properties are described in the
following sections.
Encapsulation
VPN technology provides a way of encapsulating private data with a header that allows
the data to traverse the network.
Authentication
For the VPN connection to be established, the VPN server authenticates the VPN client
attempting the connection and verifies that the VPN client has the appropriate
permissions. If mutual authentication is being used, the VPN client also authenticates the
VPN server, providing protection against masquerading VPN servers.
The user attempting the PPTP or L2TP/IPSec connection is authenticated using Point-to-
Point (PPP)-based user authentication protocols such as Extensible Authentication
Protocol-Transport Layer Security (EAP-TLS), Microsoft Challenge-Handshake
Authentication Protocol (MS-CHAP), Microsoft Challenge-Handshake Authentication
Protocol version 2 (MS-CHAP v2), Shiva Password Authentication Protocol (SPAP), and
Password Authentication Protocol (PAP). For PPTP connections, you must use EAP-
TLS, MS-CHAP, or MS-CHAP v2. EAP-TLS using smart cards or MS-CHAP v2 is
highly recommended, as they provide mutual authentication and are the most secure
methods of exchanging credentials.
To verify that the data being sent on an L2TP/IPSec VPN connection originated at the
other end of the connection and was not modified in transit, L2TP/IPSec packets include
a cryptographic checksum based on an encryption key known only to the sender and the
receiver.
Data Encryption
Data can be encrypted for protection between the endpoints of the VPN connection. Data
encryption should always be used for VPN connections where private data is sent across
a public network such as the Internet. Data that is not encrypted is vulnerable to
unauthorized interception. For VPN connections, Routing and Remote Access uses
Microsoft Point-to-Point Encryption (MPPE) with PPTP and IPSec encryption with
L2TP.
When a VPN server is configured, it creates a virtual interface that represents the
interface on which all VPN connections are made. When a VPN client establishes a VPN
connection, a virtual interface is created on the VPN client that represents the interface
connected to the VPN server. The virtual interface on the VPN client is connected to the
virtual interface on the VPN server, creating the point-to-point VPN connection.
The virtual interfaces of the VPN client and the VPN server must be assigned IP
addresses. The assignment of these addresses is done by the VPN server. By default, the
VPN server obtains IP addresses for itself and VPN clients using the Dynamic Host
Configuration Protocol (DHCP). Otherwise, a static pool of IP addresses can be
configured to define one or more address ranges, with each range defined by an IP
network ID and a subnet mask or start and end IP addresses.
Name server assignment, the assignment of Domain Name System (DNS) and Windows
Internet Name Service (WINS) servers to the VPN connection, also occurs during the
process of establishing the VPN connection.
2.4.Tunneling Overview
Tunneling is a method of using a network infrastructure to transfer data for one network
over another network. The data (or payload) to be transferred can be the frames (or
packets) of another protocol. Instead of sending a frame as it is produced by the
originating node, the tunneling protocol encapsulates the frame in an additional header.
The additional header provides routing information so that the encapsulated payload can
traverse the intermediate network.
The encapsulated packets are then routed between tunnel endpoints over the network.
The logical path through which the encapsulated packets travel through the network is
called a tunnel. After the encapsulated frames reach their destination on the network, the
frame is de-encapsulated (the header is removed) and the payload is forwarded to its final
destination. Tunneling includes this entire process (encapsulation, transmission, and de-
encapsulation of packets).
2.5.Tunneling Protocols
Tunneling enables the encapsulation of a packet from one type of protocol within the
datagram of a different protocol. For example, VPN uses PPTP to encapsulate IP packets
over a public network such as the Internet. A VPN solution based on either PPTP or
L2TP can be configured.
PPTP and L2TP depend heavily on the features originally specified for PPP. PPP was
designed to send data across dial-up or dedicated point-to-point connections. For IP, PPP
encapsulates IP packets within PPP frames and then transmits the encapsulated PPP-
packets across a point-to-point link. PPP was originally defined as the protocol to use
between a dial-up client and a network access server (NAS).
PPTP
PPTP uses a TCP connection for tunnel management and a modified version of Generic
Routing Encapsulation (GRE) to encapsulate PPP frames for tunneled data. The payloads
of the encapsulated PPP frames can be encrypted, compressed, or both. The following
figure shows the structure of a PPTP packet containing an IP datagram.
When using the Internet as the public network for VPN, the PPTP server is a PPTP-
enabled VPN server with one interface on the Internet and a second interface on the
intranet.
L2TP
L2TP allows multiprotocol traffic to be encrypted and then sent over any medium that
supports point-to-point datagram delivery, such as IP, X.25, frame relay, or asynchronous
transfer mode (ATM). L2TP is a combination of PPTP and Layer 2 Forwarding (L2F), a
technology developed by Cisco Systems, Inc. L2TP represents the best features of PPTP
and L2F. L2TP encapsulates PPP frames to be sent over IP, X.25, frame relay, or ATM
networks. When configured to use IP as its datagram transport, L2TP can be used as a
tunneling protocol over the Internet. L2TP is documented in RFC 2661 in the IETF RFC
Database.
L2TP over IP networks uses User Datagram Protocol (UDP) and a series of L2TP
messages for tunnel management. L2TP also uses UDP to send L2TP-encapsulated PPP
frames as tunneled data. The payloads of encapsulated PPP frames can be encrypted,
compressed, or both, although the Microsoft implementation of L2TP does not use MPPE
to encrypt the PPP payload. The following figure shows the structure of an L2TP packet
containing an IP datagram.
L2TP with IPSec (L2TP/IPSec)
The result after applying ESP to an IP packet containing an L2TP message is shown in
the following figure.
Routing for remote access and site-to-site VPN connections is described in the following
sections.
Default Routing
The preferred method for directing packets to a remote network is to create a default
route on the remote access client that directs packets to the remote network (the default
configuration for VPN remote access clients). Any packet that is not intended for the
neighboring LAN segment is sent to the remote network. When a connection is made, the
remote access client, by default, adds a default route to its routing table and increases the
metric of the existing default route to ensure that the newest default route is used. The
newest default route points to the new connection, which ensures that any packets that are
not addressed to the local LAN segment are sent to the remote network.
Under this configuration, when a VPN client connects and creates a new default route,
Internet sites that have been accessible are no longer accessible (unless Internet access is
available through the organization’s intranet). This poses no problem for remote VPN
clients that require access only to the organization’s network. However, it is not
acceptable for remote clients that need access to the Internet while they are connected to
the organization’s network.
Split Tunneling
Split tunneling enables remote access VPN clients to route corporate-based traffic over
the VPN connection while sending Internet-based traffic using the user’s local Internet
connection. This prevents the use of corporate bandwidth for access to Internet sites.
With the advent of the Internet, packets can now be routed between routers that are
connected to the Internet across a virtual connection that emulates the properties of a
dedicated, private, point-to-point connection. This type of connection is known as a site-
to-site VPN connection. Site-to-site VPN connections can be used to replace expensive
long-haul WAN links with short-haul WAN links to a local Internet service provider
(ISP).
A site-to-site VPN connection connects two portions of a private network. The VPN
server provides a routed connection to the network to which the VPN server is attached.
On a site-to-site VPN connection, the packets sent from either router across the VPN
connection typically do not originate at the routers.
To facilitate routing between the sites, each VPN server and the routing infrastructure of
its connected site must have a set of routes that represent the address space of the other
site. These routes can be added manually, or routing protocols can be used to
automatically add and maintain a set of routes.
There are two routing protocols that can be used in a site-to-site VPN deployment:
RIP
The Windows Server 2003 implementation of RIP has the following features:
The ability to select which RIP version to run on each interface for incoming and
outgoing packets.
OSPF
OSPF is designed for exchanging routing information within a large or very large
network. Instead of exchanging routing table entries like RIP routers, OSPF routers
maintain a map of the network that is updated after any change to the network topology.
This map, called the link state database, is synchronized between all the OSPF routers
and is used to compute the routes in the routing table. Neighboring OSPF routers form an
adjacency, which is a logical relationship between routers to synchronize the link state
database.
3.Introduction to TCP:
TCP:
Because insiders are trusted, is it okay to allow outgoing TCP connections? Not
completely. Although the insiders might be trusted, it is not always certain that the code
they are running is behaving properly.
Applets running on users' machines are considered insiders.
There are ways that bad things can originate from the inside. Assume that the mail
filter is weeding out viruses and worms. That only works if users obtain their mail via
POP3 or IMAP.
If mail is read through a Web-based server, such as Hotmail or Hushmail, there is little
to prevent the poor user from infection via these vectors. Once hit, the inside machine
may generate problematic outgoing TCP connections. (Imagine a dual-mode worm:
When it can, it spreads by direct attacks on vulnerable systems, but it also e-mails copies
of itself to users behind firewalls. Your imagination won’t be stretched very far; these
worms exist.)
Incoming TCP connections should not be allowed. If there is a strong need for access
to an internal machine from the outside, this should be handled via a dedicated proxy,
often from a machine on the DMZ.
If possible, use cryptographically enhanced services such as ssh. It is also best to limit
the sets of machines that can be reached; and, if possible, the set of machines that can
initiate access. The filtering rule for TCP can be summarized as follows:
SSH:
One of the principles of computer security is to trust as little as possible. Ssh is one of
the things we trust. As with Mail, it is thus crucial to keep up with bugs and patches. Ssh
has indeed had some serious security problems in the past. Ssh is reasonable to allow
through the firewall because it implements cryptographic authentication and encryption,
and is the best way we know of to allow access through a firewall.
Depending on your internal trust policies, you may want to terminate incoming ssh
connections at the firewall. Here you can do strong, centralized authentication. It's also
attractive to pretend that doing so prevents people or malicious programs from creating
back doors, but it's just that: a pretense. If you permit outbound TCP, it's easy to create
back doors, and ssh's port forwarding just lets Bad Guys do it a bit more easily, from the
command line. The rule for ssh is as follows:
Telnet:
Telnet Services:
(1) Outbound Telnet Service
(2) Inbound Telnet Service
Outbound Telnet Service:
In an outbound telnet a local client is talking to a remote server. We need to handle
both outgoing and incoming packets. The outgoing packets contain the user’s keystrokes
and have the following characteristics.
(1) The IP Source address of the outgoing packets is the local host’s IP address.
(2) The IP Destination address of the outgoing packets is the remote host’s IP address.
(3) Telnet is a TCP-based service. So the IP packet type is TCP.
(4) The TCP Destination port is 23.
(5) The TCP Source port number is some seemingly random number greater than 1023
(6) The first outgoing packet, establishing the connection, will not have the ACK bit set;
the rest of the outgoing packets will.
The incoming packets contain the data to be displayed on the user’s screen and have
the following characteristics.
(1) The IP Source address of the incoming packets is the remote host’s IP address.
(2) The IP Destination address is the local host’s IP address.
(3) The IP packet type is TCP.
(4) The TCP Source port is 23.That is the port the server use.
(5) The TCP Destination port number is the same random number greater than 1023 that
we used as the source port for the outgoing packets.
(6) All incoming packets will have the ACK bit set.
Fig. 4.36
Inbound telnet Services:
In the inbound telnet services a remote client communicates with a local telnet server.
We need to handle both incoming and the outgoing packets.
The incoming packets for the inbound telnet services contain the users keystrokes and
have the following characteristics:
(1) The IP source address of these packets in the remote host address.
(2) The IP destination address is the local host address.
(3) The IP packet type is TCP.
(4) The TCP source code is some random code number greater than 1023.
(5) The TCP destination port is 23.
(6) The TCP ACK bit will not be set on the very first inbound packet establishing the
connection, but it will be set on all other inbound packets.
The outgoing packet for this inbound telnet service contain the server responses and
have the following characteristics:
(1) The IP source address is the local host address
(2) The IP destination address is the remote host address
(3) The IP packet type is TCP
(4) The IP source port is 23
(5) The TCP destination port is the same random port “Z” that was used as a source port
for the inbound packets.
(6) The TCP ACK bit will be set on all outgoing packets.
Telnet Summary:
(1) Rule A allows packets out to remote telnet servers.
(2) Rule B allows the returning packets to come back in because it verifies that the ACK
bit is set, Rule B can be abused by an attacker to allow incoming TCP connections
from port 23 on the attackers end to port above 1023 on your end.
(3) Rule C is the default rule. If none of the preceding rules apply the packet is blocked.
Remember from your previous discussion that any blocked packet should be logged
and that it may or may not cause an ICMP message to be returned to the originator.
The following table illustrates the various types of packets involved in inbound and
outbound telnet services:
(A) The TCP ACK bit will be set on all but the first of these packets which establishes
the Connection.
Note that y and z are both random port numbers above 1023.
If u want to allow outgoing telnet, but nothing else you would set up your packet
filtering as follows:
1.IP Security:
have a range of application specific security mechanisms
eg. S/MIME, PGP, Kerberos, SSL/HTTPS
however there are security concerns that cut across protocol layers
would like security implemented by the network for all applications
general IP Security mechanisms
provides
authentication
confidentiality
key management
applicable to use over LANs, across public & private WANs, & for the Internet
1.1.IPSec Uses:
1.2.Benefits of IPSec;
have two security header extensions:
Authentication Header (AH)
Encapsulating Security Payload (ESP)
1.4.IPSec Services:
Access control
Connectionless integrity
Data origin authentication
Rejection of replayed packets
a form of partial sequence integrity
Confidentiality (encryption)
Limited traffic flow confidentiality
Security Associations :
a one-way relationship between sender & receiver that affords security for traffic flow
defined by 3 parameters:
Security Parameters Index (SPI)
IP Destination Address
Security Protocol Identifier
has a number of other parameters
seq no, AH & EH info, lifetime etc
have a database of Security Associations
provides support for data integrity & authentication of IP packets
end system/router can authenticate user/app
prevents address spoofing attacks by tracking sequence numbers
based on use of a MAC
HMAC-MD5-96 or HMAC-SHA-1-96
parties must share a secret key
2. Secure Socket Layer(SSL):
2.1.INTRODUCTION
The Secure Socket Layer (SSL) protocol is an Internet protocol for the security exchange
information between a Web browser and a Web Server. Logically, it provides a secure
pipe between the Web Browser and Web server. SSL allows sensitive information such
as credit card numbers, social security numbers, and login credentials to be transmitted
securely.
Secure Socket
Layer Sevices
Authentication Confidentiality
SSl sub-
protocols
2.3.HANDSHAKE PROTOCOL
The handshake protocol of SSL is the first sub-protocol used by the client and the
server to communicate using a SSL-enabled connection.
Handshake message has three fields:
4.Finish
Version: This field identifies the lower of the versions suggested by the client and
the highest supported by the server.
Random: This field has the same structure as the random field of the client. The
random value generated by the server is completely independent of the client’s
Random value.
Session id: If the session id value sent by the client was non-zero, the server uses
the same value. Otherwise, the server creates a new session id and puts it in this
field.
Cipher suite: Contains a single cipher suite, which the server selects from the list
sent earlier by the client.
Compression method: Contains a compression algorithm, which the server selects
from the list sent earlier by the client.
1. Certificate
2. Client Key Exchange
3. Certificate Verify.
Step 1: Certificate
Web Web
Browser Step 2: Client Key Exchange
Server
Step 4: Finished
2.4.RECORD PROTOCOL
The Record protocol in SSL comes into picture after a successful hanshake is
completed between the client and the server.
Adter the client and the server have optionally authenticated each other and have
decided what algorithms to use for secure information exchanged.
The services of this steps are as follows:
Services of
Record
Protocol
Confidentiality Integrity
Addition of
Fragmentation Compression Encryption Append HEader
MAC
1. Fragmentation: The original application is broken into blocks, so that the size of
the block is less than or equal to 214 bytes(16,384 bits).
2. Compression:The fragmented blocks are optionally compressed.
3. Addition of MAC: Usinng the shared key established previously in the handshake
protocol, the Message Authentication Code(MAC) for each block is calculated.
4. Encryption: Using the symmetric key, the output of the previous step in
encrypted.
5. Append Header: Finally, a header is added to the encrypted block.
Field Length(in Decription
bits)
Conetnt Type 8 bits Specifies the protocol used for processing the record
Major Version 8 bits Specifies the major version of the SSL protocol in
used
Minor Version 8 bits Specifies the minor version of the SSL protocol in
used
Compressed 16 bits Specifies the length in bits of the original plain text
length
(fig) Contents of the header
MAC(0,16 or 20 bytes)
2.5.ALERT PROTOCOL
When either the client or the server detects an error, the detecting party
sends an alert message to the other party.
If the error is fatal, both the parties immediately close the SSL connection.
Both the parties also destroy the session identifiers,secrets and keys
associated with this connection before it is terminated.
Other errors,which are not so severe,do not result in the termination of the
connection.Instead,the parties handle the error and continue.
Severity Cause
Byte 1 Byte 2
Alert Description
No certificate Sent in response to certificate request if an appropriate certificate
is not available.
Bad certificate A certificate was corrupt
Unsupported The type of the received certificate is not supported
certificate
Certificate revoked The signer of a certificate has revoked it
Certificate expired A received certificate has expired
Certificate unknown An unspecified error occurred while processing the certificate
Close notify Notifies that the sender will not send any more messages in this
connection. Each party must send this message before closing its
side of the connection.
(fig) Non-fatal alerts
Closing SSL Connection
Before ending the SSL connection, the client and the server must inform each
other that their
Side of the connection is ending.
Each party sends a Close notify alert to the other party. This ensures a graceful
closure of the connection.
When a party receives this alert, it must immediately stop whatever it is doing,
send its own Close notify alert and end the connection from its side as well.
If an SSL connection ends without a Close notify from either party, it cannot be
resumed.
2.6.SSL CERTIFICATE
SSL Certificates are small data files that digitally bind a cryptographic key to an
organization’s details. When installed on a web server, it activates the padlock and the
https protocol (over port 443) and allows secure connections from a web server to a
browser. Typically, SSL is used to secure credit card transactions, data transfer and
logins, and more recently is becoming the norm when securing browsing of social media
sites. SSL Certificates bind together:
A domain name, server name or hostname
An organizational identity (i.e. company name) and location
2.7.CREATE SECURE CONNECTION
When a browser attempts to access a website that is secured by SSL, the browser and the
web server establish an SSL connection using a process called an “SSL Handshake”.
Essentially, three keys are used to set up the SSL connection: the public, private, and
session keys. Anything encrypted with the public key can only be decrypted with the
private key, and vice versa.
Because encrypting and decrypting with private and public key takes a lot of processing
power, they are only used during the SSL Handshake to create a symmetric session key.
After the secure connection is made, the session key is used to encrypt all transmitted
data.
1. Browser connects to a web server (website) secured with SSL (https). Browser
requests that the server identify itself.
2. Server sends a copy of its SSL Certificate, including the server’s public key.
3. Browser checks the certificate root against a list of trusted CAs and that the
certificate is unexpired, unrevoked, and that its common name is valid for the
website that it is connecting to. If the browser trusts the certificate, it creates,
encrypts, and sends back a symmetric session key using the server’s public
key.
4. Server decrypts the symmetric session key using its private key and sends
back an acknowledgement encrypted with the session key to start the
encrypted session.
5. Server and Browser now encrypt all transmitted data with the session key.
2.8.NEED OF SSL
DISADVANTAGE
1. Regular Renewal: Like a website domain and hosting plan, an SSL certificate expires
after a short period of time—usually one to five years. You have to renew the SSL
protection regularly and pay the subscription price again forever in order to keep the
protection. If you forget to renew the SSL protection, your website will display an error
on the user's computer stating that the certificate is not valid.
2. Complex Installation: SSL technology can be difficult to install on a website,
especially for someone who isn't very familiar with website development. The provider
will send you a set of files to install in a certain folder of your web server. You must also
activate the certificate using specific instructions from the provider. The process can be
overwhelming for a beginner, and some trial-and-error may be required to get the
technology to work properly on your website.
2.10.CONCLUSION
SSL is a Protocol for communicating between Web server and web browser.
The approves that the site you are navigating is secure or not.
SSL works in three protocols: Handshake, Record and Alert Protocol.
Secure web server obtain SSL certificate to provide confidence to the users that
the website is secure. For example: banking website.
SSL certificate provides confidence to the user.
Chapter 11
1. SET
2. TLS
1.SET:
1.1.Introduction
Secure payment systems are critical to the success of E-commerce. There are four
essential security requirements for safe electronic payments (Authentication, Encryption,
Integrity and Non -repudiation). Encryption is the key security schemes adopted for
electronic payment systems, which is used in protocols like SSL and SET.
The SSL protocol, widely deployed today on the Internet, has helped create a basic level
of security sufficient for some hearty souls to begin conducting business over the Web.
SSL is implemented in most major Web browsers used by consumers, as well as in
merchant server software, which supports the seller's virtual storefront in cyberspace.
Hundreds of millions of dollars are already changing hands when cybershoppers enter
their credit card numbers on Web pages secured with SSL technology.
In this sense, SSL provides a secure channel to between the consumer and the merchant
for exchanging payment information. This means any data sent through this channel is
encrypted, so that no one other than these two parties will be able to read it. In other
words, SSL can give us confidential communications, it also introduces huge risks:
! The cardholder is protected from eavesdroppers but not from the merchant. Some
merchants are dishonest: pornographers have charged more than advertised price,
expecting their customers to be too embarrassed to complain. Some others are just
hackers who put up a snazzy illegal Web site and profess to be the XYZ Corp., or
impersonate the XYZ Corp. and collecting credit card numbers for personal use.
! The merchant has not protected from dishonest customers who supply an invalid
credit card number or who claim a refund from their bank without cause. Contrary to
popular belief, it is not the cardholder but the merchant who has the most to lose from
fraud. Legislation in most countries protects the consumer.
What we want here is a protocol very similar to credit card transactions at a local store,
something SSL doesn’t mimic in functionality. SET is the one.
Purpose
Main Entities
1.5.How it Works
Both cardholders and merchants must register with CA (certificate authority) first,
before they can buy or sell on the Internet, which we will talk about later. Once
registration is done, cardholder and merchant can start to do transactions, which
involve 9 basic steps in this protocol, which is simplified.
1.7.SET Cryptography
Overview
Secure Electronic Transactions (SET) relies on the science of cryptography – the
encoding and decoding messages. There are two primary encryption methods in use
today: secret-key cryptography and public-key cryptography. Secret-key cryptography is
impractical for exchanging messages with a large group of previously unknown
correspondents over a public network. For a merchant to conduct transactions securely
with millions of subscribers, each consumer would need a distinct key assigned by that
merchant and transmitted over a separate secure channel. However, by using public-key
cryptography, that same merchant could create a public/private key pair and publish the
public key, allowing any
consumer to send a secure message to that merchant. This is why SET uses both methods
in its encryption process. The secret-key cryptography used in SET is the well-known
Data Encryption Standard (DES), which is used by financial institutions to encrypt PINs
(personal identification numbers). And the public-key cryptography used in SET is RSA.
In the following section, the usage of symmetric (secret-key) and asymmetric (public-
key) key encryption in SET will be discussed.
In SET, message data is encrypted using a randomly generated symmetric key (a DES 56
-bit key). This key, in turn, is encrypted using the message recipient’s public key (RSA).
The result is the so called “digital envelope” of the message. This combines the
encryption speed of DES with the key management advantages of RSA public-key
encryption. After encryption, the envelope and the encrypted message itself are sent to
the recipient. After receiving the encrypted data, the recipient decrypts the digital
envelope first using his or her private key to obtain the randomly generated symmetric
key and then uses the symmetric key to unlock the original message.
This level of encryption, using DES, can be easily cracked using modern hardware. In
1993, a brute-force DES cracking machine was designed by Michael Wiener – one which
was massively parallel. For less than a million dollars, a 56-bit DES key could be cracked
in average time of 3.5 hours. For a billion dollars, a parallel machine can be constructed
that cracks 56-bit DES in a second (Schneier, 1996). Obviously, this is of great concern
since DES encrypts the majority of a SET transaction.
In SET, the public key cryptography is only used to encrypt DES keys and for
authentication (digital signature) but not for the main body of the transaction. In SET, the
RSA modulus is 1024 bits in length (Using the latest facto
ring results it appears that factoring a 1024-bit modulus would require over
100,000,000,000 MY of computational effort). To generate the digital signature, SET
uses a distinct public/private key. Each SET participant possesses two asymmetric key
pairs: a “key exchange” pair, which is used in the process of section key encryption and
decryption, and a “signature” pair for the creation and verification of digital signatures
(160-bit message digests).
The algorithm is such that changing a single bit in the message will change, on average,
half of the bits in the message digest. Approximately, the possibility of two messages
having the same message digest is one in
1,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000, which means it is
computationally unfeasible to generate two different messages that have the same
message digest.
RSA-OAEP
Dual Signatures
A new application of digital signatures is introduced in SET, namely the concept of dual
signatures. Dual signatures is needed when two messages are need to be linked securely
but only one party is allowed to read each. The following picture shows the process of
generating dual signatures.
In SET, dual signatures are used to link an order message sent to the merchant with the
payment instructions containing account information sent to the acquirer (merchant
bank). When the merchant sends an authorization request to the acquirer, it includes the
payment instructions sent to it by the cardholder and the message digest of the order
information. The acquirer uses the message digest from the merchant and computes the
message digest of the payment instructions to check the dual signatures.
1.8.SET Process
Process Steps
The Purpose of the payment initialization is to allow customer to get certificate from the
merchant. The initialization request is represented as PinitReq which carries eight fields
of information (Table 1).
Table 1- Fields in Payment Initialization
Field Information
RRPID Request/Response Pair ID
Language Customer’s Language
LID_C Customer’s Local ID
[LID_M] Merchant’s Local ID
Chall_C Customer’s challenge salt to Merchant’s signature freshness
BrandID Card Brand (VISA, Master etc.)
BIN Bank ID Number
Thumbs Thumbnails (hashes) of of certificates known to Customer
Before two parties use public-key cryptography to conduct business, each wants to be
sure that the other party is authenticated. One way to be sure that the public key belongs
to the right party is to receive it over a secure channel directly from the same place.
However, in most circumstances this solution is not practical.
An alternative to secure transmission of the key is to use a trusted third party to
authenticate that the public key belongs to Alice. Such a party is known as a Certificate
Authority (CA). Because SET participants have two key pairs, theyalso have two
certificates. Both certificates are created and signed at the same time by the Certificate
Authority.
1.9.Certificate of Participants
Cardholder certificates
A certificate is only issued to the cardholder when the cardholder’s issuing financial
institution approves it. By requesting a certificate, a cardholder has indicated the intent to
perform commerce via electronic means. This certificate is transmitted to merchants with
purchase requests and encrypted payment instructions. Upon receipt of the cardholder’s
certificate, a merchant can be assured, at a minimum, that the account number has been
validated by the card-issuing financial institution or its agent. In this specification,
cardholder certificates are optional at the payment card brand’s discretion.
Merchant certificates
Merchant certificates function as an electronic substitute for the payment brand decal that
appears in the store window—the decal itself is a representation that the merchant has a
relationship with a financial institution allowing it to accept the payment card brand.
Because they are digitally signed by the merchant’s financial institution, merchant
certificates cannot be altered by a third party and can only be generated by a financial
institution. These certificates are approved by the acquiring financial institution and
provide assurance that the merchant holds a valid agreement with an Acquirer. A
merchant must have at least one pair of certificates to participate in the SET environment,
but there may be
multiple certificate pairs per merchant. A merchant will have a pair of certificates for
each payment card brand that it accepts.
Payment gateway certificates are obtained by Acquirers or their processors for the
systems that process authorization and capture messages. The gateway’s encryption key,
which the cardholder gets from this certificate, is used to protect the cardholder’s account
information. Payment gateway certificates are issued to the Acquirer by the payment
brand.
Acquirer Certificates
An Acquirer must have certificates in order to operate a Certificate Authority that can
accept and process certificate requests directly from merchants over public and private
networks. Those Acquirers that choose to have the payment card brand process certificate
requests on their behalf will not require certificates because they are not processing SET
messages. Acquirers receive their certificates from the payment card brand.
Issuer Certificates
An Issuer must have certificates in order to operate a Certificate Authority that can accept
and process certificate requests directly from cardholders over public and private
networks. Those Issuers that choose to have the payment card brand process certificate
requests on their behalf will not require certificates because they are not processing SET
messages. Issuers receive their certificates from the payment card brand.
1.10.SET Certificate Hierarchy
Root Signaute
Brand Signaure
Geo-Political Signature
(Optional)
Registration
Participants Registration
As described in section 1, both the cardholder and the merchant have to register with a
CA before they can do transactions. And the registration processes have to be secure
enough, since these two processes involve sensitive details.
Cardholder Registration
This process comprised 6 messages between two parties: cardholder and Issuer (CA).
1. The cardholder initiates request to the CA.
2. After the CA receives message 1 from the cardholder, the CA replies. The message
includes the CA’s public key-exchange key certification signed by root CA, CA’s
signature certificate and the initial request encrypted using CA’s private key.
3. The cardholder request a registration form in this message. He randomly generates a
symmetric key K1, which is used to encrypt the request, and sends this along with a
digital envelop including key K1 and his credit card number.
4. The CA determines the cardholder’s issuing bank by the credit card number and
returns the appropriate the form, which is signed by the CA and along with CA’s
signature certificate.
5. The cardholder generates a public/private signature key pair, two symmetric keys
K2, K3 and a random number S1. He creates a message with his filled registration
form, public key, and K2, and its digital signature. This message is encrypted using
K3 and sent with a digital envelop including K3 and card number.
6. The CA verifies the information, then issue a digital ID to CA. The CA generates a
secret value using the random number S2 generated by the CA and S1. This secret
value, the account number and the expiration date further feed into a one-way
hashing to generate a secret number. The CA signs the certificate includes this secret
number and the cardholder’s public signature key. Then, CA sends this certificate
encrypted using K2 along with and its signature certificate.
This registration process includes 3 steps. The first two messages are about to get CA’s
public key. Once the cardholder has CA’s key-exchange key, he can request a registration
form in message 3 and 4. The certificate is in the last 2 messages.
Merchant Registration
The Merchant’ registration is simpler than cardholder’s, which include 4 messages. The
first two messages are almost same as cardholder’s, except in the second message the
registration form has been sent. The merchant has to generate two public/private key
pairs – one is for signature, the other is for key-exchange—instead of one pair compared
to the cardholder.
Two problems with registration protocol
The registration protocol has been proved to be secure [3]. But there are two risks to
cause insecure. The first is that the cardholder is not required to generate a fresh signature
key pair, but may register an old one. There is a risk that the old one could be
compromised. And another problem is that the secret value generation mentioned above
which is the exclusive-OR of numbers (S1, S2) chosen by two parties. Since exclusive-
OR is invertible, a criminal working for a CA can give every cardholder the same secret
value. This combination introduces some risk that a criminal can impersonate the
cardholder.
These two problems are fixable. The first insecurity can be repaired in the cardholder’s
implementation. The second one can be fixed by replacing exclusive-OR by one-way
hashing.
3.Transport Layer Security(TLS):
The Transport Layer Security (TLS) protocol, Secure Sockets Layer (SSL) protocol,
versions 2.0 and 3.0, and the Private Communications Transport (PCT) protocol are
based on public key cryptography. The Security Channel (Schannel) authentication
protocol suite provides these protocols. All Schannel protocols use a client/server model.
For servers to authenticate to clients, TLS/SSL does not require server keys to be stored
on domain controllers or in a database, such as the Microsoft Active Directory directory
service. Clients confirm the validity of a server’s credentials with a trusted root
certification authority’s (CA’s) certificates, which are loaded when you install Microsoft
Windows Server 2003. Therefore, unless user authentication is required by the server,
users do not need to establish accounts before they create a secure connection with a
server.
TLS and SSL are most widely recognized as the protocols that provide secure HTTP
(HTTPS) for Internet transactions between Web browsers and Web servers. TLS/SSL can
also be used for other application level protocols, such as File Transfer Protocol (FTP),
Lightweight Directory Access Protocol (LDAP), and Simple Mail Transfer Protocol
(SMTP). TLS/SSL enables server authentication, client authentication, data encryption,
and data integrity over networks such as the World Wide Web.
Although there are some slight differences between SSL 3.0 and TLS 1.0, this reference
refers to the protocol as TLS/SSL.
Note
Although their differences are minor, TLS 1.0 and SSL 3.0 are not
interchangeable. If the same protocol is not supported by both parties, the parties
must negotiate a common protocol to communicate successfully.
HMAC produces more secure hashes than the MAC algorithm. The HMAC
produces an integrity check value as the MAC does, but with a hash function
construction that makes the hash much harder to break. For more information
about the HMAC, see “Hash Algorithms in The Handshake Layer in TLS/SSL
Architecture” in How TLS/SSL Works.
In TLS, it is not always necessary to include certificates all the way back to the
root CA. You can use an intermediary authority.
TLS specifies padding block values that are used with block cipher algorithms.
RC4, which is used by Microsoft, is a streaming cipher, so this modification is not
relevant.
Fortezza algorithms are not included in the TLS RFC, because they are not open
for public review. (This is Internet Engineering Task Force (IETF) policy.)
3.4.Benefits of TLS/SSL
TLS/SSL provides numerous benefits to clients and servers over other methods of
authentication, including:
Interoperability
Algorithm flexibility
Ease of deployment
Ease of use
TLS/SSL can help to secure transmitted data using encryption. TLS/SSL also
authenticates servers and, optionally, authenticates clients to prove the identities of
parties engaged in secure communication. It also provides data integrity through an
integrity check value. In addition to protecting against data disclosure, the TLS/SSL
security protocol can be used to help protect against masquerade attacks, man-in-the-
middle or bucket brigade attacks, rollback attacks, and replay attacks.
Interoperability
TLS/SSL works with most Web browsers, including Microsoft Internet Explorer and
Netscape Navigator, and on most operating systems and Web servers, including the
Microsoft Windows operating system, UNIX, Novell, Apache (version 1.3 and later),
Netscape Enterprise Server, and Sun Solaris. It is often integrated in news readers, LDAP
servers, and a variety of other applications.
Algorithm flexibility
TLS/SSL provides options for the authentication mechanisms, encryption algorithms, and
hashing algorithms that are used during the secure session.
Note
Data can be encrypted and decrypted, but you cannot reverse engineer a hash.
Hashing is a one-way process. Running the process backward will not create the
original data. This is why a new hash is computed and then compared to the sent
hash.
Ease of deployment
Ease of use
Because you implement TLS/SSL beneath the application layer, most of its operations
are completely invisible to the client. This allows the client to have little or no knowledge
of the security of communications and still be protected from attackers.
3.5.Limitations of TLS/SSL
Administrative overhead
Many people think of TLS and SSL as protocols that are used with Web browsers to
browse the Internet more securely. However, they are also general purpose protocols that
can be used whenever authentication and data protection are necessary. For example, you
can use TLS/SSL for:
Remote access
SQL access
E-mail
Chapter 12:
1. Timestamping protocol
2. 3-D Secure Protocol
3. E- mail security
Example:
2.1.How it works
If you are enabled for 3D Secure (Verified by Visa and MasterCard SecureCode) you can
be protected from certain "it wasn't me" Chargebacks on credit, and some debit, card
transactions. According to Visa, over 80% of all chargebacks fall into this 'friendly"
fraud-related category. Liability for this kind of chargeback passes from the merchant to
the card issuer, even if the card issuer is not a participating member of the scheme, or if
the cardholder is not enrolled.
2.4.What is it?
3D Secure stands for 3 Domain Secure. The three parties involved in the 3D Secure
process are the following:
1) The Vendor
2) The Acquiring Bank
3) Visa and MasterCard
Please note that 3D secure does not totally eliminate fraud or chargebacks, therefore
merchants should continue to use their anti-fraud systems and security measures
The primary benefit of 3-D Secure for A less tangible, but nevertheless real,
Members is the reduction in disputed benefit is the assurance members can
transactions and the resultant exception provide to their cardholders who are
handling expense and losses. It is expected considering e-commerce transactions.
that nearly 80% of all e-commerce Studies indicate that as many as a third of
chargebacks and fraud, and a substantial cardholders are afraid to shop online due
proportion of customer complaints, could be to security concerns. Authenticated
eliminated with the use of Authenticated Payment may convince prospective
Payment. This will have a positive impact ecommerce shoppers that it is safe to use
on Member profitability. their card online.
3.E-Mail Security:
3.1.Email Security
Electronic mail (email) is perhaps the most popularly used system for exchanging business
information over the Internet (or any other computer network). At the most basic level, the email
process can be divided into two principal components: (1) mail servers, which are hosts that
deliver, forward, and store email; and (2) mail clients, which interface with users and allow users
to read, compose, send, and store email. This document addresses the security issues of mail
servers and mail clients, including Web-based access to mail.
Mail servers and user workstations running mail clients are frequently targeted by attackers.
Because the computing and networking technologies that underlie email are ubiquitous and well-
understood by many, attackers are able to develop attack methods to exploit security weaknesses.
Mail servers are also targeted because they (and public Web servers) must communicate to some
degree with untrusted third parties. Additionally, mail clients have been targeted as an effective
means of inserting malware into machines and of propagating this code to other machines. As a
result, mail servers, mail clients, and the network infrastructure that supports them must be
protected.
Availability of email involves ensuring that mail servers remain on-line and able to
service the user community. A weakness in any one of these three key areas will
undermine the security posture of an email system and open the door to exploitation.
To exchange email with the outside world, a requirement for most organizations,
it is allowed through organizations’ network perimeter defences. At a basic level,
viruses and other types of malware may be distributed throughout an organization
via email. Increasingly, however, attackers are getting more sophisticated and
using email to deliver targeted zero-day attacks in an attempt to compromise
users’ workstations within the organization’s internal network.
Given email’s nature of human to human communication, it can be used as a
social engineering vehicle. Email can allow an attacker to exploit an
organization’s users to gather information or get the users to perform actions that
further an attack.
Flaws in the mail server application may be used as the means of compromising
the underlying server and hence the attached network. Examples of this
unauthorized access include gaining access to files or folders that were not meant
to be publicly accessible, and being able to execute commands and/or install
software on the mail server.
Denial of service (DoS) attacks may be directed to the mail server or its support
network infrastructure, denying or hindering valid users from using the mail
server.
Information within email messages may be altered at some point between the
sender and recipient.
Exchange servers come with useful remote access features such as Outlook Web
Access, Outlook Anywhere, and ActiveSync. These features allow your users to
access their email from any location with an internet connection by using a web
browser, their laptop, or a mobile device such as a smartphone.
This convenience carries with it some security risks, the most obvious being the
risk of password credentials being compromised.
Operating any of these remote access services without SSL means that the
connection, including password credentials, occurs over an unsecured HTTP
connection. HTTP is the protocol that most websites use. It is fast, stable, and
works through just about any firewall. But HTTP has no built in security. Every
bit of data sent over HTTP is unencrypted, so when passwords are sent over
HTTP they are sent “in the clear”, vulnerable to network sniffers.
Because so much of this remote access occurs from untrusted locations such as
free wireless hotspots, it is critical that SSL be used to protect this traffic.
Chapter 13:
1. WAP
2. IP Security
3. Security in GSM and 3G
In 1997, Ericsson, Motorola, Nokia, and Unwired Planet formed the WAP
Forum(www.wapforum.org). More than 90 companies in the wireless
telecommunications business are members of the WAP Forum. WAP is the standard
developed by the WAP Forum, a consortium formed by device manufacturers, service
providers, content providers, and application providers. WAP specifies an application
framework and protocols for wireless devices. WAP is a kind of fusion of mobile
networking technologies and Internet technologies.
In the current Internet model, the client runs a copy of the Web browser, which uses
the underlying Internet protocols to access useful content residing in a server in the
network. Such interactions occur through using HTTP request and reply messages. WAP
is based on an Internet technology that has been optimized to address the constraints of
wireless links and wireless devices. Services created by HTML do not usually fit well on
small handheld wireless devices due to their display HTML. WML pages can be also be
encoded in binary format to reduce the amount of data to be transmitted over the wireless
interface.
The WAP service model reveals the presence of a WAP proxy, which is responsible for
protocol conversion and data formatting. It acts as the interface between the wired and
wireless worlds. These two environments have extreme differences, such as available
bandwidth, bit error rates, and storage and processing capabilities. When a mobile device
requests information via the WAP, it is intercepted and interpreted by the WAP proxy,
which then forwards the request via HTTP on behalf of the mobile device to the
appropriate HTTP server in the network. When the proxy receives the information in
response to its earliest request, the information is stored and converted (formatting) to a
suitable form for processing and display on the mobile device using the WAP protocol.
! The user selects an option on their mobile device that has a URL with WML
content assigned to it.
! The phone sends the URL request via the phone network to a WAP gateway, using
the binary encoded WAP protocol.
! The gateway translates this WAP request into a conventional HTTP request for the
specified URL, and sends it on to the Internet.
! The appropriate Web server picks up the HTTP request.
! The server processes the request, just as it would be any other request. If the URL
refers to a static WML file, the server delivers it. If a CGI script is requested, it is
processed and the content returned as usual.
! The Web server adds the HTTP header to the WML content and returns it to the
gateway.
! The WAP gateway compiles the WML into binary form.
! The gateway then sends the WML response back to the phone.
! The phone receives the WML via the WAP protocol.
! The micro-browser processes the WML and displays the content on the screen.
Low Bandwidth
The size of an average HTML page these days, including graphics, is around 20KB.
With a 56 Kbps modem, the download time for this page would be in the region of 4
seconds. As the bandwidth of a wireless network is around 9.6Kbps, however, the
download time for the data equivalent of just that one page would be around 17
seconds. That is not making any allowances for the network itself being slow due to
congestion, or for latency. The majority of mobile users are not aware of access
speeds, and they should have to care about the differences in access methods to get the
same perception of performance. WAP addresses this bandwidth issue by minimizing
the traffic over the wireless interface. WML and WMLScript are binary encoded into a
compact form before they are transmitted, in order to minimize the bandwidth
restriction.
Less Connection Stability and Unpredictable Bearer Availability
Wired network access provides a more or less reliable connection to the network. That
is not the case in wireless networks, where the bearers might be inaccessible for
shorter or longer periods of time due to fading, lost radio coverage, or deficient
capacity. If you have ever lost a connection when you were driving in your car, you
will know just how frustrating this can be. The architects of the WAP protocol
infrastructure, when putting together the specifications for WAP, have taken the
problem of connection stability into account and have designed into the layers.
Small Display
Instead of using the flat document structure that HTML provides, WML
structures its document in decks and cards. A card is a single unit of
interaction with the end-user, such as a text screen, a selection list, an input
field, or a combination of those. A card is typically small enough to be
displayed even on a small screen. When an application is executed, the user
navigates through a series of cards-the series of cards used for making an
application is collected in a deck.
Wireless devices are usually not equipped with large amounts of memory
or computational power in comparison to desktop computers. The memory
restriction applies to RAM as well as ROM. Even though it is likely that
more memory and more powerful CPUs will be available in the near future,
the relative difference will most probably remain. WAP handles these
restrictions by defining a lightweight protocol stack. The limited set of
functionalities provided by WML and WMLScript makes it possible to
implement browsers that make small claims on computational power and
ROM resources. When it comes to RAM, the binary encoding of WML and
WMLScript helps to keep the amount of RAM used as small as possible.
Development on mobile communication devices. It achieves this through a layered
protocol design, covering protocols at Layer 4 and above. The WAP protocol stack is
independent of the underlying network, which could take the form of GSM, CDMA,
CDPD, iDEN, etc. Hence, WAP is essentially an application stack specification; it is not
network-centric.
Wireless Application Environment (WAE)
WTLS is needed for WAP to ensure data integrity, privacy, authentication, and
protection from denial-of-service. It is based on Transport Layer Security(TLS) 1.0, but
optimized for wireless channels. It provides transport layer security between a WAP
client and the WAP gateway/proxy. Digital certificates are used for authentication and
nonrepudiation of server and client. Encryption is also used to enhance the degree of
confidentiality.
WDP is the transport layer protocol in WAP. It has the same functionality provided
by the Internet User Datagram Protocol(UDP). Whether WAP uses UDP or WDP,
datagram delivery services are provided by port number functionality and the
characteristics of different bearer services are hidden from the upper layers. WDP can
be extended to provide segmentation and reassembly functions.
2.IP Security:
2.1.Introduction to IPsec
IPsec provides security mechanisms that include secure datagram authentication and
encryption mechanisms within IP. When you invoke IPsec, IPsec applies the security
mechanisms to IP datagrams that you have enabled in the IPsec global policy file.
Applications can invoke IPsec to apply security mechanisms to IP datagrams on a per-
socket level.
Figure 1–1 shows how an IP addressed packet, as part of an IP datagram, proceeds when
IPsec has been invoked on an outbound packet. As you can see from the flow diagram,
authentication header (AH) and encapsulating security payload (ESP) entities can be
applied to the packet. Subsequent sections describe how you apply these entities, as well
as authentication and encryption algorithms.
Figure 1–1 IPsec Applied to Outbound Packet Process
An IPsec security association (SA) specifies security properties that are recognized by
communicating hosts. These hosts typically require two SAs to communicate securely. A
single SA protects data in one direction. The protection is either to a single host or a
group (multicast) address. Because most communication is peer-to-peer or client-to-
server, two SAs must be present to secure traffic in both directions.
The security protocol (AH or ESP), destination IP address, and security parameter index
(SPI) identify an IPsec SA. The SPI, an arbitrary 32-bit value, is transmitted with an AH
or ESP packet.. An integrity checksum value is used to authenticate a packet. If the
authentication fails, the packet is dropped.
2.3.Key Management
SAs require keying material for authentication and encryption. The managing of keying
material that SAs require is called key management. The Internet Key Exchange (IKE)
protocol handles key management automatically. You can also manage keys manually
with the ipseckey command. SAs on IPv4 and IPv6 packets can use automatic key
management.
2.4.Protection Mechanisms
The authentication header provides data authentication, strong integrity, and replay
protection to IP datagrams. AH protects the greater part of the IP datagram. AH cannot
protect fields that change non deterministically between sender and receiver. For
example, the IP TTL field is not a predictable field and, consequently, not protected by
AH. AH is inserted between the IP header and the transport header. The transport header
can be TCP, UDP, ICMP, or another IP header when tunnel are being used.
The encapsulating security payload (ESP) header provides confidentiality over what the
ESP encapsulates, as well as the services that AH provides. However, ESP only provides
its protections over the part of the datagram that ESP encapsulates. ESP's authentication
services are optional. These services enable you to use ESP and AH together on the same
datagram without redundancy. Because ESP uses encryption-enabling technology, ESP
must conform to U.S. export control laws.
ESP encapsulates its data, so ESP only protects the data that follows its beginning in the
datagram. In a TCP packet, ESP encapsulates only the TCP header and its data. If the
packet is an IP-in-IP datagram, ESP protects the inner IP datagram. Per-socket policy
allows self-encapsulation, so ESP can encapsulate IP options when ESP needs to. Unlike
the authentication header (AH), ESP allows multiple kinds of datagram protection. Using
only a single form of datagram protection can make the datagram vulnerable. For
example, if you use ESP to provide confidentiality only, the datagram is still vulnerable
to replay attacks and cut-and-paste attacks. Similarly, if ESP protects only integrity, ESP
could provide weaker protection than AH. The datagram would be vulnerable to
eavesdropping.
IPsec uses two types of algorithms, authentication and encryption. The authentication
algorithms and the DES encryption algorithms are part of core Solaris installation. If you
plan to use other algorithms that are supported for IPsec, you must install the Solaris
Encryption Kit. The Solaris Encryption Kit is provided on a separate CD.
Authentication Algorithms
IPsec separates its protection policy from its enforcement mechanisms. You can enforce
IPsec policies in the following places:
On a system-wide level
On a per-socket level
IPsec applies the system-wide policy to incoming datagrams and outgoing datagrams.
You can apply some additional rules to outgoing datagrams, because of the additional
data that is known by the system. Inbound datagrams can be either accepted or dropped.
The decision to drop or accept an inbound datagram is based on several criteria, which
sometimes overlap or conflict. Conflicts are resolved by determining which rule is parsed
first. Except when a policy entry states that traffic should bypass all other policy, the
traffic is automatically accepted. Outbound datagrams are either sent with protection or
without protection. If protection is applied, the algorithms are either specific or non-
specific.
The policy that normally protects a datagram can be bypassed. You can either specify an
exception in the system-wide policy, or you can request a bypass in the per-socket policy.
For intra-system traffic, policies are enforced, but actual security mechanisms are not
applied. Instead, the outbound policy on an intra-system packet translates into an inbound
packet that has had those mechanisms applied.
When you invoke ESP or AH after the IP header to protect a datagram, you are using
transport mode. An example follows. A packet starts off with the following header:
ESP, in transport mode, protects the data as follows:
AH actually covers the data before the data appears in the datagram. Consequently, the
protection that is provided by AH, even in transport mode, covers some of the IP header.
When an entire datagram is inside the protection of an IPsec header, IPsec is protecting
the datagram in tunnel mode. Because AH covers most of its preceding IP header, tunnel
mode is usually performed only on ESP. The previous example datagram would be
protected in tunnel mode as follows:
In tunnel mode, the inner header is protected, while the outer IP header is unprotected.
Often, the outer IP header has different source and different destination addresses from
the inner IP header. The inner and outer IP headers can match if, for example, an IPsec-
aware network program uses self-encapsulation with ESP. Self-encapsulation with ESP
protects an IP header option.
3.GSM Security :
The Purpose of GSM Security: The use of radio communications for transmission to the
mobile subscribers makes GSM Public Land Mobile Networks (PLMN) particularly
sensitive to misuse of their resources by unauthorized persons using manipulated Mobile
Stations, who try to impersonate authorized subscribers and eavesdropping of the various
information, which are exchanged on the radio path. So the security features in GSM
PLMN is implemented to protect:
• Any relevant item from being disclosed at the radio path, mainly in order to ensure the
privacy of user-related information.
Security Features of GSM several security functions were built into GSM to safeguard
subscriber privacy. These include:
• The network received the IMSI and found the correspondent KI of that IMSI.
• The network generated a 128 bit random number (RAND) and sent it to the mobile
station over the air interface.
• The MS calculates a SRES with the A3 algorithm using the given Challenge (RAND)
and the KI residing in the SIM.
• At the same time, the network calculates the SRES using the same algorithm and the
same inputs.
GSM makes use of a ciphering key to protect both user data and signal on the vulnerable
air interface. Once the user is authenticated, the RAND (delivered from the network)
together with the KI (from the SIM) is sent through the A8 ciphering key generating
algorithm, to produce a ciphering key (KC). The A8 algorithm is stored on the SIM card.
The KC created by the A8 algorithm, is then used with the A5 ciphering algorithm to
encipher or decipher the data.
Note that the session key is generated in the SIM card of the Mobil Station. And the
network can use the same set of Ki, RAND and the same algorithm to generate the same
key to decrypt the data. Almost all the GSM operators use one algorithm (called
COMP128) for both authentication and generation of Kc. As will be discussed below.
Encryption of the data Encrypted communication is initiated by a ciphering mode request
command from the GSM network. Upon receipt of this command, the mobile station
begins encryption and decryption of data. Each frame in the over-the-air traffic is
encrypted with a different key-stream. The A5 algorithm used to encrypt the data is
initialized with the KC and the number of the frame to be encrypted, thus generating a
different key stream for every frame. The same KC is used as long as the MSC does not
authenticate the MS again, in which case a new KC is generated. In practice, the same
KC may be in use for days. The MS authentication is an optional procedure in the
beginning of a call, but it is usually not performed. So it is very common the KC will not
change during calls. When it is switched off, the mobile station stores the TMSI on the
SIM card to make sure it is available when it is switched on again. The A5 algorithm is
implemented in the hardware of the mobile phone, as it has to encrypt and decrypt data
on the fly.
1.Authentication Basics:
1.1.AUTHENTICATION:
This error message indicates that the authentication process between your local computer and
the remote host computer has for some reason failed. The most common cause for failed
authentication is an incorrect password, likely caused by a typing mistake.
Also the user name may be incorrect. So it is necessary to check that the typing has been done
correctly.
One possible reason for authentication failure is that the remote host computer may have been
configured to require several authentication methods to be used. For example both password and
public key authentication could be used for increased security. Even if the password is typed
incorrectly, some other required authentication method could have failed. A relatively common
situation is one where the remote host computer is expecting public-key authentication and the
user has not sent the public key to the host. It may also be possible that the user account on the
remote host computer has been disabled or that the remote host computer is having temporary
problems causing errors with the login procedure.
Try to connect again and carefully type in your user name and password. If after a couple of
retries you are sure that you have entered both of them correctly, contact the system
administrator of the remote host computer.
Authentication
Authentication can be stated as the method of validating the identity of genuine or authorized
users.
Something that you know:
The very first and the foremost are your user-id and passwords.
The next can be your personal matters such as your date of birth, your mother’s maiden
name, your pet’s name etc.
These are simple to use and require no special hardware; user-id and password continue to be
the most popular method of authentication.
Something that you have:
Image of person’s face
Retina or iris
Fingerprints
Hand geometry
Digital Signature
Something that you are:
This is the actual physical feature of the user like the fingerprints or the way the user
communicates (Voice) or the way that the user looks (Image) etc. These are the natural qualities
of the user, which cannot be changed or misused even by the user himself.
There are various methods used for this purpose, but the most commonly used one is by way
of login name and passwords. In order to keep your authentication method foolproof, some strict
policies have to be adopted. But, still the authentication failure is one of the ways in which the
intruders can penetrate into the systems.
Firstly the passwords have to be properly designed using all the available rules. Sometimes, if
the password is stored in some user database in clear text, then the intruder can easily intercept it
another example of authentication failure is by way of a fake login program run on a terminal.
One more form of authentication attack may come from the remote login programs. Protocols
like rlogin, telnet is vulnerable to this. If these are available on for your host, intruders may keep
retrying till they are lucky and get a chance to penetrate these systems. Hence, normally it is
advised to turn often-remote login features for added security.
Most of the attacks that take place are as a result of some authentication failure. But
authentication failures or authentication race refers to the tactic of beating a one-time
password scheme that works with many security systems.
Usually a one-time password is a good technique of ensuring that the password even if
intercepted and understood will not have any significance since its not going to be used again.
But even then eavesdroppers can easily pick up a plain password on an unencrypted session and
they may take a shot at single time passwords also.
For this we assume an example of a password that contains only digits and is of known
length. The attacker initiates ten connections to the desired service. Each connection is waiting
for the same unknown password. The valid user connects and starts typing the correct password.
The attack program watches this, and relays the correct characters to its ten connections as
they arc typed. When anyone digit remains to be entered, the program sends a different digit to
each of its connections, before the valid user can type the last digit. Because the computer is
faster, it wins the race, and one of the connections is validated. These authentication schemes
often allow only a single login with each password, so the valid user will be rejected, and will
have to try again. Of course, in this case the attacker needs to know the length of the password.
Masquerader
Misfeasor
Clandestine user
Varying levels of capability
2.2.Intrusion Techniques:
initial access
privilege escalation
covering tracks
Password Guessing:
success depends on password chosen by user surveys show many users choose poorly.
2.3.Password Capture:
extracting recorded info after successful login (web history/cache, last number
dialed etc)
2.4.Password Management:
2.5.Password Study:
Managing Passwords:
Education:
2.6.Computer Generated:
if random likely not memorisable, so will be written down (sticky label syndrome)
2.7.Reactive Checking:
note that good dictionaries exist for almost any language/interest group
2.8.Proactive checking:
part of CCITT X.500 directory service standards
distributed servers maintaining user info database
defines framework for authentication services
directory may store public-key certificates
with public key of user signed by certification authority
also defines authentication protocols
uses public-key crypto & digital signatures
algorithms not standardised, but RSA recommended
X.509 certificates are widely used
3.2.X.509 Certificates:
issued by a Certification Authority (CA), containing:
version (1, 2, or 3)
serial number (unique within CA) identifying certificate
signature algorithm identifier
issuer X.500 name (CA)
period of validity (from - to dates)
subject X.500 name (name of owner)
subject public-key info (algorithm, parameters, key)
issuer unique identifier (v2+)
subject unique identifier (v2+)
extension fields (v3)
signature (of hash of all fields in certificate)
notation CA<<A>> denotes certificate for A signed by CA
Obtaining a Certificate:
any user with access to CA can get any certificate from it
only the CA can modify a certificate
because cannot be forged, certificates can be placed in a public directory
CA Hierarchy:
if both users share a common CA then they are assumed to know its public key
otherwise CA's must form a hierarchy
use certificates linking members of hierarchy to validate other CA's
each CA has certificates for clients (forward) and parent (backward)
each client trusts parents certificates
enable verification of any certificate from one CA by users of all other CAs in hierarchy
Certificate Revocation:
certificates have a period of validity
may need to revoke before expiry, eg:
1. user's private key is compromised
CA’s maintain list of revoked certificates
1. the Certificate Revocation List (CRL)
users should check certificates with CA’s CRL
Authentication Procedures:
X.509 includes three alternative authentication procedures:
One-Way Authentication
Two-Way Authentication
Three-Way Authentication
all use public-key signatures
One-Way Authentication:
1 message ( A->B) used to establish
the identity of A and that message is from A
message was intended for B
integrity & originality of message
message must include timestamp, nonce, B's identity and is signed by A
may include additional info for B
eg session key
Two-Way Authentication:
2 messages (A->B, B->A) which also establishes in addition:
the identity of B and that reply is from B
that reply is intended for A
integrity & originality of reply
reply includes original nonce from A, also timestamp and nonce from B
may include additional info for A
Three-Way Authentication:
3 messages (A->B, B->A, A->B) which enables above authentication without synchronized clocks
has reply from A back to B containing signed copy of nonce from B
means that timestamps need not be checked or relied upon
2.3.X.509 Version 3:
has been recognised that additional information is needed in a certificate
email/URL, policy details, usage constraints
rather than explicitly naming new fields defined a general extension method
extensions consist of:
extension identifier
criticality indicator
extension value
Certificate Extensions:
key and policy information
convey info about subject & issuer keys, plus indicators of certificate policy
certificate subject and issuer attributes
support alternative names, in alternative formats for certificate subject and/or issuer
certificate path constraints
allow constraints on use of certificates by other CA’s
Chapter 15
1. Security handshake pitfalls
2. Single Sign On (SSO)
3. Biometric authentication
During the handshake phase communication parameters are negotiated and initial
information are exchanged. Some of these information are secret (e.g. the password), some
are not (e.g. the user names).
To cope with different types of threats individual protocols have different strengths and
weaknesses.
· Computational power
· Specialized hardware
Many protocols were designed for environments where eavesdropping was not a concern.
Authentication in such protocols consist of :
2. Bob verifies the name and password, and then communication commences, without any
further attention to security.
A very common enhancement to such a protocol is to replace the transmission of the clear
text password with a cryptographic challenge /response.
This would be a big improvement over clear text passwords. An eavesdropper cannot
impersonate Alice based on overhearing the exchange, since next time there will be a different
challenge.
This protocol has only minor security differences from the previous one:
– This protocol requires reversible cryptography, for example a secret key cryptographic
algorithm.
This modification requires Bob and Alice to have synchronized clocks. The properties of this
modification include:
– It can be added very easily to a protocol designed for sending cleartext passwords, since is
does not add any additional messages.
– The protocol is now more efficient. The server does not have to keep any transient status
information about Alice.
– Someone eavesdropping can use Alice’s K (albeit only within a small time interval).
– Another potential security pitfall occurs if there are multiple servers for which Alice uses
the same secret K AB: an eavesdropper who acts quickly can use Alice’s encrypted
timestamp field, and impersonate Alice on a different server.
– They require a secret key cryptography algorithm, and therefore shared secret keys.
Theses weaknesses can be avoided if the protocol is based on public key technology.
The above protocol is based on a public key and similar to the first protocol. Bob verifies
Alice’s signature [ R] login if the result matches R. using her public key , and accepts the Alice .
– Reading Bob’s database at is no longer a potential security- threat, but it must be protected
from unauthorized modification.
– If you can impersonate Bob’s network address you can trick Alice into signing something (wait
for Alice to try log in and then give her your quantity ).
Properties of this protocol:
– If you can impersonate Bob’s network address you can trick Alice into decrypting something
(wait for Alice to try log in and send the encrypted message ).
Solution:
– A message should have a structure so that it cannot be mistaken for another type .
Lamport’s Hash:
Requirements:
· username,
Initialization of a password:
Authentication of a user:
– The workstation computes hash n-1 (Password) and sends the result to Bob.
– Bob takes the received value and hashes it once, and compares it with its database. In case
of a match Bob considers the response valid , replaces the stored quantity with the received
quantity, and replaces n by n-1 .
– In many situations it suffices to choose a new password, compute hash (new Password),
and transmit hash (new Password) and n to Bob.
– An enhancement is to add a salt value to the password (like in the UNIX- Password
environment), with the same advantages.
– Another advantage of salt is that Alice will not need to change her password if n = 1. n n
Single Sign On (SSO) (also known as Enterprise Single Sign On or "ESSO") is the ability for a
user to enter the same id and password to logon to multiple applications within an enterprise. As
passwords are the least secure authentication mechanism, single sign on has now become known
as reduced sign on (RSO) since more than one type of authentication mechanism is used
according to enterprise risk models.
For example, in an enterprise using SSO software, the user logs on with their id and password.
This gains them access to low risk information and multiple applications such as the enterprise
portal. However, when the user tries to access higher risk applications and information, like a
payroll system, the single sign on software requires them to use a stronger form of
authentication. This may include digital certificates, security tokens, smart cards, biometrics or
combinations thereof.
Single sign on can also take place between enterprises using federated authentication. For
example, a business partner's employee may successfully log on to their enterprise system. When
they click on a link to your enterprise's application, the business partner's single sign on system
will provide a security assertion token to your enterprise using a protocol like SAML, Liberty
Alliance, WS Federation or Shibboleth. Your enterprise's SSO software receives the token,
checks it, and then allows the business partner's employee to access your enterprise application
without having to sign on.
Single sign on federated authentication also works with your employees. For example, an
employee who is trying to access your outsourced benefits supplier to update their benefits
information would click on the benefits link on your intranet. Your enterprise's single sign on
software would then send a security assertion token to the benefits supplier. The benefits
supplier's SSO system would then take the token, check it and grant access to your employee
without making them sign on.
Since the internet is stateless, this means that the single sign on software must check every
request by the user's browser to see if there is an authentication policy pertaining to the resource
or application the user is trying to access. In a medium to large enterprise, this means that every
time the user clicks on a different URL, there is traffic between the user's browser, the web or
application servers and the security server. This traffic can become large and cumbersome from a
performance perspective. Therefore, most modern single sign on systems use LDAP
(Lightweight Directory Access Protocol) directories to store the authentication and authorization
policies. The LDAP directories are made for high performance lookups thus addressing the high
traffic load. Further, the LDAP directories are often the source for the single sign on system to
authenticate against.
Single sign on systems in medium to large enterprises can become a single point of enterprise
failure if not properly designed. If the single sign on system goes down but the applications
remain up, no user can access any resource or application protected by the SSO system. Many
enterprises have experienced this painful condition resulting in productivity loss. Therefore, it is
essential that your enterprise single sign on system have a good and well tested failover and
disaster recovery design.
Finally, single sign on systems in medium to large enterprises requires good identity data
governance. Enterprise security features being offered by the single sign on system is only as
good as the underlying identity data. Thus it is critical that all enterprise identity data have good,
quick business processes that pick up on any change to the identity such as new identity creation,
identity termination or role changes. Without this, enterprise SSO systems are vulnerable to
creating enterprise security holes.
Login Serve
Single Sign-On Application Programming Interface (API)
Login Server
The first time that a user seeks access to an application, the Login Server:
To guard against sniffing, the Login Server can send the login cookie to the client browser over
an encrypted SSL channel.
The login cookie expires with the session, either at the end of a time interval specified by the
administrator, or when the user exits the browser. It is never written to disk.
A partner application can expire its session through its own explicit logout.
Applications to communicate with the Login Server and to accept a user's identity as
validated by the Login Server
Administrators to manage the application's association to the Login Server
There are two kinds of applications to which Single Sign-On provides access:
Partner Applications
External Applications
Partner Applications
Partner applications are integrated with the Login Server. They contain a Single Sign-On API
that enables them to accept a user's identity as validated by the Login Server.
External Applications
External applications are web-based applications that retain their authentication logic. They do
not delegate authentication to the Login Server and, as such, require a user name and password to
provide access. Currently, these applications are limited to those which employ an HTML form
for accepting the user name and password. The user name may be different from the SSO user
name, and the Login Server provides the necessary mapping.
Local user Uses a lookup table within the Login Server schema. This table contains
authentication user name, password, Login Server privilege level, and other auditing fields
for the user. The incoming password is one-way hashed and compared to the
entry in the table.
External repository Typically relies on an LDAP-compliant directory. In this case, the Login
authentication Server binds to the LDAP-compliant directory, then looks up the user
credentials stored there. External Authentication includes LDAP and
Database Authentication and any others that may be custom-developed.
Whenever a user accesses either a partner application or an external application, the Login
Server first authenticates that user.
When a user seeks access to a partner application, the following steps occur:
1. Protected URLs need to check for an application session cookie for authorization.
2. If no application session cookie exists, then the browser redirects the user to the
Single Sign-On server.
1. This URL must establish an application session cookie using the identity
information sent by the Single Sign-On server.
You can accessing an external application through Oracle Portal. In this scenario, Oracle Portal
functions as a partner application.
When a user seeks access to an external application by way of Oracle Portal, Single Sign-On
authenticates the user to Oracle Portal through this process:
If, during the same session, the user again seeks access to Oracle Portal, then the Login Server
does not prompt the user for user name and password. Instead, it obtains that information from
the login cookie on the client browser.
Single Sign-On uses the process described in the next figure under these conditions:
Single Sign-On uses the process described in the next figure if the user:
Of course, one-time password tokens can be lost as well as potentially hacked so relying on
"something they have" is not always a foolproof approach.
Instead, an even more secure two-factor system can be based on "something they are" – that is,
biometric information derived from measurable biological or behavioral characteristics.
Common biological characteristics used for enterprise authentication are fingerprints, palm or
finger vein patterns, iris features, and voice or face patterns. These last three involve no physical
contact with a biometric sensor, which makes them less intrusive to use.
Behavioral characteristics such as keystroke dynamics – a measure of the way that a user types,
analyzing features such as typing speed and the amount of time they "dwell" on a given key –
can also be used to authenticate a user.
The biggest growth area is the deployment of systems that make use of a Smartphone as a
portable biometric sensor, according to Ant Allan, a research vice president at Gartner. "There is
an explosion in the choice of authentication methods open to organizations, and we are certainly
seeing a shift towards biometric systems that take advantage of sensors in mobile devices – the
camera, for face or iris recognition, the microphone for voice recognition, and the keyboard for
typing rhythm," he said.
The advantages of this Smartphone-based approach are that it is not necessary to purchase any
special biometric hardware, because users are likely to have their phone with them any time they
need to log on to a system, and the phone's cellular or Wi-Fi connectivity can be used to transmit
biometric information to a back-end authentication system.
The main benefit of using a biometric authentication factor instead of a physical token is that
biometrics can't easily be lost, stolen, hacked, duplicated, or shared. They are also resistant to
social engineering attacks – and since users are required to be present to use a biometric factor, it
can also prevent unethical employees from repudiating responsibility for their actions by
claiming an imposter had logged on using their authentication credentials when they were not
present.
"Biometric systems can be much more convenient than tokens and other systems, and are useful
to augment existing security methods like passwords," said Alan Goode, a security analyst at
Goode Intelligence. "For added security they are also sometimes used as a third factor," he
added.
The main drawback of any biometric system is that it can never be 100 percent accurate. To use
a biometric system, it is first necessary for each user to enroll by providing one or more samples
of the biometric in question (such as a fingerprint) which is used to make a "template" of that
biometric. When a user attempts to authenticate, the biometric they provide is then compared
with their stored template. The system then assesses whether the sample is similar enough to the
template to be judged to be a match.
A measure of a system's accuracy is commonly provided by two statistics: False Non Match Rate
(FNMR) and False Match Rate (FMR). The former measures how often a biometric is not
matched to the template when it should be, while the latter measures how often a false biometric
is matched (and authentication is allowed) when it shouldn't be. Most biometric systems can be
"tuned" to reduce one of these two measurements, usually at the expense of the other. "It's
important to understand that when a user supplies a password or a number from an OTP (one
time password) token, it is either correct or it isn’t. With biometrics you never get a definitive
yes or no," explained Mark Diodati, a Gartner analyst.
1. Cost. The purpose of implementing any biometric system is generally to maintain the same
level of security at lower cost, or to improve security at a reasonable cost. The cost of
implementing a biometric system will depend on whether biometric authentication can be added
to your existing authentication infrastructure using standards such as BioAPI (vendors such as
Entrust support fingerprint readers as authenticators on their platform), or whether your entire
authentication platform has to be replaced, or whether you decide to use an additional biometric
authentication system in parallel with your existing one.
An alternative approach could be to use biometrics to access a single sign-on system that then
accesses your existing authentication system(s).
Other factors include the cost of sensors such as fingerprint readers or iris scanners that have to
be purchased. This drawback obviously does not apply with biometric system that use smart
phones as sensors.
2. Biometric type and security. Different biometric systems provide different levels of security
as measured by FNMR and FMR scores – and with the current state of technology, a good
fingerprint reader generally offers a lower FNMR and FMR (and therefore "better security") than
non-contact technologies such as voice or face recognition.
But before rejecting any biometric type on the grounds that its FNMR and FMR scores are too
high, it is important to consider what level of security you really need a biometric system to
provide. A biometric system that you plan to use as the single factor for authentication needs to
offer more security than a system that you plan to use as a second or third factor.
It's also important to take into account the environment the biometric authentication system will
be used in. For example, fingerprint readers do not work well in environments where users'
fingers are likely to be dirty. Similarly, voice recognition systems are not a good match for
excessively noisy environments.
3. Anti-spoofing measures. One potential problem with biometric factors is that they are not
"secrets" in the way that passwords or tokens are. This means that it could be possible for a
hacker to present a photograph to fool a facial recognition system, to present a wax cast of a
fingerprint to a reader, or to play back a recording of a voice to a voice recognition system. It
may even be possible to intercept the biometric data from the reader and replay it later,
bypassing the biometric sensor. Before purchasing any biometric technology, be sure to
understand what types of anti-spoofing measures it employs.
Vendors tackle this problem in a number of ways. For example, some voice recognition systems
require users to authenticate by asking them to speak a series of random words, preventing them
from using a previously recorded voice sample. Similarly, face recognition systems may attempt
to detect blinking to ascertain that the image in front of the camera is not a photograph.
Sophisticated fingerprint readers also measure heat or electrical conductivity to establish that the
finger is "alive."
5. Compatibility with operating systems and devices. Make sure any biometric system you are
considering works with every operating system in your organization that will use it. The same
goes for mobile devices such as tablets and cell phones.
6. Ease of management. When evaluating a biometric authentication system, make sure to pay
particular attention to how easily the system can be managed using the management software
provided to you by the vendor. It's particularly important to investigate how easily you can enroll
large numbers of users into the system.
# 7. Integration with directory systems: It's advisable to consider if the system can integrate
easily with Active Directory or any other LDAP directory system you use. If not, does it use its
own directory system, and how practical would it be for you to use it?