CSS 5th Notes
CSS 5th Notes
5) last diagram:-
4 1 3 2 5
1 2 3 4 5
5)Transposition Techniques (Keyed and keyless Also Sums .
• A transposition cipher does not substitute one symbol for another (as in substitution
cipher), but changes the location of these symbols.
• It reorders (jumbles) the given plain-text to give the cipher-text.
• They are of two types: Keyed and Keyless Transposition Cipher.
• Similarly for the (b) method, we can arrange the same above message into tables with four
columns.
• In this approach, rather than permuting all the symbols together, we divide the entire
plaintext into blocks of predetermined size and then permute each block independently.
• Suppose A wants to send a message to B “WE HAVE AN ATTACK”. Both A and B agreed to
had previously agreed oved the blocks size as 5. So the blocks would be as:
WEHAV EANAT TACKX
• The last character X is a bogus character so as to complete the block size of 5.
• A and B is using the following key for encryption and decryption:
6)Discuss in detail Block Cipher modes of operation
Encryption algorithms are divided into two categories based on the input type, as a block cipher and
stream cipher. Block cipher is an encryption algorithm that takes a fixed size of input say b bits and
produces a ciphertext of b bits again. If the input is larger than b bits it can be divided further. For
different applications and uses, there are several modes of operations for a block cipher.
Electronic Code Book (ECB) –
Electronic code book is the easiest block cipher mode of functioning. It is easier because of direct
encryption of each block of input plaintext and output is in form of blocks of encrypted ciphertext.
Generally, if a message is larger than b bits in size, it can be broken down into a bunch of blocks and
the procedure is repeated.
Procedure of ECB is illustrated below:
• It is similar to the concept of the authentication Services (AS) & Tichel Granting
Service (TGS) in Kerheros.
• The basic idea is that every node shares an unique secret key with the KDC.
Whenever user wants to communicate securely with user B , the following action
take place.
• The background is that A has a secured secret key KA with KDC . Similarly B is
assumed to share a secret key KB with the KDC.
• A sends a request to KDC encrypted with KA , which includes:
• Identifies of A & B
• A random number R , called as names.
• KDC responds with a message encrypted with KA , continuing :
a. One - time symmetric key KS.
b. Original request that was sent by A, for verification
c. Plus, KS encrypted with KB & ID of A encrypted with KB.
1. Backdoor access: Trojans can create a backdoor or remote access point on a victim's
computer, allowing attackers to gain unauthorized access and control over the system.
2. Data theft: Trojans can steal sensitive data, such as passwords, credit card numbers, or
personal information, and send it to attackers.
3. Keylogging: Trojans can record keystrokes made by a user and send them to attackers,
allowing them to capture sensitive information, such as login credentials.
4. Botnet creation: Trojans can install a botnet client on a victim's computer, allowing attackers
to control it as part of a larger network of compromised systems.
5. Ransomware installation: Trojans can install ransomware on a victim's computer, encrypting
files or blocking access to the system and demanding payment in exchange for a decryption
key or system access.
To prevent Trojan infections, users should follow safe computing practices, such as keeping their
software up to date, using anti-virus and anti-malware software, avoiding suspicious links or
attachments, and being cautious when downloading or installing software from unknown sources. It
is also important to regularly back up important data to prevent data loss in the event of a Trojan
infection.
12)write short note on X.509
A digital certificate is a digital form of identification, like a passport. A digital certificate provides
information about the identity of an entity. A digital certificate is issued by a Certification Authority
(CA). Examples of trusted CA across the world are Verisign, Entrust, etc. The CA guarantees the
validity of the information in the certificate.
A typical X.509 standard digital certificate has the following format:
An X.509 certificate contains information about the identity to which a certificate is issued and
the identity that issued it. Standard information in an X.509 certificate includes:
Version: which X.509 version applies to the certificate (which indicates what data the
certificate must include)
Algorithm information: the algorithm used by the issuer to sign the certificate
Issuer distinguished name: the name of the entity issuing the certificate (usually a certificate
authority)
Validity period of the certificate: the period of time for which the certificate is valid with the
start/end date.
Subject distinguished name: the name of the identity the certificate is issued to
Subject public key information the public key associated with the identity
Extensions (optional)
Many of the certificates that people refer to as Secure Sockets Layer (SSL) certificates are in
fact X.509 certificates.
The first X.509 certificates were issued in 1988 as part of the International
Telecommunications Union's Telecommunication Standardization Sector (ITU-T) and the
X.500 Directory Services Standard. In 1993, version 2 added two fields to support directory
access control. Version 3 was released in 1996 and defines the formatting used for certificate
extensions.
13) What are the requirements of the cryptographic hash functions? Compare
MDS and SHA Hash functions
Compression: For any size of input x, the output length of y = h(x) is small. Hash functions
produce a fixed size output regardless of the length of the input.
Efficiency: It must be easy to compute h(x) for any input x. the computational effort
required to compute h(x) will certainly grow with the length of x, but it should not grow
too fast.
One-way: Given any value y, it is computationally infeasible to find a value x such
that h(x)=y It is difficult to invert the hash.
Weak collision resistance: Given x and h(x) it is infeasible to find y with y≠x such
that h(y)=h(x)
Strong collision resistance: It is infeasible to find y with x≠y such that h(x)=h(y)
Message digest size Message digest 128 bits Message digest is 160 bit long.
• Digital signatures are used to authenticate the identity of the sender. It is like
signing a message in electronic form.
• A digital signature is a protocol that produces the same effect as a real signature.
• It is a mark that only the sender can make and other people can easily recognize
that it belongs to the sender. A digital signature is also used to confirm agreement
to a message.
• A digital signature must be unforgeable and authentic.
• In a digital signature process, the sender uses a signing algorithm to sign the
message. The message and the signature are sent to the receiver. The receiver
receives the message and the signature and applies the verifying algorithm to the
combination.
• If the result is true, the message is accepted otherwise it is rejected.
• A conventional signature is like a private key belonging to the signer of the
document. The signer uses it to sign documents. The copy of the signature on a file
is like a public key so anyone can use it to verify a document to compare it to the
original signature.
• In digital signature the signer uses her private key applied to a signing algorithm to
sign the document. The verifier uses the public key of the signer applied to
verifying algorithm to verify the sign.
• When a document is signed anyone including Bob can verify it because everyone
has access to Alice’s public key. Alice must never use her public key to sign the
document because anyone could forge her signature.
• Digital signatures have assumed great significance in the modern world of web-
commerce. Many countries have made provisions for recognizing digital signature
as a valid authorization mechanism like paper-based signatures.
15) explain different types of dos attacts?
A denial-of-service (DoS) attack occurs when legitimate users are unable to access information
systems, devices, or other network resources. An attacker or attackers, attempt to make it
impossible for a service to be delivered by interrupting the device's normal functioning. Services
affected may include email, websites, online accounts, or other services that rely on the affected
computer or network. A denial-of- service condition is accomplished by flooding the targeted
host/network with traffic or sending it information until the target cannot respond or simply
crashes, preventing access for legitimate users. A DOS attack is characterized by using a single
computer to launch the attack. DoS attacks can cost an organization both time and money while
their resources and services are inaccessible.
DoS attacks typically fall in two categories:
1. Buffer overflow attacks:This is the most common DoS attack targeted at application layer of OSI
model. In this attack, a memory buffer overflow causes a machine to consume all available hard disk
space, memory, or CPU time because more traffic/HTTP requests to a network address is sent than
the programmers have built the system to handle. This form of exploit often results in sluggish
behaviour, system crashes, or other harmful server behaviours, resulting in denial-of-service.
2. Flood attacks:The most common method of attack occurs when an attacker floods a network
server with traffic. In this type of DoS attack, the attacker sends several requests to the target
server, overloading it with traffic and thus resulting in denial-of-service
ICMP (Internet Control Message Protocol) flood: This denial-of-service attack is based on crushing a
target with ICMP (ping) packets. By flooding a target with more pings than it can respond to
efficiently, denial-of-service can occur. This attack can also be used as a DDoS attack. This attack
leverages misconfigured network devices by sending spoofed packets that ping every computer on
the targeted network, instead of just one specific machine. The network is then triggered to intensify
the traffic. This attack is also known as the Smurf attack or Ping of death.
3.SYN flood: A three-way handshake method is used in TCP/IP network to create a connection
between a local host/client and server. SYN flood attack occurs when an attacker sends a request to
connect to the target server but never completes the handshake. The incomplete handshake leaves
the connected port in an occupied status and unavailable for further requests for legitimate users.
An attacker will continue to send requests, saturating all open ports, so that legitimate users cannot
connect.
4.UDP flood: A denial-of-service attack in which a high number of User Datagram Protocol (UDP)
packets are sent to a targeted server with the goal of overwhelming that device's ability to process
and react. UDP flooding can potentially exhaust the firewall protecting the targeted server, resulting
in a denial-of-service attack on genuine traffic. Under normal conditions, when a server receives a
UDP packet at a particular port, it goes through two steps in response:
1.The server first checks to see if any programs are running which are presently listening for requests
at the specified port.
2. If no programs are receiving packets at that port, the server responds with a ICMP (ping) packet to
inform the sender that the destination was unreachable.
16) Define DoS attack. Show the different ways by which this attack can be
mounted at various layers.
A DOS (Denial-of-Service) attack is a type of cyber attack in which an attacker attempts to disrupt or
prevent legitimate users from accessing a network, website, or service. The goal of a DOS attack is to
overwhelm the targeted system with traffic or requests, rendering it unable to respond to legitimate
requests.
DOS attacks can be mounted at various layers of the network stack, including:
Application layer: This type of DOS attack is also known as an application-layer attack or an HTTP
flood attack. In this attack, the attacker sends a large number of requests to a specific application or
website, overwhelming it with traffic and making it unavailable to legitimate users. This can be
achieved by sending HTTP GET or POST requests or by exploiting vulnerabilities in the application
code.
Transport layer: This type of DOS attack is also known as a network-layer attack. In this attack, the
attacker floods the victim's network with a large number of packets, overwhelming its capacity and
making it unavailable to legitimate users. Common transport-layer attacks include UDP floods, ICMP
floods, and SYN floods.
Network layer: This type of DOS attack is also known as a volumetric attack or a network flood
attack. In this attack, the attacker floods the victim's network with a large amount of traffic,
overwhelming its bandwidth and making it unavailable to legitimate users. Common network-layer
attacks include DNS amplification attacks and IP spoofing attacks.
Physical layer: This type of DOS attack is also known as a physical-layer attack. In this attack, the
attacker physically damages the victim's network infrastructure, such as by cutting cables or
disrupting power.
DOS attacks can be difficult to prevent or mitigate, as they can be launched from a large number of
sources and may be difficult to distinguish from legitimate traffic. However, there are several
strategies that can be used to protect against DOS attacks, including network segmentation, traffic
filtering, and rate limiting. Additionally, cloud-based services and content delivery networks (CDNs)
can help absorb and mitigate the impact of DOS attacks.
17) Write short note on: IPSec
• One of the weaknesses of the original Internet Protocol was that it lacked any sort
of general purpose mechanism for ensuring the authenticity and privacy of data as
it is passed over a network.
• A set of protocols named Internet Protocols for Security (IPsec) were developed to
provide security enhancements for internet critical applications.
There are two security modes for use depending on network need:
• Transport mode:
o Transport mode provides protection primarily for upper-layer protocols.
o It is used to encrypt and optionally authenticate the data carried by IP.
o Typically, transport mode is used for end-to-end communication between
two hosts
• Tunnel Mode:
o It encrypts an entire IP packet.
o After attaching all inner security header, the payload+security headers are
treated as a new “payload” and a separate IP header is attached to it.
o The entire original, or inner, packet travels through a "tunnel" from one
point of an IP network to another; no routers along the way are able to
examine the inner IP header
o E.g. VPN (Virtual Private Network) Two important protocols which are also
referred as core IPsec protocols are:
• IPsec Authentication Header(AH):
o This protocol provides authentication services for IPSec.
o What this means is that it allows the recipient of a message to verify that the
supposed originator of a message was in fact the one that sent it.
o It also allows the recipient to verify that none of the data in the datagram
has been changed by any intermediate devices en-route.
o It also provides protection against so-called “replay” attacks, where a
message is captured by an unauthorized user and re-sent.
• Encapsulating Security Payload (ESP):
o The Authentication Header ensures integrity of the data in datagram, but
not its privacy.
o When the information in a datagram is “for your eyes only”, it can be further
protected using the ESP protocol, which encrypts the payload of the IP
datagram.
• Internet Key Exchange (IKE) is another important protocol involved in IPsec. It
involves the involves the determination and distribution of secret keys. A typical
requirement is four keys for communication between two applications: transmit
and receive pairs for both AH and ESP.
18) How does ESP header guarantee to achieve confidentiality and
integrity of packet payload?
ESP (Encapsulating Security Payload) is a protocol used in IPsec (Internet Protocol Security) to
provide confidentiality and integrity for packet payloads. The ESP header is used to achieve these
security objectives through a combination of encryption and authentication mechanisms.
To provide confidentiality, the ESP header includes a field for the encryption algorithm and a field for
the encryption key. When an IP packet is encapsulated with an ESP header, the payload of the
packet is encrypted using the specified algorithm and key. This ensures that the payload of the
packet is protected from eavesdropping or interception by unauthorized parties.
To provide integrity, the ESP header includes a field for the authentication algorithm and a field for
the authentication key. When an IP packet is encapsulated with an ESP header, the payload of the
packet is also authenticated using the specified algorithm and key. This ensures that the payload of
the packet has not been tampered with or modified during transit.
In summary, the ESP header provides confidentiality and integrity by encrypting the payload of an IP
packet and authenticating it to ensure that it has not been modified during transit. By using both
encryption and authentication mechanisms, the ESP header provides a high level of security for
IPsec-protected communications.
19) What is Authentication Header (AH)? How does it protect against Replay attack?
The Authentication Header (AH) is a protocol used in IPsec (Internet Protocol Security) to provide
authentication and integrity for IP packets. AH protects the IP packet header and the data payload
by adding an authentication header to the packet.
AH protects against replay attacks by including a sequence number field in the AH header. The
sequence number is incremented with each packet sent, and the receiver keeps track of the
expected sequence number. If a packet is received with a sequence number that is lower than
expected, it is discarded as a replay attack.
In addition to the sequence number, the AH header also includes an integrity check value (ICV),
which is calculated over the packet header and data payload using a message authentication code
(MAC) algorithm. The ICV provides assurance that the packet has not been tampered with or
modified during transit. If the receiver calculates a different ICV than the one included in the AH
header, it indicates that the packet has been tampered with, and it is discarded.
By providing both sequence number checking and integrity checking, AH protects against replay
attacks by ensuring that only valid packets are accepted and processed by the receiver. This helps to
ensure the integrity and authenticity of IP packets and provides a high level of security for IPsec-
protected communications.
20) Write Short Note on SSL/TLS
• The socket layer lies between the application layer and the transport layer in the Internet
protocol stack. The SSL protocol is an internet protocol for secure exchange of information
between a web browser and web server. This provides a secure pipe for communication.
SSL is the protocol that is used for the vast majority of secure transactions over the
internet.
• Suppose Alice wants to buy a book from KT280.com. Before she provides the credit card
information she needs to be sure that she’s dealing with the original site, hence she needs
to authenticate KT280.com. The authentication need not be mutual.
• After Alice is satisfied that she is dealing with a secure site she will provide the private
information which needs to be protected in transit.
• In this protocol Alice the client informs Bob the server that she wants to conduct a secure
transaction. Bob responds with his certificate.
• Alice needs to verify the signature on the certificate at which point she will be confident
that she has Bob’s certificate although she cannot yet be certain that she’s talking to Bob.
• Then Alice will encrypt a symmetric key KAB with Bob’s public key and send the encrypted
key to Bob. This symmetric Key can then be used to encrypt and integrity protect
subsequent communication.
21) What is the need of SSL? Explain the SSL handshake protocol.
SL (Secure Sockets Layer), now known as TLS (Transport Layer Security), is a protocol used to provide
secure communication over the internet. The primary need for SSL is to ensure that sensitive
information transmitted between two parties is protected from eavesdropping, tampering, and
forgery.The SSL handshake protocol is a process that takes place between a client and a server to
establish a secure connection using SSL/TLS. The SSL handshake involves the following steps:
• Client Hello: The SSL handshake begins with the client sending a "Client Hello" message to
the server, indicating the SSL version and encryption algorithms that the client supports.
• Server Hello: The server responds with a "Server Hello" message, selecting the SSL version
and encryption algorithms to be used for the connection. The server also sends its SSL
certificate, which includes its public key.
• Client Authentication (Optional): If the server requests client authentication, the client
sends its SSL certificate to the server, along with any necessary authentication information.
• Key Exchange: The client and server perform a key exchange to establish a shared secret key
to be used for symmetric encryption of data. This is typically done using the server's public
key, which is included in its SSL certificate.
• Certificate Verification: The client verifies the server's SSL certificate to ensure that it is valid
and issued by a trusted authority.
• Finished: The client and server exchange "Finished" messages, indicating that the SSL
handshake is complete and that the connection is now secured with SSL/TLS.
22) Write short note on IDS:--→A system called an intrusion detection system (IDS) observes
network traffic for malicious transactions and sends immediate alerts when it is observed. It is
software that checks a network or system for malicious activities or policy violations. Each illegal
activity or violation is often recorded either centrally using a SIEM system or notified to an
administration. IDS monitors a network or system for malicious activity and protects a computer
network from unauthorized access from users, including perhaps insiders. The intrusion detector
learning task is to build a predictive model (i.e. a classifier) capable of distinguishing between ‘bad
connections’ (intrusion/attacks) and ‘good (normal) connections’.
IDS are classified into 5 types:
Network Intrusion Detection System (NIDS): Network intrusion detection systems (NIDS) are set up
at a planned point within the network to examine traffic from all devices on the network. It performs
an observation of passing traffic on the entire subnet and matches the traffic that is passed on the
subnets to the collection of known attacks. Once an attack is identified or abnormal behavior is
observed, the alert can be sent to the administrator. An example of a NIDS is installing it on the
subnet where firewalls are located in order to see if someone is trying to crack the firewall.
Host Intrusion Detection System (HIDS): Host intrusion detection systems (HIDS) run on independent
hosts or devices on the network. A HIDS monitors the incoming and outgoing packets from the
device only and will alert the administrator if suspicious or malicious activity is detected. It takes a
snapshot of existing system files and compares it with the previous snapshot. If the analytical system
files were edited or deleted, an alert is sent to the administrator to investigate. An example of HIDS
usage can be seen on mission-critical machines, which are not expected to change their layout.
Protocol-based Intrusion Detection System (PIDS): Protocol-based intrusion detection system (PIDS)
comprises a system or agent that would consistently reside at the front end of a server, controlling
and interpreting the protocol between a user/device and the server. It is trying to secure the web
server by regularly monitoring the HTTPS protocol stream and accepting the related HTTP protocol.
As HTTPS is unencrypted and before instantly entering its web presentation layer then this system
would need to reside in this interface, between to use the HTTPS.
Application Protocol-based Intrusion Detection System (APIDS): An application Protocol-based
Intrusion Detection System (APIDS) is a system or agent that generally resides within a group of
servers. It identifies the intrusions by monitoring and interpreting the communication on
application-specific protocols. For example, this would monitor the SQL protocol explicitly to the
middleware as it transacts with the database in the web server.
Hybrid Intrusion Detection System: Hybrid intrusion detection system is made by the combination of
two or more approaches to the intrusion detection system. In the hybrid intrusion detection system,
the host agent or system data is combined with network information to develop a complete view of
the network system. The hybrid intrusion detection system is more effective in comparison to the
other intrusion detection system. Prelude is an example of Hybrid IDS.
23) What is a firewall? Explain different types of firewalls and list their advantages.
A firewall is a network security device that monitors and controls incoming and outgoing
network traffic based on predetermined security rules. It acts as a barrier between a trusted
internal network and an untrusted external network, such as the internet, and helps to
protect the internal network from unauthorized access, attacks, and other security threats.
There are several types of firewalls, including:
Packet filtering firewall: This type of firewall examines each packet of data that passes
through it and filters out packets that do not match the pre-defined rules. It operates at the
network layer of the OSI model and can only filter based on IP addresses, port numbers, and
protocols.
Stateful inspection firewall: This type of firewall operates at the transport layer of the OSI
model and keeps track of the state of network connections. It examines the state of each
packet and compares it to previous packets to determine whether it is allowed through or
not.
Proxy firewall: A proxy firewall acts as an intermediary between the client and the server. It
intercepts all network traffic and processes it on behalf of the client. It can filter based on
application-layer protocols and can provide additional security features such as content
filtering.
Next-generation firewall (NGFW): NGFW is a more advanced firewall that combines
traditional firewall capabilities with intrusion prevention, deep packet inspection, and other
security features. It provides greater visibility and control over network traffic and can
protect against advanced threats such as zero-day attacks.
Advantages of firewalls include:
1. Protection against unauthorized access: A firewall can prevent unauthorized access
to the network by blocking traffic from untrusted sources.
2. Protection against malware: A firewall can detect and block malware and other
malicious traffic before it enters the network.
3. Monitoring and logging: A firewall can log network activity, which can be useful for
monitoring and detecting potential security incidents.
4. Policy enforcement: A firewall can enforce security policies to ensure that users and
devices comply with organizational security standards.
Overall, firewalls play a critical role in network security and are an essential component of
any comprehensive security strategy.
24) List various software vulnerabilities. How this vulnerabilities can be exploited
to launch an attack?
There are various software vulnerabilities that can be exploited to launch an attack,
including:
Buffer overflow: A buffer overflow occurs when a program tries to write more data to a
buffer than it can hold. This can be exploited by an attacker to overwrite adjacent memory
locations, which can be used to execute arbitrary code.
SQL injection: An SQL injection occurs when an attacker injects malicious code into an SQL
query, which can be used to read, modify, or delete data from a database.
Cross-site scripting (XSS): XSS occurs when an attacker injects malicious code into a web
page, which can be executed by other users who visit the page. This can be used to steal
user credentials or perform other malicious actions.
Cross-site request forgery (CSRF): CSRF occurs when an attacker tricks a user into executing
an unintended action on a website. This can be used to perform actions such as changing
passwords or making unauthorized purchases.
Directory traversal: Directory traversal occurs when an attacker exploits a vulnerability in a
web application to access files outside of the web root directory. This can be used to access
sensitive data or execute arbitrary code.
Man-in-the-middle (MITM) attacks: A MITM attack occurs when an attacker intercepts and
modifies communication between two parties. This can be used to steal sensitive
information or modify data in transit.
These vulnerabilities can be exploited by attackers to launch a variety of attacks, including:
1. Denial-of-service (DoS) attacks: DoS attacks are designed to disrupt the normal
functioning of a network or system by flooding it with traffic.
2. Malware attacks: Malware attacks involve the use of malicious software to gain
unauthorized access to a network or system, steal data, or perform other malicious
actions.
3. Data theft: Data theft involves stealing sensitive information, such as credit card
numbers, passwords, or other personal information, from a network or system.
4. Privilege escalation: Privilege escalation involves gaining higher-level access to a
system or network than is authorized. This can be used to access sensitive data or
perform other malicious actions.
25) Short note on Buffer Overflow
Buffer overflow is a type of software vulnerability that occurs when a program tries to store more
data in a buffer than it can hold. This can result in the extra data being written to adjacent memory
locations, which can be exploited by an attacker to execute arbitrary code or crash the program.
Buffer overflow attacks can be particularly dangerous because they can be used to gain
unauthorized access to a system, modify or steal data, or even take control of the system entirely.
Attackers can exploit buffer overflow vulnerabilities in a number of ways, including by sending
specially crafted input to a vulnerable program, such as a web application.
To prevent buffer overflow attacks, developers can use secure coding practices, such as bounds
checking and input validation, to ensure that input data is properly sanitized before it is processed
by the program. In addition, operating systems and programming languages have implemented
various security features, such as stack canaries and address space layout randomization (ASLR), to
mitigate the impact of buffer overflow attacks.
Overall, buffer overflow vulnerabilities remain a significant threat to software security, and it is
essential for developers and system administrators to be aware of these vulnerabilities and take
steps to prevent them from being exploited.
26) What is meant by malicious software and its types.
Ans: Malicious software, also known as malware, refers to any software program designed to cause harm
or damage to computer systems, networks, or devices. Malware can be used by attackers to steal
sensitive data, gain unauthorized access, or cause disruptions to computer systems or networks.
There are several types of malware, including:
1. Viruses: Viruses are programs that can replicate themselves and spread from one computer
to another by attaching themselves to other programs or files. They can be used to delete or
modify files, steal data, or gain unauthorized access to systems.
2. Worms: Worms are self-replicating programs that can spread over networks without user
interaction. They can be used to overload network traffic or exploit vulnerabilities in systems
to gain unauthorized access.
3. Trojans: Trojans are programs that masquerade as legitimate software but contain malicious
code. They can be used to steal data, gain unauthorized access, or download and install
other malware.
4. Ransomware: Ransomware is a type of malware that encrypts files or blocks access to
computer systems and demands payment in exchange for the decryption key or system
access.
5. Spyware: Spyware is a type of malware that secretly gathers information about users'
activities and sends it to attackers. It can be used to steal personal or sensitive data, track
user behavior, or display unwanted advertisements.
6. Adware: Adware is a type of malware that displays unwanted or malicious advertisements
on users' devices. It can be used to generate revenue for attackers or trick users into
installing other malware.
27) What are the properties of a hash function? Explain the role of the hash
function in
A hash function is a mathematical function that takes an input (or "message") and produces
a fixed-length output, called a "hash" or "digest." The properties of a hash function are:
1. Determinism: For a given input, a hash function should always produce the same
output.
2. Pre-image resistance: It should be computationally infeasible to find an input that
hashes to a given output.
3. Second pre-image resistance: It should be computationally infeasible to find a
second input that hashes to the same output as a given input.
4. Collision resistance: It should be computationally infeasible to find two inputs that
hash to the same output.
Hash functions are used in a variety of security applications, including:
1. Password storage: Instead of storing a user's password in plaintext, a hash function is
used to store a hash of the password. When the user logs in, the system hashes the
user's input and compares it to the stored hash to determine if the password is
correct.
2. Digital signatures: Hash functions are used in digital signature schemes to ensure the
integrity of the signed data. A hash of the data is signed, rather than the data itself,
so that any modifications to the data will result in an invalid signature.
3. Message authentication codes (MACs): A MAC is a cryptographic checksum that is
used to ensure the integrity and authenticity of a message. A hash function is used to
generate the MAC, which is then transmitted with the message.
4. Blockchain: Hash functions are used in blockchain technology to create a chain of
blocks that is resistant to modification. Each block contains a hash of the previous
block, which links the blocks together and makes it difficult to alter the data in any
one block.
Overall, the properties of a hash function make it a valuable tool for ensuring the integrity
and security of data in a variety of applications.
Key AES DES
Definition AES stands for Advanced Encryption DES stands for Data Encryption
Standard. Standard.
Key Length Key length varies from 128 bits, 192 Key length is of 56 bits.
bits to 256 bits.
Rounds of Rounds per key length: 16 rounds of identical operations.
Operations • 128 bits - 10
• 192 bits - 12
• 256 bits - 14
Network AES structure is based on DES structure is based on Feistal
substitution-permutation network. network.
Security AES is de-facto standard and is DES is weak, however 3DES (Triple
more secure than DES. DES) is more secure than DES.
Rounds The operation rounds involved in Expansion, XOR operation with
AES encryption are Byte round key, Substitution, and
Substitution, Shift Row, Mix Column, Permutation are the rounds used in
and Key Addition. DES encryption
Size AES can encrypt 128 bits of plain DES can encrypt 64 bits of plain
text. text.
Derived from AES is derived from Square cipher. DES is derived from Lucifer cipher.
Designed By AES was designed by Vincent DES was designed by IBM.
Rijmen and Joan Daemen.
Known No known attacks. Brute-force, Linear crypt-analysis
attacks and Differential crypt-analysis.
Encryption AES can encrypt plain text up to 128 DES can encrypt 64 bits of plain
bits. text.
a)passive attack : an active attack is an attempt to alter, damage, or destroy the targeted system
or network, and it typically involves a deliberate action by the attacker to compromise or
disrupt the system. For instance, a hacker might try to break into a computer system to steal
sensitive data or plant malware that can corrupt or destroy the system.
b) active attack: a passive attack is an attempt to intercept or monitor the targeted system or
network without altering its state. In other words, a passive attacker is trying to observe and
collect information about the system, its users, or its communications, without causing any
disruption. Passive attacks might involve eavesdropping on network traffic, sniffing out login
credentials, or collecting sensitive data such as credit card numbers or personal information.
1. Symmetric-key cryptography: In this type of cryptography, the same key is used for
both encryption and decryption. It is a relatively fast and efficient method and is
commonly used for encrypting large volumes of data. Examples of symmetric-key
algorithms include AES, DES, and Blowfish.
2. Asymmetric-key cryptography: Also known as public-key cryptography, this type uses
two different keys, one for encryption and one for decryption. The encryption key is
public, meaning anyone can use it to encrypt messages, but only the recipient with
the corresponding private key can decrypt them. Examples of asymmetric-key
algorithms include RSA and ECC.
32) short note on conffusion and diffusion.
• confusion and diffusion are two important concepts in cryptography that are used to
improve the security of encryption algorithms.
• Confusion refers to the process of making the relationship between the plaintext and the
ciphertext as complex and obscure as possible. This is typically achieved through
mathematical operations such as substitution and permutation, which make it difficult
for an attacker to find patterns in the ciphertext that would reveal information about the
plaintext.
• Diffusion, on the other hand, refers to the process of spreading the influence of a single
plaintext bit or character throughout the entire ciphertext. This is usually done by
performing operations on multiple plaintext bits or characters at once, and is intended
to prevent an attacker from being able to analyze small parts of the ciphertext to deduce
information about the plaintext.
• By combining confusion and diffusion, encryption algorithms can create a high degree of
complexity in the relationship between the plaintext and the ciphertext, making it
extremely difficult for attackers to decrypt the message without knowing the key. These
concepts are fundamental to many modern encryption algorithms and have been
instrumental in the development of secure communication protocols and the protection
of sensitive information.
33) why digital signature and digital certificate are required.
Digital signatures and digital certificates are required for secure electronic communication and
transactions. Here's why: