Computer & Network Security Solve
Computer & Network Security Solve
Network Security
Dn(x)=(x-n) mod\ 26
(Decryption Phase with shift n)
Example:
Text: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Shift: 23
Cipher: XYZABCDEFGHIJKLMNOPQRSTUVW
Dn(x)=(x*n-1) mod\ 12
(Decryption Phase with shift n)
Symmetric cryptography uses the same Asymmetric uses both public and
secret (private) key to encrypt and private key.
decrypt its data.
Data integrity:
- The assurance that data received are exactly as sent by an authorized
entity, i.e. contain (no modification, no insertion, no deletion, no replay).
- Protection from active attacks.
Non-repudiation:
- Protection against denial by one of the entities involved in a
communication of having participated in the communication.
- Nonrepudiation can be related to:
- Origin: proof that the message was sent by the specified party
- Destination: proof that the message was received by the specified party
Availability services:
- Protects a system to ensure its availability
- Particularly, it addresses denial-of-service attacks
- Depends on other security services: access control, authentication, etc.
6. How can a plaintext can be converted into cipher text? Give
example.
There are two transformations in which a plain text can be converted to obtain cipher
text: Substitution transformation and Transposition transformation.
Substitution Transformation: Substitution is done either by replacing a
character by another character a number of places away from it in the
collating sequence or by table lookup.
We will assume the 26 letters are arranged circularly and we replace a
character by the fourth character following it in the collating sequence. In
other words, A is replaced be E, B by F, …., Y by C and Z by D. Suppose a
plain text is:
AQUICKFOXJUMPST
Applying this method, the transformed plain text is:
EUYMGOJSBNYQTWX
AQUICKFOXJUMPST
Plaintext: This is the original intelligible data that is given to the algorithm
as an input.
Secret Key: The secret key is also input to the encryption algorithm. The key
is a value independent of the plaintext. The algorithm will produce a different
output depending on the specific key being used at the time. The exact
substitutions and transformations performed by the algorithm depend on the
key.
Block Cipher Converts the plain text Stream Cipher Converts the plain text
into cipher text by taking plain text’s into cipher text by taking 1 byte of plain
block at a time. text at a time.
Block cipher uses either 64 bits or more While stream cipher uses 8 bits.
than 64 bits.
Block cipher Uses confusion as well as While stream cipher uses only
diffusion. confusion.
The algorithm modes which are used in The algorithm modes which are used in
block cipher are: ECB (Electronic Code stream cipher are: CFB (Cipher
Book) and CBC (Cipher Block Feedback) and OFB (Output
Chaining). Feedback).
The plain text characters are placed horizontally and the cipher text is created with
vertical format as: holewdlo lr. Now, the receiver has to use the same table to
decrypt the cipher text to plain text.
Block cipher modes: A block cipher processes the data blocks of fixed size.
Usually, the size of a message is larger than the block size. Hence, the long message
is divided into a series of sequential message blocks, and the cipher operates on
these blocks one at a time. Main block cipher modes of operation:
- Electronic codebook mode (ECB)
- Cipher block chaining (CBC)
- Cipher feedback (CFB)
- Output feedback (OFB)
- Counter mode (CTR)
Cipher text only attack (COA): In this method, the attacker has access to a
set of cipher text(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 cipher text. Occasionally, the encryption key can be
determined from this attack. Modern cryptosystems are guarded against
cipher text-only attacks.
Known plain-text attack (KPA): In this method, the attacker knows the
plaintext for some parts of the cipher text. The task is to decrypt the rest of
the cipher text 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 plain-text attack (CPA): In this method, the attacker has the text
of his choice encrypted. So he has the cipher text-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.
Brute-force attack:
- A brute-force attack is a very simple attack.
- Attacker uses a list of passwords and executes such operation.
- Attacker tries every password from the list to login.
- Attacker gain access to the victim’s account, if it recognizes the right
password otherwise failed.
Man-in-the-middle attack:
- Probably, the attacker can change the communications between two
parties.
- The attacker makes an independent connection with the victim.
- Attacker can see or broadcast the messages between sender & receiver.
- Attacker can use the revealed information for some illegal activities.
Replay attack:
- The attacker captures each piece of traffic between two parties and re-
transmits it constantly.
- Attacker can easily fool the participants by replaying the transactions.
- As a result, participants think that they have completed the operation.
Differential Crypt-Analysis:
- This types of attacks are against block algorithms like DES, AES, etc.
- The first aim of this attack is to find the ‘key’.
- Attacker checks numerous messages of plain text into their converted
cipher text.
- The attacker chooses the plain text to look at the transformation.
Dictionary attack:
- Attacker makes a dictionary of cipher texts and their corresponding
plain texts.
- Attacker tries to find the corresponding plain text with the help of the
dictionary.
Side-channel attack:
- This attack is occurred in the victim’s PC or Laptop.
- Used to collect data through the plain-text, power consumption, sound,
any secret key being processed, etc.
- It is used to help the attacker to verify the secret key.
Passive attack: A Passive attack attempts to learn or make use of information from
the system but does not affect system resources. Passive Attacks are in the nature of
overhearing on or monitoring of transmission.
Several Types of Passive attacks are as following:
Traffic analysis:
- Attacker tries to predict the nature of communication by using
information.
- Information such as analyzing traffic, identify communication hosts,
and frequency of messages.
13. Define encryption. State the applications of the public key crypto
system.
Encryption: Encryption is the process of converting plaintext to cipher text.
Or, Encryption is the method by which information is converted into secret code
that hides the information's true meaning.
Or, Encryption is a technique employed for keeping sensitive and private
information safe, such as passwords, identity information, credit card details.
The applications of the public key crypto system: Public-key cryptosystem is
one in which messages encrypted with one key can only be decrypted with a
second key, and vice versa.
The applications for public-key cryptosystem can classified as follows:
Encryption/Decryption: Content is encrypted using an individual’s public
key and can only be decrypted with the individual’s private key.
Digital signature: In this sender encrypt the plain text using his own private
key. This step will make sure the authentication of the sender because
receiver can decrypt the cipher text using senders pubic key only.
Key exchange: If the sender and receiver wish to exchange encrypted
messages, each must be equipped to encrypt messages to be sent and decrypt
messages received. The nature of the equipping they require depends on the
encryption technique they might use.
Public key is slower than private key. It is faster than public key.
In public key cryptography, two keys In this, the same key (secret key) and
are used, one key is used for encryption algorithm is used to encrypt and decrypt
and while the other is used for the message.
decryption.
In public key cryptography, one of the In private key cryptography, the key is
two keys is kept as a secret. kept as a secret.
In this cryptography, public key can be In this cryptography, the key is private.
public and private key is private.
16. Differentiate public key and conventional encryption.
The public key can be shared freely to The same secret key is shared by the
anyone while the private key is kept sender and the recipient and must be
secret and is known only to the kept secret all the times.
recipient.
It is more secure because the secret key It is less secure because the same secret
is only known to the receiver and there key is shared by both the sender and the
are infinite numbers of possibilities for recipient.
keys.
The session key used for the duration For each end system or user, there is
of a logical connection, such as a frame unique master key that it shares with
relay connection or transport the key distribution center.
connection and then discarded.
It uses one way hashes. It does not use one way hashes.
Data Encryption Standard: DES encryption method was first proposed by IBM
in 1975 and standardized in 1977. DES works by using the same key to encrypt and
decrypt a message, so both the sender and the receiver must know and use the same
private key.
The Data Encryption Standard is a block cipher, meaning a cryptographic key and
algorithm are applied to a block of data simultaneously rather than one bit at a time.
DES is an implementation of a Feistel Cipher. It uses 16 round Feistel structure. The
block size is 64-bit. DES uses a 64-bit key, but eight of those bits are used for parity
checks, effectively limiting the key to 56-bits. General structure of DES is depicted
in the following illustration-
Since DES is based on the Feistel Cipher, all that is required to specify DES is:
- Round function
- Key schedule
- Any additional processing − Initial and final permutation.
DES transforms blocks of 64 bits corresponding to binary encoding of ASCII
characters of message text. The algorithm uses exclusive OR operation defined by:
AB = A .B + B .A ; where is the exclusive OR operator.
With faster computers DES key can be broken by exhaustive search. It is not secure
and has been replaced by Triple DES which uses DES algorithm thrice with three
different 56-bit keys. 3 DES is quite secure.
DES algorithm step: DES takes 64-bit plain text and turns it into a 64-bit cipher
text. The algorithm process breaks down into the following steps:
1) The process begins with the 64-bit plain text block getting handed over to an
initial permutation (IP) function.
2) The initial permutation (IP) is then performed on the plain text.
3) Next, the initial permutation (IP) creates two halves of the permuted block,
referred to as Left Plain Text (LPT) and Right Plain Text (RPT).
4) Each LPT and RPT goes through 16 rounds of the encryption process.
5) Finally, the LPT and RPT are rejoined, and a Final Permutation (FP) is
performed on the newly combined block.
6) The result of this process produces the desired 64-bit cipher text.
The encryption process step (step 4) is further broken down into five stages:
1) Key transformation
2) Expansion permutation
3) S-Box permutation
4) P-Box permutation
5) XOR and swap.
For decryption, we use the same algorithm, and we reverse the order of the 16 round
keys.
DES AES
DES stands for Data Encryption AES stands for Advanced Encryption
Standard. Standard.
DES was designed by IBM in 1976. AES was designed by Vincent Rijmen
and Joan Daemen in 1999.
The design rational for AES is closed. The design rational for AES is open.
The selection process for this is secret. The selection process for this is secret
but accepted open public comment.
DES can encrypt 64 bits of plaintext. AES can encrypt 128 bits of plaintext.
DES cipher is derived from Lucifer AES cipher is derived from square
cipher. cipher.
23. What was the final set of criteria used by NIST to evaluate
candidate AES cipher?
The final set of criteria used by NIST to evaluate candidate AES cipher are:
General security: to access general security, NIST replied on the public
security analysis conducted by the cryptographic community.
Software implementations: the principle concerns in this category are
execution speed, performance across a variety of platforms and variation of
speed with key size.
Hardware implementations: like software, hardware implementation can be
optimized for speed or size. However, in the case of h/w, size translate much
more directly into cost than is usually the case for s/w implementations.
Attacks on implementations: the criteria of general security, discuss in the
first bullet is concerned with cryptanalytic attacks that exploit mathematical
properties of the algorithm.
Encryption vs decryption: this criterion deals with several issues related to
considerations of both encryption and decryption.
Key agility: refers to the ability to change key quickly with a minimum
resource.
Potential for instruction-level parallelism.
Other versatility and flexibility.
28. What are the differences between weak and strong collision
resistance?
The differences between weak and strong collision resistance given below:
33. What is firewall and what are its limitations? Why corporate
house implement more than one firewall for security?
Firewall: A firewall is a network security device, either hardware or software-
based, which monitors all incoming and outgoing traffic and based on a defined set
of security rules it accepts, rejects or drops that specific traffic.
Or, a firewall is a crucial component of securing your network and is designed to
address the issues of data integrity or traffic authentication and confidentiality of
your internal network.
Limitations of firewall: Firewalls do have the following limitations:
A firewall cannot prevent users or attackers with modems from dialing in to
or out of the internal network, thus bypassing the firewall and its protection
completely.
Firewalls cannot enforce our password policy or prevent misuse of
passwords. Our password policy is crucial in this area because it outlines
acceptable conduct and sets the ramifications of noncompliance.
Firewalls are ineffective against non-technical security risks such as social
engineering.
Firewalls cannot stop internal users from accessing websites with malicious
code, making user education critical.
Firewalls cannot protect us from poor decisions.
Firewalls cannot protect us when our security policy is too lax.
Corporate house implement more than one firewall for security because:
In a topology with a single firewall serving both internal and external users (LAN
and WAN), it acts as a shared resource for these two zones. Due to limited
computing power, a denial of service attack on the firewall from WAN can disrupt
services on the LAN.
In a topology with two firewalls, you protect internal services on the LAN from
denial of service attacks on the perimeter firewall.
And for this corporate houses implement more than one firewall for security.
Of course, having two firewalls will also increase administrative complexity - you
need to maintain two different firewall policies + backup and patching.
word A: 01 23 45 67
word B: 89 ab cd ef
word C: fe dc ba 98
word D: 76 54 32 10
Step 4: Processing message in 16-word block
- MD5 uses the auxiliary functions which take the input as three 32-bit
number and produces a 32-bit output. These functions use logical
operators like OR, XOR, NOR.
The content of four buffers are mixed with the input using this auxiliary buffer and
16 rounds are performed using 16 basic operations.
Performance:
- MD5 codes any stream of bytes into a 128-bit value while SHA1
codes any stream of bytes into a 160-bit value. Therefore, the SHA1
will provide more security compared to MD5.
- MD5 is broken, one can generate a collision, so MD5 should not be
used for any security applications. SHA1 is not known to be broken
and is believed to be secure, other than that. So, MD5 is faster but has
128-bit output, while SHA1 has 160-bit output.
MD5 SHA/SHA1
MD5 stands for Message Digest. It was SHA stands for Secure Hash
presented in the year 1992. Algorithm. It was presented in the year
1995.
MD5 can have 128 bits length of SHA can have 160 bits length of
message digest. message digest.
The speed of MD5 is fast in The speed of SHA is slow in
comparison of SHA’s speed. comparison of MD5’s speed.
To make out the initial message the In SHA it’ll be 2160 that makes it quite
aggressor would want 2128 operations troublesome to seek out.
whereas exploitation the MD5
algorithmic program.
MD5 is simple than SHA1. SHA1 is more complex than MD5.
MD5 provides indigent or poor it provides balanced or tolerable
security. security.
In MD5, if the assailant needs to seek in SHA1, assailant would need to
out the 2 messages having identical perform 280 operations which is greater
message digest then assailant would than MD5.
need to perform 264 operations.
Architecture:
Architecture or IP Security Architecture covers the general concepts,
definitions, protocols, algorithms and security requirements of IP Security
technology.
ESP protocol:
ESP (Encapsulation Security Payload) provide the confidentiality service.
Encapsulation Security Payload is implemented in either two ways:
- ESP with optional Authentication.
- ESP with Authentication.
Encryption algorithm:
Encryption algorithm is the document that describes various encryption
algorithm used for Encapsulation Security Payload.
AH protocol:
AH (Authentication Header) Protocol provides both Authentication and
Integrity service. Authentication Header is implemented in one way only:
Authentication along with Integrity.
Authentication algorithm:
Authentication Algorithm contains the set of the documents that describe
authentication algorithm used for AH and for the authentication option of
ESP.
DOI (Domain of Interpretation):
DOI is the identifier which support both AH and ESP protocols. It contains
values needed for documentation related to each other.
Key management:
Key Management contains the document that describes how the keys are
exchanged between sender and receiver.
Solution:
YA = αXA mod q
= 52 mod 11
= 25 mod 11
=3
YB = αXB mod q
= 53 mod 11
= 125 mod 11
=4
KA = (YA)XB mod q
= 33 mod 11
= 27 mod 11
=5
KB = (YB)XA mod q
= 42 mod 11
= 16 mod 11
=5
41. Users A & B use the Diffie-Hellman key exchange technique with a
common prime q=71 and a primitive root α =7
(i) If user A has private key 𝐗 𝐀 = 5, what is the A’s public key 𝐘𝐀 ?
(ii) If user B has private key 𝐗 𝐁 = 12 what is the B’s public key 𝐘𝐁 ?
(iii) What is the shared secret key?
Solution:
i) YA = αXA mod q
= 75 mod 71
= 16807 mod 71
= 51
KB = (YB)XA mod q
= 45 mod 71
= 1024 mod 71
= 30
i)
S/MIME: It stands for Secure/Multipurpose Internet Mail Extensions.
S/MIME is a protocol for the secure exchange of e-mail and attached documents
originally developed by RSA Security.
In this, public key cryptography is used for digital sign, encrypt or decrypt the email.
User acquires a public-private key pair with a trusted authority and then makes
appropriate use of those keys with email applications. S/MIME provides the
following cryptographic security services for electronic messaging applications:
- Authentication
- Message integrity
- Non-repudiation of origin (using digital signatures)
- Privacy
- Data security (using encryption).
Working principle:
- The body portion of an SMTP message is structured and formatted.
- Uses the RSA public key cryptography algorithm along with the DES
encryption algorithm.
- The MIME body section consists of a message in PKCS #7 format that
contains an encrypted form of the MIME body parts.
- The MIME content type for the encrypted data is application/pkcs7-
mime.
S/MIME is gaining in popularity in the enterprise because its key management
facilities are implemented as a hierarchical public key infrastructure (PKI) scheme.
ii)
E-mail security: Email security refers to the collective measures used to secure the
access and content of an email account or service
Or, Email security is a term for describing different procedures and techniques for
protecting email accounts, content, and communication against unauthorized access,
loss or compromise. Email is often used to spread malware, spam and phishing
attacks.
Email Security Features: Email security services provide various types of email
security solutions. Some of the principal email security features are as follows:
- Spam Filters
- Anti-virus Protection
- Image & Content Control
- Data Encryption.
Email security services: Growing use of e-mail communication for important and
crucial transactions demands provision of certain fundamental security services as
the following –
Confidentiality: E-mail message should not be read by anyone but the
intended recipient.
Authentication: E-mail recipient can be sure of the identity of the sender.
Integrity: Assurance to the recipient that the e-mail message has not been
altered since it was transmitted by the sender.
Non-repudiation: E-mail recipient is able to prove to a third party that the
sender really did send the message.
Proof of submission: E-mail sender gets the confirmation that the message is
handed to the mail delivery system.
Proof of delivery: Sender gets a confirmation that the recipient received the
message.
Prevention of email security: From an individual/end user standpoint, proactive
email security measures include:
- Strong passwords
- Password rotations
- Spam filters
- Desktop-based anti-virus/anti-spam applications
- Anti-Phishing
- Data Loss Prevention
- Account Takeover Prevention.
iii)
Encapsulating Security Payload (ESP): ESP provides confidentiality, data
integrity, encryption, authentication and anti-replay.
Or, An ESP is a protocol within the IPsec for providing authentication, integrity and
confidentially of network packets data/payload in IPv4 and IPv6 networks.
ESP is implemented in either two ways:
- ESP with optional Authentication.
- ESP with Authentication.
Process of ESP: One can apply ESP in two ways-
Transport mode:
- The ESP header follows the IP header of the original IP datagram.
- If the datagram has an IPsec header, then the ESP header goes before
it.
- ESP trailer and the optional authentication data follow the payload.
- Hosts use ESP in transport mode.
Tunnel mode:
- Creates a new IP header and uses it as the outermost IP header of the
datagram.
- If use both encryption and authentication, ESP completely protects the
original datagram.
- ESP trailer and the optional authentication data are appended payload.
- Gateway must use ESP in tunnel mode.
The ESP Header is designed to provide several different services including the
following:
- Confidentiality of datagrams through encryption
- Authentication of data origin through the use of public key encryption
- Anti-replay services through the same sequence number mechanism as
provided by the Authentication Header
- Limited traffic flow confidentiality through the use of security
gateways.
iv)
Steganography: The word Steganography is derived from two Greek words-
‘stegos’ meaning ‘to cover’ and ‘grayfia’, meaning ‘writing’, thus translating to
‘covered writing’, or ‘hidden writing’.
Steganography is a method of hiding secret data, by embedding it into an audio,
video, image or text file.
Or, Steganography is the technique of hiding secret data within an ordinary, non-
secret, file or message in order to avoid detection; the secret data is then extracted at
its destination. The use of steganography can be combined with encryption as an
extra step for hiding or protecting data.
Cryptography and steganography are both methods used to hide or protect secret
data. However, they have many difference:
- Cryptography makes the data unreadable, or hides the meaning of the
data, while steganography hides the existence of the data.
- In cryptography, people can read it, but won’t understand what it
means. While steganography would hide the letter inside a pair of
socks that would be gifting the intended recipient of the letter.
- In cryptography, if someone either knows or figures out your secret
language, then our message can easily be read. But in steganography,
the intended recipient knows what to look for, and finds the message
hidden in them.
Steganography techniques: Different technique are used in steganography.
- Character marking.
- Invisible ink
- Pin punctures.
- Typewriter correction ribbon.
Advantages over cryptography:
- The primary advantage of using steganography is to hide data over
encryption.
- It helps obscure the fact that there is sensitive data hidden in the file or
other content.
- Helps to obscure the presence of the secure channel.
Steganography software: Some online steganography software tools include:
- Xiao Steganography, used to hide secret files in BMP images or WAV
files.
- Image Steganography, a Java-script tool that hides images inside other
image files.
- Crypture, a command line tool that is used to perform steganography.
v)
Elliptic curve cryptography (ECC): Elliptic curve cryptography is used to
implement public key cryptography.
In 1985, cryptographic algorithms were proposed based on elliptic curves. An
elliptic curve is the set of points that satisfy a specific mathematical equation.
Elliptic Curve Cryptography (ECC) is an approach to public-key cryptography,
based on the algebraic structure of elliptic curves over finite fields. ECC requires a
smaller key as compared to non-ECC cryptography to provide equivalent security.
For a better understanding of Elliptic Curve Cryptography, it is very important to
understand the basics of Elliptic Curve. An elliptic curve is a planar algebraic curve
defined by an equation of the form:
y2 = x3 + ax + b
Where ‘a’ is the co-efficient of x and ‘b’ is the constant of the equation.
The curve is non-singular; that is its graph has no cusps or self-intersections (when
the characteristic of the Co-efficient field is equal to 2 or 3). Elliptic curves could
intersect almost 3 points when a straight line is drawn intersecting the curve. The
elliptic curve is symmetric about the x-axis; this property plays a key role in the
algorithm.
Use of ECC:
- Websites make extensive use of ECC to secure customers’ hypertext
transfer protocol connections.
- It is used for encryption by combining the key agreement with a
symmetric encryption scheme.
- It is also used in several integer factorization algorithms like Lenstra
elliptic-curve factorization.
- Time stamping uses an encryption model called a blind signature
scheme. It is possible using Elliptic Curve Cryptography.
vi)
Feistel cipher: The Feistel Cipher is a structure used to create block ciphers.
Or, in cryptography, a Feistel cipher is a symmetric structure used in the
construction of block ciphers. It’s also known as Luby–Rackoff block cipher. In a
Feistel cipher, encryption and decryption are very similar operations, and both
consist of iteratively running a function called a "round function" a fixed number
of times. DES is just one example of a Feistel Cipher.
Feistel cipher algorithm:
Create a list of all the Plain Text characters.
Convert the Plain Text to ASCII and then 8-bit binary format.
Divide the binary Plain Text string into two halves: left half (L1) and right
half (R1)
Generate a random binary keys (K1 and K2) of length equal to the half the
length of the Plain Text for the two rounds.
First Round of Encryption:
a) Generate function f1 using R1 and K1 as follows:
f1= XOR (R1, K1)
b) Now the new left half(L2) and right half(R2) after round 1 are as
follows:
R2= XOR (f1, L1)
L2=R1
Second Round of Encryption:
a) Generate function f2 using R2 and K2 as follows:
f2= XOR (R2, K2)
b) Now the new left half(L2) and right half(R2) after round 1 are as
follows:
R3= XOR (f2, L2)
L3=R2
Concatenation of R3 to L3 is the Cipher Text
Same algorithm is used for decryption to retrieve the Plain Text from the
Cipher Text.
Design features:
Feistel cipher was based on the structure proposed by Shannon.
Shannon structure has an alternate implementation of diffusion and
confusion to obtain cipher text block.
Feistel cipher structure has alternate application substitution and
permutation on plain text block to obtain cipher text block.
Feistel block cipher operates on each block independently.
The encryption and decryption algorithm in Feistel cipher is the same.
The key used for encryption and decryption is the same but the sequence of
application of sub-key is reversed.
During encryption a plain text block undergoes multiple rounds. But the
function performed in each round is same.
Generally, 16 rounds are performed in Feistel cipher.
Typical block size of Feistel cipher is 64-bit but modern block cipher uses
128-bit block.
Typical key size of Feistel cipher is 64-bit but modern block cipher has 128-
bit key size.
vii)
X.509 Authentication Format: X.509 is a standard defining the format of public-
key certificates. X.509 certificates are used in many Internet protocols, including
TLS/SSL, which is the basis for HTTPS, the secure protocol for browsing the web.
Structure of X.509:
Version number: This field defines the version of X.509 of the certificates.
The version number started from at 0.
Serial number: This field defines a number assigned to each certificate. The
value is unique for each certificate issuer.
Signature algorithm ID: This field identifies the algorithm used to sign the
certificate. Any parameter that is needed for the signature is also defined in
this field.
Issuer name: This field identifies the certification authority that issued the
certificate.
Validity period: This field defines the earliest time and the latest time the
certificate is valued.
Subject period: This field defines the entity to which the public key belongs.
It is also a hierarchy of strings.
Subject public key: This field defines owner’s key, the heart of the
certificate.
Issuer unique identifier: This optional field allows two issuers to have the
same issuer field value if the issuer unique identifiers are different.
Subject unique identifier: This optional field allow two different subjects to
have the same subject field value, if the subject unique identifiers are different.
Extension: This optional field allows issuer to add more private information
to the certificate.
Signature: This made of their sections. The first section contains all other
field is in the certificate. The second section contains the digest of first section
and the third section contains the algorithm identifier used to create the second
section.
Applications of X.509: Common applications of X.509 certificates include:
- SSL/TLS and HTTPS for authenticated and encrypted web browsing
- Signed and encrypted email via the S/MIME protocol
- Code signing
- Document signing
- Client authentication
- Government-issued electronic ID.
viii)
Public key infrastructure: PKI is a framework that enables the encryption of public
keys and includes their affiliated crypto-mechanisms.
A PKI supports the distribution and identification of public encryption keys,
enabling users and computers to both securely exchange data over networks such as
the Internet and verify the identity of the other party.
PKI used for:
- Establishing the identity of endpoints on a network
- Encrypting the flow of data via the network’s communication
channels.
PKI is applied:
- Secure Browsing (via SSL/TLS)
- Securing Email (signing and encrypting messages)
- Secure Code-signing
- Network Security
- File Security (via Encrypted File Systems).
The Components of an Ideal PKI:
- Public and Private Keys
- Public Key Certificates
- Certificate Repository
- Certificate Authority (CA)
- Registration Authority (RA)
- Key encryption and storage facilities
- Software to manage and automate PKI operations.
Working principle of PKI:
- When a browser wishes to establish a secure communication channel
with a web server, it requests the server to present its public key.
- The server possesses an asymmetric public key; whose copy it presents
to the browser.
- The browser generates a ‘session key’, a symmetric key that is
encrypted using the public key that the server provided. This session
key is then passed to the server.
- The web server, which has a unique copy of a private key, uses the
private key to decrypt the session key. If it is able to do this, the
browser takes it as proof that the server is safe to communicate with,
and an encrypted channel is opened.
ix)
PGP: PGP stands for Pretty Good Privacy. PGP is a cryptographic method that lets
people communicate privately online.
Or, PGP is an open source software package that is designed for the purpose of
email security. It provides the basic or fundamental needs of cryptography.
It uses public key cryptography, symmetric key cryptography, hash function, and
digital signature. The following are the services offered by PGP:
- Authentication
- Confidentiality
- Compression
- Email Compatibility
- Segmentation.
Working of PGP:
- Hash of the message is calculated. (MD5 algorithm)
- Resultant 128-bit hash is signed using the private key of the sender
(RSA Algorithm).
- The digital signature is concatenated to message, and the result is
compressed.
- A 128-bit symmetric key, KS is generated and used to encrypt the
compressed message with IDEA.
- KS is encrypted using the public key of the recipient using RSA
algorithm and the result is appended to the encrypted message.
Everyday more than 250 billion Emails are being exchanged over the Internet. A
series of processing are involved for the transmission of an email from a sender to
a recipient. the email service providers use Compression as a mechanism to reduce
the amount of data to be transferred.
Compression is basically converting a message of n bits to m bits (n > m) using a
compression algorithm. Compression helps the email service providers to increase
their productivity as the storage overhead, processing and labor spent on the
maintenance of their servers is reduced.
In PGP, message is compressed only after the application of Signature. The
compressed data is decompressed at the receiver’s end to obtain the original
message and the signature. Then, we can extract the hash value from the signature
and then we can directly determine the authenticity right away by simply calculating
the message’s hash value and comparing it with the value obtained from the
signature.
X)
Hash function: A hash function is a mathematical function that converts a numerical
input value into another compressed numerical value. The input to the hash function
is of arbitrary length but output is always of fixed length
Features of Hash Functions:
Fixed Length Output (Hash Value):
- Hash function coverts data of arbitrary length to a fixed length. This
process is often referred to as hashing the data.
- In general, the hash is much smaller than the input data, hence hash
functions are sometimes called compression functions.
- Since a hash is a smaller representation of a larger data, it is also
referred to as a digest.
Efficiency of Operation:
- Generally, for any hash function h with input x, computation of h(x) is
a fast operation.
- Computationally hash functions are much faster than a symmetric
encryption.
Properties of Hash Functions: In order to be an effective cryptographic tool, the
hash function is desired to possess following properties –
Pre-Image Resistance: This property means that it should be computationally
hard to reverse a hash function.
Second Pre-Image Resistance: This property means given an input and its
hash, it should be hard to find a different input with the same hash.
Collision Resistance: This property means it should be hard to find two
different inputs of any length that result in the same hash. This property is also
referred to as collision free hash function.
Popular Hash Functions: Let us briefly see some popular hash functions –
Message Digest (MD): The MD family comprises of hash functions MD2,
MD4, MD5 and MD6. It was adopted as Internet Standard RFC 1321. It is a
128-bit hash function.
Secure Hash Function (SHA): Family of SHA comprise of four SHA
algorithms; SHA-0, SHA-1, SHA-2, and SHA-3. Though from same family,
there are structurally different.
RIPEMD: The RIPEMD is an acronym for RACE Integrity Primitives
Evaluation Message Digest. The set includes RIPEMD, RIPEMD-128, and
RIPEMD-160. There also exist 256, and 320-bit versions of this algorithm.
Whirlpool: Three versions of Whirlpool have been released; namely
WHIRLPOOL-0, WHIRLPOOL-T, and WHIRLPOOL.
Applications of Hash Functions: There are two direct applications of hash function
based on its cryptographic properties.
Password Storage:
- Instead of storing password in clear, mostly all logon processes store
the hash values of passwords in the file.
- The Password file consists of a table of pairs which are in the form
(user id, h(P)).
Data Integrity Check:
- It is used to generate the checksums on data files.
- This application provides assurance to the user about correctness of the
data.
Xi)
Product cipher: Product ciphers are ciphers that are built as a composition of
several different functions.
Or, in cryptography, a product cipher is a popular type of stream ciphers that works
by executing in sequence a number of simple transformations such as substitution,
permutation, and modular arithmetic.
Or, in cryptography, a product cipher combines two or more transformations in a
manner intending that the resulting cipher is more secure than the individual
components to make it resistant to cryptanalysis.
In the days of manual cryptography, product ciphers were a useful device for
cryptographers, and in fact double transposition or product ciphers on key word-
based rectangular matrices were widely used.
There was also some use of a class of product ciphers known as fractionation
systems, wherein a substitution was first made from symbols in the plaintext to
multiple symbols in the cipher text, which was then encrypted by a final
transposition, known as super-encryption.
One of the most famous field ciphers of all time was a fractionation system, the
ADFGVX cipher employed by the German army during World War I. This system
used a 6 × 6 matrix to substitution-encrypt the 26 letters and 10 digits into pairs of
the symbols A, D, F, G, V, and X.
xii)
IPsec ESP format: Encapsulation Security Payload (ESP) provide the
confidentiality service.
Or, ESP provides origin authenticity through source authentication, data integrity
through hash functions and confidentiality through encryption protection for IP
packets. ESP operates directly on top of IP, using IP protocol number 50.
ESP packet format: It contains the following field:
Security Parameter Index(SPI): This parameter is used in Security
Association. It is used to give a unique number to the connection build
between Client and Server.
Sequence Number: Unique Sequence number are allotted to every packet so
that at the receiver side packets can be arranged properly.
Payload Data: Payload data means the actual data or the actual message. The
Payload data is in encrypted format to achieve confidentiality.
Padding: Extra bits or space added to the original message in order to ensure
confidentiality. Padding length is the size of the added bits or space in the
original message.
Next Header: Next header means the next payload or next actual data.
Authentication Data: This field is optional in ESP protocol packet format.
1. Differentiate between active attacks and passive attacks.
Due to active attack system is always While due to passive attack, there is no
damaged. any harm to the system.
In active attack, Victim gets informed While in passive attack, Victim does
about the attack. not get informed about the attack.
Threat Attack
Information may or may not be altered Chance for information alteration and
or damaged. damage is very high.
5. Short notes:
RC4 algorithm: Rivest Cipher (RC4) is a stream cipher and variable length key
algorithm. This algorithm encrypts one byte at a time.
It uses either 64 bit or 128-bit key sizes. It is generally used in applications such as
Secure Socket Layer (SSL), Transport Layer Security (TSL), and also used in IEEE
802.11 wireless LAN std.
Applications of RC4:
RC4 is used in various applications such as WEP from 1997 and WPA from 2003.
We also find applications of RC4 in SSL from 1995 and it is a successor of TLS
from 1999. RC4 is used in varied applications because of its simplicity, speed, and
simplified implementation in both software and hardware.