Module 1
Module 1
MODULE 1
Introduction:
This is the age of universal electronic connectivity, where the activities like hacking,
viruses, electronic fraud are very common. Unless security measures are taken, a network
conversation or a distributed application can be compromised easily.
Information security has been affected by two major developments over the last several
decades. First one is introduction of computers into organizations and the second one being
introduction of distributed systems and the use of networks and communication facilities for
carrying data between users & computers. These two developments lead to ‘computer security’
and ‘network security’, where the computer security deals with collection of tools designed to
protect data and to thwart hackers. Network security measures are needed to protect data during
transmission. But keep in mind that, it is the information and our ability to access that
information that we are really trying to protect and not the computers and networks.
Information Security: It can be defined as “measures adopted to prevent the unauthorized use,
misuse, modification or denial of use of knowledge, facts, data or capabilities”. Three aspects of
IS are:
Security Attack:
1
CRYPTOGRAPHY NETWORK SECURITY
security attacks by making use of one or more security mechanisms to provide the
service.
Security Attacks
Security attacks can be classified in terms of Passive attacks and Active attacks as per X.800 and
RFC 2828
Interruption
Examples:
Destruction of some hardware
Jamming wireless signals
Disabling file management systems
Interception
Sender Receiver
S R
H
2
CRYPTOGRAPHY NETWORK SECURITY
Hacker
3
CRYPTOGRAPHY NETWORK SECURITY
Modification:
S R
When an unauthorized party gains access and tampers an asset. Attack is on Integrity.
Examples:
Changing data file
Altering a program and the contents of a message
Fabrication
S R
Examples:
Hackers gaining access to a personal email and sending message
Insertion of records in data files
Insertion of spurious messages in a network
Passive Attacks
4
CRYPTOGRAPHY NETWORK SECURITY
A Passive attack attempts to learn or make use of information from the system, but does not
affect system resources.
Two types:
Release of message content
It may be desirable to prevent the opponent from learning the contents (i.e sensitive or
confidential info) of the transmission.
5
)
Traffic analysis
A more subtle technique where the opponent could determine the location and identity of
communicating hosts and could observe the frequency & length of encrypted messages being
exchanged there by guessing the nature of communication taking place.
Passive attacks are very difficult to detect because they do not involve any alternation of the
data. As the communications take place in a very normal fashion, neither the sender nor receiver
is aware that a third party has read the messages or observed the traffic pattern. So, the emphasis
in dealing with passive attacks is on prevention rather than detection.
Active Attacks
Active attacks involve some modification of the data stream or creation of a false
stream. An active attack attempts to alter system resources or affect their operation.
Four types:
Masquerade: Here, an entity pretends to be some other entity. It usually includes one of the
other forms of active attack.
Replay: It involves the passive capture of a data unit and its subsequent retransmission to
produce an unauthorized effect.
Modification of messages: It means that some portion of a legitimate message is altered, or
that messages are delayed to produce an unauthorized effect.
Ex: “John’s acc no is 2346” is modified as “John’s acc no is 7892”
Denial of service: This attack prevents or inhibits the normal use or management of
communication facilities.
Ex: a: Disruption of entire network by disabling it
b: Suppression of all messages to a particular destination by a third party.
Active attacks present the opposite characteristics of passive attacks. Whereas passive
attacks are difficult to detect, measures are available to prevent their success. On the other hand,
it is quite difficult to prevent active attacks absolutely, because of the wide variety of potential
physical, software and network vulnerabilities. Instead, the goal is to detect active attacks and to
recover from any disruption or delays caused by them.
Security Services:
Security Mechanisms:
According to X.800, the security mechanisms are divided into those implemented in a
specific protocol layer and those that are not specific to any particular protocol layer or security
service. X.800 also differentiates reversible & irreversible encipherment mechanisms. A
reversible encipherment mechanism is simply an encryption algorithm that allows data to be
encrypted and subsequently decrypted, where as irreversible encipherment include hash
algorithms and message authentication codes used in digital signature and message
authentication applications
Security Level: The marking bound to a resource (which may be a data unit) that names
or designates the security attributes of that resource.
Event Detection: It is the process of detecting all the events related to network security.
Security Audit Trail: Data collected and potentially used to facilitate a security audit,
which is an independent review and examination of system records and activities.
Security Recovery: It deals with requests from mechanisms, such as event handling and
management functions, and takes recovery actions.
Data is transmitted over network between two communicating parties, who must
cooperate for the exchange to take place. A logical information channel is established by
defining a route through the internet from source to destination by use of communication
protocols by the two parties. Whenever an opponent presents a threat to confidentiality,
7
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
authenticity of information, security aspects come into play. Two components are present in almost
all the security providing techniques.
A security-related transformation on the information to be sent making it unreadable by
the opponent, and the addition of a code based on the contents of the message, used to
verify the identity of sender.
Some secret information shared by the two principals and, it is hoped, unknown to the
opponent. An example is an encryption key used in conjunction with the transformation
to scramble the message before transmission and unscramble it on reception
A trusted third party may be needed to achieve secure transmission. It is responsible for
distributing the secret information to the two parties, while keeping it away from any opponent.
It also may be needed to settle disputes between the two parties regarding authenticity of a
message transmission. The general model shows that there are four basic tasks in designing a
particular security service:
Various other threats to information system like unwanted access still exist. The
existence of hackers attempting to penetrate systems accessible over a network remains a
concern. Another threat is placement of some logic in computer system affecting various
applications and utility programs. This inserted code presents two kinds of threats.
Information access threats intercept or modify data on behalf of users who should not
have access to that data
Service threats exploit service flaws in computers to inhibit use by legitimate users
Viruses and worms are two examples of software attacks inserted into the system by means
of a disk or also across the network. The security mechanisms needed to cope with unwanted
access fall into two broad categories
8
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Placing a gatekeeper function, which includes a password-based login
methods that provide access to only authorized users and screening logic to
detect and reject worms, viruses etc
An internal control, monitoring the internal system activities analyzes the
stored information and detects the presence of unauthorized users or intruders.
Plaintext can refer to anything which humans can understand and/or relate to. This may
be as simple as English sentences, a script, or Java code. If you can make sense of what is
written, then it is in plaintext.
9
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Example: We will encrypt a sentence using Caesar Cipher. The key is 7, which means
the letter a becomes h.
S.N
O Encryption Decryption
1
0
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
S.N
O Encryption Decryption
The same algorithm with The only single algorithm is used for
the same key is used for encryption-decryption with a pair of
the encryption- keys where each use for encryption
6. decryption process. and decryption.
1
1
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
1
2
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Components of a Cryptosystem
Types of Cryptosystems
Fundamentally, there are two types of cryptosystems based on the manner in which
encryption-decryption is carried out in the system −
Symmetric Key Encryption
BLOWFISH.
1
3
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Prior to 1970, all cryptosystems employed symmetric key encryption. Even today, its
relevance is very high and it is being used extensively in many cryptosystems. It is very
unlikely that this encryption will fade away, as it has certain advantages over asymmetric
key encryption.
The salient features of cryptosystem based on symmetric key encryption are −
Persons using symmetric key encryption must share a common key prior to exchange of
information.
Keys are recommended to be changed regularly to prevent any attack on the system.
A robust mechanism needs to exist to exchange the key between the communicating
parties. As keys are required to be changed regularly, this mechanism becomes expensive
and cumbersome.
In a group of n people, to enable two-party communication between any two persons, the
number of keys required for group is n × (n – 1)/2.
Length of Key (number of bits) in this encryption is smaller and hence, process of
encryption-decryption is faster than asymmetric key encryption.
Processing power of computer system required to run symmetric algorithm is less.
1
4
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
communication between online seller and customer. These limitations of symmetric key
encryption gave rise to asymmetric key encryption schemes.
Asymmetric Key Encryption was invented in the 20 th century to come over the necessity of
pre-shared secret key between communicating persons. The salient features of this
encryption scheme are as follows −
Every user in this system needs to have a pair of dissimilar keys, private key and public
key. These keys are mathematically related − when one key is used for encryption, the
other can decrypt the ciphertext back to the original plaintext.
It requires to put the public key in public repository and the private key as a well-guarded
secret. Hence, this scheme of encryption is also called Public Key Encryption.
Though public and private keys of the user are related, it is computationally not feasible to
find one from another. This is a strength of this scheme.
When Host1 needs to send data to Host2, he obtains the public key of Host2 from
repository, encrypts the data, and transmits.
Host2 uses his private key to extract the plaintext.
1
5
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Length of Keys (number of bits) in this encryption is large and hence, the process of
encryption-decryption is slower than symmetric key encryption.
Processing power of computer system required to run asymmetric algorithm is higher.
Symmetric cryptosystems are a natural concept. In contrast, public-key cryptosystems are
quite difficult to comprehend.
You may think, how can the encryption key and the decryption key are ‘related’, and yet it
is impossible to determine the decryption key from the encryption key? The answer lies in
the mathematical concepts. It is possible to design a cryptosystem whose keys have this
property. The concept of public-key cryptography is relatively new. There are fewer
public-key algorithms known than symmetric algorithms.
Due to the advantages and disadvantage of both the systems, symmetric key and public-key
cryptosystems are often used together in the practical information security systems.
1
6
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Cryptography:
1
7
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Substitution Technique:
1. Caesar Cipher
2. Monoalphabetic Cipher
3. Playfair Cipher
4. Hill Cipher
5. Polyalphabetic Cipher
6. One-Time Pad
Caesar Cipher
This the simplest substitution cipher by Julius Caesar. In this substitution technique,
to encrypt the plain text, each alphabet of the plain text is replaced by the alphabet three
places further it. And to decrypt the cipher text each alphabet of cipher text is replaced by
the alphabet three places before it.
1
8
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Look at the example above, we have replaced, ‘m’ with ‘p’ which occur three
places after, ‘m’. Similarly, ‘e’ is replaced with ‘h’ which occurs in three places after ‘e’.
Note: If we have to replace the letter ‘z’ then the next three alphabets counted after
‘z’ will be ‘a’ ‘b’ ‘c’. So, while counting further three alphabets if ‘z’ occurs it circularly
follows ‘a’.
There are also some drawbacks of this simple substitution technique. If the hacker
knows that the Caesar cipher is used then to perform brute force cryptanalysis, he has only
to try 25 possible keys to decrypt the plain text.
The hacker is also aware of the encryption and decryption algorithm.
Monoalphabetic Cipher
Monoalphabetic cipher is a substitution cipher, where the cipher alphabet for each
plain text alphabet is fixed, for the entire encryption.
In simple words, if the alphabet ‘p’ in the plain text is replaced by the cipher
alphabet ‘d’. Then in the entire plain text wherever alphabet ‘p’ is used, it will be replaced
by the alphabet ‘d’ to form the ciphertext.
Playfair Cipher
Playfair cipher is a substitution cipher which involves a 5X5 matrix. Let us discuss
the technique of this Playfair cipher with the help of an example:
Key: KEYWORD
Now, we have to convert this plain text to ciphertext using the given key. We will
discuss the further process in steps.
Step 1: Create a 5X5 matrix and place the key in that matrix row-wise from left to
right. Then put the remaining alphabets in the blank space.
1
9
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Note: If a key has duplicate alphabets, then fill those alphabets only once in the
matrix, and I & J should be kept together in the matrix even though they occur in the given
key.
Step 2: Now, you have to break the plain text into a pair of alphabets.
Pair: me et me to mo rx ro wz
Note
Pair of alphabets must not contain the same letter. In case, pair has the same letter
then break it and add ‘x’ to the previous letter. Like in our example letter ‘rr’ occurs in pair
so, we have broken that pair and added ‘x’ to the first ‘r’.
In case while making pair, the last pair has only one alphabet left then we add ‘z’
to that alphabet to form a pair as in our above example, we have added ‘z’ to ‘w’ because
‘w’ was left alone at last.
If a pair has ‘xx’ then we break it and add ‘z’ to the first ‘x’, i.e. ‘xz’ and ‘x_’.
Step 3: In this step, we will convert plain text into ciphertext. For that, take the first
pair of plain text and check for cipher alphabets for the corresponding in the matrix. To
find cipher alphabets follow the rules below.
Note
2
0
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
If both the alphabets of the pair occur in the same row replace them with the
alphabet to their immediate right. If an alphabet of the pair occurs at extreme right then
replace it with the first element of that row, i.e. the last element of the row in the matrix
circularly follows the first element of the same row.
If the alphabets in the pair occur in the same column, then replace them with the
alphabet immediate below them. Here also, the last element of the column circularly
follows the first element of the same column.
If the alphabets in the pair are neither in the same column and nor in the same
row, then the alphabet is replaced by the element in its own row and the corresponding
column of the other alphabet of the pair.
Pair: me et me to mo rx ro wz
Cipher Text: kn ku kn kz ks ta kc yo
So, this is how we can convert a plain text to ciphertext using Playfair cipher. When
compared with monoalphabetic cipher Playfair cipher is much more advanced. But still, it
is easy to break.
Hill Cipher
Hill cipher is a polyalphabetic cipher introduced by Lester Hill in 1929. Let us
discuss the technique of hill cipher.
Key: HILL
Choose the key in such a way that it always forms a square matrix. With HILL as
the key, we can form a 2×2 matrix.
Now, of plain text, you have to form a column vector of length similar to the key
matrix. In our case, the key matrix is 2×2 then the column vectors of plain text would be
2×1.
The general equation to find cipher text using hill cipher is as follow:
C = KP mod 26
2
1
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Now, we have to convert the key matrix and plain text matrices into numeric
matrices. For that number the alphabets such as A=0, B=1, C=2, …………, Z=25. So,
considering the alphabet numbering:
In the first calculation, we would get two cipher alphabets for plain text alphabet
‘B’ & ‘I’.
2
2
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
So, the cipher alphabet for plain text alphabet ‘B’ & ‘I’ is ‘T’ & ‘V’. Similarly, we
have to calculate ciphertext for remaining plain text. And then accumulate them to form the
ciphertext.
Polyalphabetic Cipher
Polyalphabetic cipher is far more secure than a monoalphabetic cipher. As
monoalphabetic cipher maps a plain text symbol or alphabet to a ciphertext symbol and
uses the same ciphertext symbol wherever that plain text occurs in the message.
But polyalphabetic cipher, each time replaces the plain text with the different ciphertext.
One-Time Pad
The one-time pad cipher suggests that the key length should be as long as the
plain text to prevent the repetition of key. Along with that, the key should
be used only once to encrypt and decrypt the single message after that the key should be
discarded.
Onetime pad suggests a new key for each new message and of the same length as a
new message. Now, let us see the one-time pad technique to convert plain text into
ciphertext. Assume our plain text and key be:
2
3
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Key: Cipher
Now again convert the plain text and key into the numeric form. For that number
the alphabets such as A=0, B=1, C=2, …………, Z=25. So, our plain text and key in
numeric form would be:
Plain text: 1 8 13 0 17 24
Key: 2 8 15 7 4 17
Now, you have to add the number of the plain text alphabet, to the number of its
corresponding key alphabet. That means, for this example, we will add:
B+C = 1+2 = 2
I+I = 8+8 = 16
N+P = 13+15 = 28
A+H = 0+7 = 7
R+E = 17+4 = 21
Y+R = 24+17 = 41
The resultant ciphertext numbers we get are (2, 16, 28, 7, 21, 41)
If the addition of any plain text number and the key number is >26, then subtract
only that particular number from 26. We have the addition of two pair of plain text number
and a key number, greater than 26, i.e. N+P=28 & Y+R=41.
N+P = 28 – 26 = 2
Y+R = 41 – 26 = 15
So, the final ciphertext numbers are (2, 16, 2, 7, 21, 1). Now convert this number
to alphabets assuming A to be numbered 0 and B to be 1…..Z to 25.
Ciphertext: Cqchvb.
In this way, we can convert plain text to cipher text using a one-time pad.
So, this is all about the substitution cipher techniques. It has a monoalphabetic
cipher and polyalphabetic cipher technique. Substitution technique is also called classical
substitution technique.
2
4
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Transposition Techniques
Looking at the image, you would get it why it got named rail fence because it
appears like the rail fence.
Once you have written the message as a sequence of diagonals, to obtain the cipher
text out of it you have to read it as a sequence of rows. So, reading the first row the first
half of cipher text will be:
memtmro
reading the second row of the rail fence, we will get the second half of the cipher
text:
eteoorw
Now, to obtain the complete cipher text combine both the halves of cipher text and
the complete cipher text will be:
Cipher Text: M E M T M R O E T E O O R W
Rail fence cipher is easy to implement and even easy for a cryptanalyst to break this
technique. So, there was a need for a more complex technique.
2
5
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Step 1: The plain text is written in the rectangular matrix of the initially defined
size in a row by row pattern.
Step 2: To obtain the cipher text read the text written in a rectangular matrix
column by column. But you have to permute the order of column before reading it column
by column. The obtained message is the cipher text message.
To understand the columnar transposition let us take an example:
Now, to obtain the cipher text we have to read the plain text column by column as
the sequence of permuted column order. So, the cipher text obtained by the columnar
transposition technique in this example is:
Step 1: The plain text is written in the rectangle of predetermined size row by row.
Step 2: To obtain the cipher text, read the plain text in the rectangle, column by
column. Before reading the text in rectangle column by column, permute the order of
columns the same as in basic columnar technique.
Step 3: To obtain the final cipher text repeat the steps above multiple time.
2
6
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Now after the first round the cipher text obtained is as follow:
So, the obtained cipher text for round 2 is MOOTRTREOEMW. In this way, we
can perform as many iterations as requires. Increasing the number of iterations increases
the complexity of the techniques.
What Is Steganography?
2
7
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
from the Greek words steganos, which means “covered” or “hidden,” and graph, which
means “to write.” Hence, “hidden writing.”
You can use steganography to hide text, video, images, or even audio data. It’s a
helpful bit of knowledge, limited only by the type of medium and the author’s imagination.
Since the computer description of an image contains multiple bits, images are
frequently used as a cover source in digital steganography.
2
8
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
It's a method to
conceal the fact that
Expl communication is taking It's a method for making
anation place information unintelligible
Maintain
Aim communication security Enable data protection
Optional, but
increases security when
Key utilized Necessary prerequisite
Data
Visibility No Yes
2
9
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
Cryptographic Attacks
The basic intention of an attacker is to break a cryptosystem and to find the
plaintext from the ciphertext. To obtain the plaintext, the attacker only needs to find out the
secret decryption key, as the algorithm is already in public domain.
Hence, he applies maximum effort towards finding out the secret key used in the
cryptosystem. Once the attacker is able to determine the key, the attacked system is
considered as broken or compromised.
Based on the methodology used, attacks on cryptosystems are categorized as
follows −
Ciphertext Only Attacks (COA) − In this method, the attacker has access to a
set of ciphertext(s). He does not have access to corresponding plaintext. COA is said to be
successful when the corresponding plaintext can be determined from a given set of
ciphertext. Occasionally, the encryption key can be determined from this attack. Modern
cryptosystems are guarded against ciphertext-only attacks.
Known Plaintext Attack (KPA) − In this method, the attacker knows the
plaintext for some parts of the ciphertext. The task is to decrypt the rest of the ciphertext
using this information. This may be done by determining the key or via some other method.
The best example of this attack is linear cryptanalysis against block ciphers.
Chosen Plaintext Attack (CPA) − In this method, the attacker has the text of his
choice encrypted. So he has the ciphertext-plaintext pair of his choice. This simplifies his
task of determining the encryption key. An example of this attack is differential
cryptanalysis applied against block ciphers as well as hash functions. A popular public key
cryptosystem, RSA is also vulnerable to chosen-plaintext attacks.
Dictionary Attack − This attack has many variants, all of which involve
compiling a ‘dictionary’. In simplest method of this attack, attacker builds a dictionary of
ciphertexts and corresponding plaintexts that he has learnt over a period of time. In future,
when an attacker gets the ciphertext, he refers the dictionary to find the corresponding
plaintext.
Brute Force Attack (BFA) − In this method, the attacker tries to determine the
key by attempting all possible keys. If the key is 8 bits long, then the number of possible
keys is 28 = 256. The attacker knows the ciphertext and the algorithm, now he attempts all
the 256 keys one by one for decryption. The time to complete the attack would be very
high if the key is long.
Birthday Attack − This attack is a variant of brute-force technique. It is used
against the cryptographic hash function. When students in a class are asked about their
birthdays, the answer is one of the possible 365 dates. Let us assume the first student's
3
0
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
birthdate is 3rd Aug. Then to find the next student whose birthdate is 3 rd Aug, we need to
enquire 1.25*√365 ≈ 25 students.
Similarly, if the hash function produces 64 bit hash values, the possible hash values
are 1.8x1019. By repeatedly evaluating the function for different inputs, the same output is
expected to be obtained after about 5.1x109 random inputs.
If the attacker is able to find two different inputs that give the same hash value, it is
a collision and that hash function is said to be broken.
Man in Middle Attack (MIM) − The targets of this attack are mostly public key
cryptosystems where key exchange is involved before communication takes place.
o Host A wants to communicate to host B, hence requests public key of B.
o An attacker intercepts this request and sends his public key instead.
o Thus, whatever host A sends to host B, the attacker is able to read.
o In order to maintain communication, the attacker re-encrypts the data after
reading with his public key and sends to B.
o The attacker sends his public key as A’s public key so that B takes it as if it is
taking it from A.
Side Channel Attack (SCA) − This type of attack is not against any particular
type of cryptosystem or algorithm. Instead, it is launched to exploit the weakness in
physical implementation of the cryptosystem.
Timing Attacks − They exploit the fact that different computations take different
times to compute on processor. By measuring such timings, it is be possible to know about
a particular computation the processor is carrying out. For example, if the encryption takes
a longer time, it indicates that the secret key is long.
Power Analysis Attacks − These attacks are similar to timing attacks except that
the amount of power consumption is used to obtain information about the nature of the
underlying computations.
Fault analysis Attacks − In these attacks, errors are induced in the cryptosystem
and the attacker studies the resulting output for useful information.
The concept of key range and key-size are related to each other. Key Range is total
number of keys from smallest to largest available key. An attacker usually is armed with
the knowledge of the cryptographic algorithm and the encrypted message, so only the
actual key value remains the challenge for the attacker.
• If the key is found, the attacker can get original plaintext message. In the brute force
attack, every possible key in the key-range is tried, until we get the right key.
• In the best case, the right key is found in the first attempt, in the worst case, the key is
found in the last attempt. On an average, the right key is found after trying half of the
possible keys in the key-range. Therefore by expanding the key range to a large extent,
3
1
CRYPTOGRAPHY NETWORK SECURITY
NETWORKSecurity (Unit-1)
longer it will take for an attacker to find the key using brute-force attack.
• The concept of key range leads to the principle of key size. The strength of a
cryptographic key is measured with the key size
• Key size is measured in bits and is represented using binary number system. Thus if the
key range from 0 to 8, then the key size is 3 bits or in other words we can say if the size is
bits then the key range is 0 to 256. Key size may be varying, depending upon the
applications and the cryptographic algorithm being used, it can be 40 bits, 56 bits, 128 bits
& so on. In order to protect the cipher-text against the brute-force attack, the key-size
should be such that the attacker can not crack it within a specified amount of time.
• From a practical viewpoint, a 40-bit key takes about 3 hours to crack, however a 41-bit
key would take 6 hours and 42-bit key would take 12 hours & so on. This means every
additional bit doubles the amount of time required to crack the key. We can assume that
128 bit key is quite safe, considering the capabilities of today’s computers. However as the
computing power and techniques improve, these numbers will change in future.
3
2