Css Answers
Css Answers
CSS Answers
Module 1:
3. Availability:
i. It is the security goal that ensures that systems, applications, and data are
accessible to authorized users whenever they need them.
ii. Availability ensures that systems and applications are functioning correctly
and that users can access them without delay or interruption.
Q2. Explain Security Services and Mechanisms in detail. Explain the relationship
between them
Ans.
-Security Services and Mechanism in detail
-ITU - T provides some security services and some mechanisms.
Security services and mechanisms are closely related because a mechanism or
combination of mechanisms are used to provide a service.
Security Services
1) Authentication -
It is a assuarance of parties that they are aunthenticated users in the
communication network.
2) Authorization -
It means providing authority or permission for accesing the system data or
services.
3) Access Control -
Controls who can have access to resource under what condition.
4) Auditing -
It helps to trace which user accessed what? When? And which way?
5) Data Confidentiality -
Information is not made available to unauthorized individual.
6) Data Integrity -
Assurance that the message is unaltered.
7) Non - Repudiation -
Protection against denial of sending or receiving in the communication.
Security Mechanisms
1) Encipherment -
To use mathematical algorithm to transform data into a form that is not
easily understandable.
2) Digital Signature -
It is a cryptographic output used to verify the aunthenticity of data.
3) Data Integrity -
Content should not modify before it reaches to intended person
4) Authentication Exchange -
The mechanism used to ensure the identity by information exchange.
5) Traffic Padding -
It is used to insert bits into gaps in data stream to frustrate traffic analysis
attempt.
6) Routing Control -
Controlling routes of actual communication in network.
7) Notarization -
Mechanism to check whether the file is authentic and unchanged since it
was backed up.
Q3. What are traditional ciphers? Discuss any one substitution and transposition
cipher with example. List their merits and demerits
Ans.
1) Traditional ciphers are classical encryption techniques that were commonly
used in the past to secure communication and protect sensitive information
from unauthorized access.
2) These ciphers are based on mathematical algorithms and can be classified
into two main categories: substitution ciphers and transposition ciphers.
A. Substitution Cipher:
i. The Caesar Cipher is a simple example of a substitution cipher. In this cipher,
each letter of the plaintext is shifted a certain number of positions down the alphabet.
ii. For example, with a shift of three, the letter 'A' would be replaced by the letter
'D', 'B' would become 'E', and so on. The ciphertext is then created from the shifted
letters.
Merits:
i.Substitution ciphers are relatively easy to understand and implement.
ii.The cipher is simple and can be done mentally.
iii.It can be used to introduce encryption to beginners.
Demerits:
i.Substitution ciphers are easy to break using frequency analysis.
ii.It is not secure enough for modern encryption needs.
iii.The key is easy to discover, since there are only 25 possible keys in the
Caesar Cipher.
B. Transposition Cipher:
i.The Rail Fence Cipher is an example of a transposition cipher.
ii.In this cipher, the plaintext is written in a zigzag pattern across multiple rows,
and then the letters are read horizontally to create the ciphertext.
iii.For example, if the plaintext was "HELLO WORLD" and the key was two, the
ciphertext would be "HLOWELRLOD".
Merits:
i.Transposition ciphers are harder to break than substitution ciphers.
ii.It can be combined with substitution ciphers to create a more secure
encryption.
iii.It is easy to implement.
Demerits:
i.The encryption process is easy to understand, and once the pattern is
recognized, the cipher is relatively easy to break.
ii.The length of the plaintext determines the number of rows, which means the
pattern is predictable.
iii.The key can be discovered by finding the pattern in the ciphertext.
Module 2:
Q1. Compare AES and DES. Which one is bit oriented? Which one is byte
oriented?
Ans.
Fig:ECB
Fig:CBC
Fig:CFB
4) Output Feedback (OFB) Mode -
a. It works same as Cipher Feedback Mode.
b. Only difference is, in OFB, output of encryption algorithm is passed to the s-bits
for shift registers.
Fig: OFB
5) Counter Mode (CTR) -
a. It is a simple counter-based block cipher implementation.
b. Every time a counter initiated, message is encrypted and given as input to XOR
with plaintext which results in ciphertext block.
Q3. Write a short note on following: i) Kerberos ii) Triple DES iii) X.509 Digital
Certificate
Ans.
1) Kerberos-
1. Kerberos is a network authentication protocol designed to provide secure
authentication between client and server applications over an unsecured
network.
2. It was developed at MIT in the 1980s and has since become an industry
standard.
3. The basic idea behind Kerberos is to use a third-party authentication
server, known as the Key Distribution Center (KDC), to authenticate users
and services.
4. The KDC acts as a trusted intermediary between clients and servers,
issuing encrypted tokens known as tickets that clients can use to
authenticate themselves to servers.
5. The Kerberos protocol involves the following steps:
a. Authentication Request: A client requests authentication from the
KDC by sending a message known as an Authentication Service
Request (AS_REQ).
b. Ticket Granting Ticket: The KDC responds to the client with a Ticket
Granting Ticket (TGT), which contains a session key that will be
used to encrypt subsequent communications.
c. Authenticator: The client sends the TGT to the KDC along with an
Authenticator, which is a message that proves the client's identity.
d. Service Ticket: The KDC verifies the client's identity and issues a
Service Ticket (ST) for the requested service.
e. Service Authentication: The client sends the ST to the service it
wishes to access, along with another Authenticator message that
proves its identity.
f. Service Access: The Authenticator using the session key provided
in the TGT.
6. The use of a trusted third party (KDC) and encrypted tickets ensures
that only authenticated users can access network services, even if
the network is unsecured. The Kerberos protocol also uses
cryptographic techniques to prevent replay attacks and other types
of security threats.
7. Overall, Kerberos is a robust and widely used authentication
protocol that provides secure authentication in distributed network
environments.
2) Triple DES-
1. 3DES is based on the original Data Encryption Standard (DES) algorithm,
which uses a 56-bit key.
2. 3DES is much more secure than DES because it uses three keys (each
56 bits in length) and encrypts the data three times.
3. There are two modes of operation for 3DES:
Q4. Discuss DES with reference to following points: i. Fiestel structure and its
significance ii. Block Size & key Size iii. Key Expansion iv. Significance of extra
swap between left and right half blocks v. Need of expansion permutation vi.
Significance of S-box vii. DES function viii.Weak Keys and semi weak keys ix.
Possible attacks on DES x. Avalanche effect
Ans.
Discuss DES
1. DES (Data Encryption Standard) is a symmetric-key block cipher that was widely
used for encryption of data in the late 20th century.
2. It was developed by IBM in the 1970s and later standardized by the National
Institute of Standards and Technology (NIST) in 1977.
3. DES uses a Fiestel structure, which makes it highly secure and efficient.
iv) Significance of extra swap between left and right half blocks:
1. In DES, after each round of encryption or decryption, the left and right halves of
the block are swapped.
2. This extra swap ensures that the bits in the left half of the block are mixed with
the bits in the right half of the block, making it difficult for an attacker to decrypt
the ciphertext without the key.
2. A weak key is a key that, when used for encryption or decryption, produces the
same ciphertext for every plaintext block.
3. A semi-weak key is a key that, when used for encryption or decryption, produces
a limited number of possible ciphertexts.
x) Avalanche effect:
1. The avalanche effect is the property of encryption algorithms where a small
change in the plaintext or the key results in a significant change in the ciphertext.
2. DES has a strong avalanche effect, which means that any small change in the
input results in a significant change in the output.
3. This property ensures that any tampering or manipulation of the ciphertext will
result in a significant change in the plaintext, making it difficult for an attacker to
modify the ciphertext without being detected.
Q5. Explain Diffie Hellman Key Exchange Algorithm. What types of attacks are
possible on it?
Ans.
1) The Diffie-Hellman key exchange algorithm is a cryptographic protocol used to
establish a shared secret key between two parties over an insecure channel.
2) It was invented by Whitfield Diffie and Martin Hellman in 1976.
3) Is widely used for secure key exchange in various cryptographic systems.
4) The key exchange process involves the following steps:
A. Both parties, Alice and Bob, agree on a large prime number p and a
primitive root of p, g, which are publicly known.
B. Alice and Bob each generate a secret key, a and b, respectively, which
are kept private.
C. Alice sends Bob the value g^a mod p, and Bob sends Alice the value g^b
mod p.
D. Alice computes the shared secret key as (g^b)^a mod p, and Bob
computes it as (g^a)^b mod p.
5) The shared secret key obtained from this process can be used for symmetric key
encryption and decryption.
6) Man-in-the-middle (MITM) attack: An attacker intercepts the communication
between Alice and Bob, impersonates each of them to the other, and negotiates
a separate key with each party. To prevent this attack, the Diffie-Hellman key
exchange can be combined with authentication techniques such as digital
signatures or certificates.
7) Computational attacks: An attacker can try to compute the discrete logarithm of
the shared secret key by trying every possible value until the correct key is
found. This attack is difficult for large prime numbers, but it is still possible if the
key size is small. To prevent this attack, a larger key size can be used.
8) Timing attacks: An attacker can measure the time it takes for the key exchange
process to complete and use this information to deduce the value of the secret
key. This attack is difficult to execute, but it is still possible in some cases. To
prevent this attack, constant-time implementations can be used.
9) Side-channel attacks: An attacker can exploit physical characteristics of the
hardware or software implementation of the key exchange algorithm to extract
information about the secret key. This attack can be prevented by using secure
implementations of the algorithm.
OR
Module 3:
Q1. What are the requirements of the cryptographic hash functions? State real
world applications of hash functions.?
Ans.
Requirements of Cryptographic Hash Functions:
1. Collision Resistance: It should be computationally infeasible to find two different
inputs that produce the same hash value.
2. Preimage Resistance: Given a hash value, it should be infeasible to find an input
that hashes to that value.
3. Second Preimage Resistance: Given an input, it should be infeasible to find a
second input that hashes to the same value.
4. Determinism: The same input should always produce the same output hash value.
5. Efficiency: The hashing process should be computationally efficient.
Working of HMAC
1. HMACs provides client and server with a shared private key that is known only to
them.
2. The client makes a unique hash (HMAC) for every request.
3. When the client requests the server, it hashes the requested data with a private
key and sends it as a part of the request.
4. Both the message and key are hashed in separate steps making it secure.
5. When the server receives the request, it makes its own HMAC.
6. Both the HMACS are compared and if both are equal, the client is considered
legitimate.
Example
For example, suppose Alice wants to send the message "Hello Bob" to Bob.
They share a secret key, which is "secretkey".
Alice generates the HMAC for the message using the SHA-256 hash function as
follows:
1) Alice concatenates the message with the secret key: "Hello Bobsecretkey"
2) Alice applies the SHA-256 hash function to the concatenated string:
"d326f2c1d3f9ea15cb13c3456e57ec6a91397f65178c89f8d0441d427b5e5b88"
3) Alice uses the result of the hash function as the key to compute the HMAC
using the same hash function:
HMAC_SHA256("secretkey", "Hello Bob") =
"1abaf6a9b98c7f6ebda69c8a53f30c75d1611ebbb0d03f2e9e9a4e3cdd4ab583"
4) Alice sends the message "Hello Bob" and the HMAC to Bob.
Bob receives the message and the HMAC. He repeats the process:
1) Bob concatenates the message with the secret key: "Hello Bobsecretkey"
2) Bob applies the SHA-256 hash function to the concatenated string:
"d326f2c1d3f9ea15cb13c3456e57ec6a91397f65178c89f8d0441d427b5e5b88"
3) Bob uses the result of the hash function as the key to compute the HMAC
using the same hash function:
HMAC_SHA256("secretkey", "Hello Bob") =
"1abaf6a9b98c7f6ebda69c8a53f30c75d1611ebbb0d03f2e9e9a4e3cdd4ab583"
4) Bob compares the computed HMAC with the HMAC that Alice sent. Since they
match, Bob knows that the message "Hello Bob" has not been tampered with
and was sent by someone who knows the secret key.
Advantages -
1. HMACs are ideal for high-performance systems like routers due to the use of
hash functions.
Disadvantage -
1. HMACs uses shared key which may lead to non-repudiation. If either sender or
receiver’s key is compromised then it will be easy for attackers to create
unauthorized messages.
Q4.What is need for message authentication? List various techniques used for
message authentication. Explain any one.
Ans.
Need for Message Authentication:
1. Verify the origin of the message.
2. Ensure the message has not been tampered with in transit.
3. Ensure the message has not been altered or modified by an unauthorized party.
4. Ensure the integrity and confidentiality of the message.
These properties ensure that the hash function is secure and cannot be easily
manipulated or tampered with. A secure hash function is essential in various
applications, including digital signatures, password storage, and data verification.
Module 4:
Q1. Explain Digital Signature and Digital Certificate used for authentication.?
Ans.
Digital Signature:
1. A digital signature is a cryptographic technique used to ensure the authenticity,
integrity, and non-repudiation of digital messages or documents.
2. It is created using the sender's private key and can be verified using their public
key.
3. The process involves creating a hash of the message/document, encrypting the
hash using the private key, and appending the resulting digital signature to the
message/document.
4. The recipient can verify the digital signature and the message digest using the
sender's public key.
5. A digital signature provides assurance that the message/document has not been
tampered with during transmission and was indeed sent by the claimed sender.
6. It also provides non-repudiation, meaning that the sender cannot deny having
sent the message/document.
Digital Certificate:
1. A digital certificate is an electronic document that contains information about the
identity of the certificate holder.
2. It is issued by a trusted third-party Certificate Authority (CA) after verifying the
identity of the certificate holder.
3. The digital certificate includes the certificate holder's public key and other identity
information.
4. The digital certificate is signed using the CA's private key to ensure its
authenticity.
5. The certificate holder shares their public key and digital certificate with others to
prove their identity.
6. When someone receives the digital certificate, they can verify its authenticity by
checking the digital signature of the CA.
7. They can then use the certificate holder's public key to encrypt messages or
verify digital signatures.
8. Digital certificates are widely used for secure online transactions, such as
e-commerce and online banking.
Module 5:
Q1. Explain different types of Denial of Service attacks?
Ans.
1. Application Layer Flood:
a. This is a type of DoS attack that targets the application layer of a system,
such as a web server.
b. The attacker floods the system with a large number of requests,
overwhelming the server and causing it to become unresponsive.
c. This type of attack is difficult to detect and mitigate because it appears to
be legitimate traffic.
2. Distributed Denial of Service (DDoS):
a. This is a type of DoS attack that involves multiple systems, often
compromised by malware and controlled by the attacker, to flood the
target system with traffic.
b. The goal is to overwhelm the system's resources and make it unavailable
to legitimate users.
c. DDoS attacks can be difficult to prevent and mitigate because they come
from multiple sources and can be distributed across multiple networks.
3. Unintended Denial of Service Attacks:
a. These are DoS attacks that occur unintentionally, often as a result of
software bugs or misconfigurations.
b. For example, a software update may cause a server to crash or a
misconfigured network device may cause a network outage.
c. These types of attacks are unintentional but can still cause significant
disruptions to services.
Q2. What is meant by DOS attack? What are different ways to mount DOS
attacks?
Ans.
DOS
1. A denial-of-service attack is an attempt to make a computer resource unavailable
to its intended users.
2. The basic purpose of a DOS attack is simply to flood a network so as to deny the
authentic users services of the network.
Ways to mount DOS attack on the system -
1) SYN Flood Attack -
1. The attacker takes control of multiple hosts over the internet instructing them to
contact the target Web server.
2. Each SYN packet is a request to open a TCP connection. For each such packet,
the web server responds with a SYNACK packet trying to establish a TCP
connection.
3. SYN request waiting for a response back and becomes bogged down as more
traffic floods in due to which users are denied access.
2) Distributed DOS Attack -
6) UDP Flood -
1. This type of attack floods random ports on a remote host with numerous UDP
packets, causing the host to repeatedly check for the application listening at that
port, and reply with an ICMP Destination Unreachable packet.
7) Teardrop Attack -
1. The Teardrop attack involves sending corrupted IP packages, the purpose of this
is to confuse and potentially crash the receiving system.
8) Smurf Attack -
1. In this the attacker knows the broadcast servers in a network and sends a ping
request.
2. When the broadcast server receives the ping request, the ping request is sent to
the entire network and all the machines in the network return a response. These
responses are further redirected by the broadcast server to the target machine.
Q4. Describe various types of IDS. What are Active and Passive IDS?.
Ans.
1. IDS stands for Intrusion Detection System.
2. It is a software or hardware-based system that monitors network traffic or system
events to detect unauthorized access or malicious activity.
3. IDS can be classified into two types: Network-Based IDS (NIDS) and Host-Based
IDS (HIDS).
4. Network Intrusion Detection Systems (NIDS) usually consists of a network
appliance (or sensor) with a Network Interface Card (NIC) operating in
promiscuous mode and a separate management interface. The IDS is placed
along a network segment or boundary and monitors all traffic on that segment.
5. A host Intrusion detection system (HIDS) can only monitor the individual
workstations on which the agents are installed and it cannot monitor the entire
network. Host based IDS systems are used to monitor any intrusion attempts on
critical servers.
6. Active IDS is a type of IDS that takes an active role in preventing attacks. It can
block suspicious traffic or terminate malicious processes to prevent further
A. Client Hello: The client sends a message to the server to initiate a secure
connection. The message includes the SSL version, cipher suites
supported by the client, and a random number.
B. Server Hello: The server responds to the client with its SSL version, cipher
suite selected for the communication, and a random number.
C. Certificate: The server sends its digital certificate to the client to
authenticate its identity.
D. Server Key Exchange: The server sends its public key to the client to
establish a secure session key.
E. Client Key Exchange: The client generates a session key using the
server's public key and sends it to the server.
F. Change Cipher Spec: Both the client and server agree to switch to
encrypted communication using the session key.
G. Finished: Both the client and server exchange a message to confirm that
the SSL handshake is complete, and encrypted communication can begin.
8. Once the SSL handshake protocol is complete, the client and server can exchange
data in a secure and encrypted manner, and the data cannot be intercepted by any
unauthorized third party.
Q8.What are different types of firewall? How firewall different than IDS?
Ans.
Firewalls and IDS are both network security tools, but they differ in their approach to
securing a network:
Module 6:
Q1.Write a short note on Buffer Overflow.?
Ans.
1. Buffer overflow is a type of software vulnerability that occurs when a program or
process tries to store more data in a buffer (temporary storage area) than it can
hold.
2. This can happen when the size of the input data exceeds the capacity of the
buffer, or when the input data is not properly checked or validated before being
stored in the buffer.
3. Buffer overflow attacks can allow an attacker to overwrite or modify the contents
of the buffer, which can lead to a variety of security issues, such as crashing the
program, executing malicious code, or gaining unauthorized access to a system.
4. To prevent buffer overflow attacks, developers can use techniques such as
bounds checking, input validation, and buffer size limits.
5. Additionally, security measures such as Data Execution Prevention (DEP) and
Address Space Layout Randomization (ASLR) can make it more difficult for
attackers to exploit buffer overflow vulnerabilities.
6. Regular software updates and security patches can also help to mitigate the risk
of buffer overflow attacks.
7. Overall, buffer overflow attacks are a serious threat to software security and can
have significant consequences if not properly addressed.
2. Input Validation: Validate user input on the server-side to prevent injection attacks
such as SQL injection or cross-site scripting (XSS).
Example: A web application should validate user input such as form data or
search queries to prevent malicious users from injecting code that could be used
to steal data or compromise the system.
4. Use Security Headers: Use security headers such as Content Security Policy
(CSP) and X-Frame-Options to prevent cross-site scripting (XSS) and
clickjacking attacks.
Example: A website can use a Content Security Policy to restrict which external
resources, such as scripts or stylesheets, can be loaded on the page, preventing
malicious code from being executed.
5. Keep Software Up-to-Date: Keep all software and plugins up-to-date to ensure
that any known vulnerabilities are patched.
2. SQL Injection: This occurs when an attacker uses malicious input to manipulate a
SQL query and access unauthorized data or perform unauthorized actions.
Example of attack: An attacker can input SQL code into a web form that is not
properly sanitized, causing the SQL query to execute malicious code that can
access or modify data in the database.
3. Cross-Site Scripting (XSS): This occurs when an attacker injects malicious code
into a website that is then executed by a user's browser.
Example of attack: An attacker can input JavaScript code into a web form that is
not properly sanitized, causing the code to execute when a user visits the
website, potentially allowing the attacker to steal sensitive data or perform
unauthorized actions.
4. Cross-Site Request Forgery (CSRF): This occurs when an attacker tricks a user
into unknowingly performing an action on a website, such as submitting a form or
making a payment.
Example of attack: An attacker can craft a webpage that includes a hidden form
that submits a request to a vulnerable website when the user visits the page,
causing the user to unknowingly perform an action on the website without their
knowledge.