COMPUTER SECURITY AND CRYPTOGRAPHY
COMPUTER SECURITY AND CRYPTOGRAPHY
COMPUTER SECURITY AND CRYPTOGRAPHY
Reg_No: BIT/2021/94797
i. NIDS
A Network-based Intrusion Detection System, or NIDS, is a security tool designed to
scrutinize network traffic and pinpoint any potential breaches or harmful activities. It
functions at the network level and examines network packets to identify any behavior that
may be suspicious or not authorized.
iii. HIDS
A Host-based Intrusion Detection System, abbreviated as HIDS, is a security system
structured to observe and dissect actions taking place on specific host machines, like
servers or personal workstations, with the aim of detecting potential breaches or harmful
operations. In contrast to Network-based Intrusion Detection Systems (NIDS) that scrutinize
network traffic, HIDS concentrates on the operations carried out directly on the host system.
1. Network Firewalls:
Network Firewalls, also known as hardware firewalls, are typically positioned at the
edge of a network to regulate and monitor incoming and outgoing network traffic. They
operate by adhering to predefined security rules to either accept or reject specific traffic
data. These firewalls can protect an entire local network and are commonly used by
businesses. They filter packets based on IP addresses, domain names, protocols, ports,
1
and other criteria. Examples of network firewalls include packet filtering firewalls,
stateful inspection firewalls, and next-generation firewalls (NGFWs).
2. Host-based Firewalls:
i. Symmetric Key System: Kerberos uses symmetric encryption, which means the
same key is used to encrypt and decrypt messages. This choice for symmetric
encryption is because it's generally faster than asymmetric encryption, which is
crucial for a system like Kerberos that may need to handle thousands or millions
of requests per minute.
iii. Key Distribution Center (KDC): The KDC is the trusted third party that validates
clients' identities. It consists of the Authentication Server (AS) and the Ticket-
Granting Server (TGS). The AS verifies the client's identity and provides a TGT,
while the TGS issues service tickets based on the TGT.
iv. Mutual Authentication: Both the user and the server verify each other's identity.
This process helps to ensure that users don't expose their credentials to impostor
servers and that servers don't provide data to unauthorized users.
v. Time-Sensitive: The tickets provided by Kerberos have a time limit for enhanced
security. If a ticket expires, the user must re-authenticate to get a new ticket.
vi. Single Sign-On (SSO): One of the main benefits of Kerberos is its ability to
provide single sign-on. Once users authenticate initially and receive their TGT,
they can access multiple services that trust the KDC without needing to reenter
their credentials.
2
(4) Discuss the following types of security threats
A. Bots
Bots are software programs or scripts that perform automated tasks on the Internet.
i. Malware bots; These bots can be used for various malicious activities, such as
distributed denial-of-service (DDoS) attacks, spam distribution, spreading malware,
data exfiltration, and credential theft.
ii. Web scrapping bots; While web scraping itself is not malicious, some bots may
engage in scraping activities with malicious intent, such as scraping sensitive
information, violating website terms of service, or stealing intellectual property.
iii. Spam bots; Spam bots are bots that automatically generate and distribute spam
emails or messages across various communication platforms. They are used by
spammers to flood inboxes with unsolicited and often malicious content, including
phishing attempts, scams, and malware distribution.
B. Rootkit
(5) With the aid of a suitable example describe how the following can be used to
protect email systems.
i.
Antivirus Software: Antivirus software can help protect an email system by
scanning incoming and outgoing emails for known threats, such as malware or
phishing attempts. For example, Norton Antivirus will scan your emails for
suspicious attachments and links. If it finds a potential threat, it will remove the
suspicious item or quarantine the email.
ii. Spam Filters: Spam filters can protect email systems by preventing spam emails
from reaching your inbox. These spam emails often contain phishing attempts,
malware, or other security threats. For instance, Gmail has a robust spam filter
that uses machine learning and community reporting to keep spam emails out of
your inbox.
3
iii. Secure Protocols (S/MIME): S/MIME (Secure/Multipurpose Internet Mail
Extensions) is a protocol that allows for encrypted and digitally signed emails.
This protects the confidentiality and integrity of emails. For example, Apple Mail
supports S/MIME, allowing users to send and receive encrypted emails.
v. Employee Education: This isn't a technical solution, but it's a vital part of any
cybersecurity strategy. By educating employees about common email threats
(like phishing emails or suspicious attachments), how to use security tools, and
the importance of good password hygiene, organizations can significantly reduce
the risk of an email-based attack.
Setup:
Before the key exchange begins, both parties, often referred to as Alice and Bob, agree on
certain parameters:
These parameters are public and known to both Alice and Bob but are not secret.
a. Alice's Steps:
Alice computes her public value, A, using the formula: A = g^a mod p.
4
Alice sends her public value, A, to Bob over the insecure communication channel.
b. Bob's Steps:
Bob computes his public value, B, using the formula: B = g^b mod p.
Bob sends his public value, B, to Alice over the insecure communication channel.
After exchanging their public values, Alice and Bob perform the following calculations to
derive the shared secret key:
a. Alice's Calculation:
Alice uses Bob's public value, B, and her private key, a, to compute the shared secret key,
K, using the formula: K = B^a mod p.
b. Bob's Calculation:
Bob uses Alice's public value, A, and his private key, b, to compute the shared secret key,
K, using the formula: K = A^b mod p.
Both Alice and Bob now have the same shared secret key, K, which they can use for
symmetric encryption or other cryptographic operations.
(6)Distinguish the following
(a) Public-Key Cryptography and Secret-key encryption
5
encrypt messages using the recipient's public key and the recipient can decrypt
them using their corresponding private key. The public keys are distributed
openly, eliminating the need for secure key distribution.
(8)Explain how the HILL cipher algorithm works. You may use the plaintext PLAY to
and the key SECRET to show its encipherment procedure.
The Hill cipher algorithm is a symmetric encryption technique that operates on blocks of
plaintext and uses matrix multiplication to achieve encryption and decryption.
Convert to 2 x 2 matrix
SE
CR
Divide the plain text into same length as the key matrix
PL
AY
Assign numerical values to each letter of the plaintext based on their positions in the
alphabet, starting from 0. In this case, P=15, L=11, A=0, and Y=24.
Multiply each block of the plaintext by the key matrix modulo 26.
Convert the resulting matrix back into alphabetical characters by mapping the numerical
values to their corresponding letters. In this case, 17=P, 5=F, 10=K, and 4=E.
(9)
6
1 Let f(a;b) & f(c;d) be two affine ciphers s/t
f(a;b)(x) (a:x + b) mod 26
f(c;d)(x) (c:x + d) mod 26
Is f(c;d) f(a;b) a stronger encryption scheme than f(a;b)?
f(c;d)(x) (c:x + d) mod 26
(10) Using Affine Cipher Theory and given;a=9 and b=4, Encrpt the word "MAZERAS"
and show the resulting cipher text.
Encryption formula is ax + b mod 26