Network Security Lab Manual
Network Security Lab Manual
LAB MANUAL
VI SEMESTER
Prepared by:
Presilla R
Assistant Professor
Evangeline RC
Assistant Professor
Vani ES
Assistant Professor
Scheme:(2021)
TABLE OF CONTENTS
3. Syllabus 4
5. Programs 7
6. Viva 33
7. References 34
NETWORK SECURITY LAB
Vision
To achieve excellence in information science and engineering by empowering students with state-of-the-art
technology and skills, inspiring them to drive innovation and entrepreneurship in addressing global challenges.
Mission
Program Outcomes
PO- Engineering knowledge: Apply the knowledge of mathematics, science, engineering fundamentals,
1 and an engineering specialization to the solution of complex engineering problems. .
Problem analysis: Identify, formulate, review research literature, and analyze complex engineering
PO-
problems reaching substantiated conclusions using first principles of mathematics, natural sciences,
2
and engineering sciences
Design/development of solutions: Design solutions for complex engineering problems and design
PO-
system components or processes that meet the specified needs with appropriate consideration for the
3
public health and safety, and the cultural, societal, and environmental considerations
Conduct investigations of complex problems: Use research-based knowledge and research methods
PO-
including design of experiments, analysis and interpretation of data, and synthesis of the information
4
to provide valid conclusions.
Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
PO-
engineering and IT tools including prediction and modeling to complex engineering activities with an
5
understanding of the limitations.
The engineer and society: Apply reasoning informed by the contextual knowledge to assess societal,
PO-
health, safety, legal and cultural issues and the consequent responsibilities relevant to the professional
6
engineering practice.
Environment and sustainability: Understand the impact of the professional engineering solutions in
PO-
societal and environmental contexts, and demonstrate the knowledge of, and need for sustainable
7
development.
PO- Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of
8 the engineering practice
PO- Individual and team work: Function effectively as an individual, and as a member or leader in diverse
9 teams, and in multidisciplinary settings.
Project management and finance: Demonstrate knowledge and understanding of the engineering and
PO-
management principles and apply these to one’s own work, as a member and leader in a team, to
11
manage projects and in multidisciplinary environments.
PO- Life-long learning: Recognize the need for, and have the preparation and ability to engage in
12 independent and life-long learning in the broadest context of technological change.
Student will be able to understand the architecture and working of computer system with relevant system
software and apply appropriate system calls.
Student will be able to apply mathematical methodologies in modelling real world problems for the
development of software applications using algorithms, data structures and programming tools.
Cryptography
The art or science encompassing the principles and methods of transforming an intelligible message into one that
is unintelligible, and then retransforming that message back to its original form
Cipher An algorithm for transforming an intelligible message into one that is unintelligible by
transposition and/or substitution methods
Key Some critical information used by the cipher, known only to the sender& receiver
Encipher (encode) The process of converting plaintext to cipher text using a cipher and a key
Decipher (decode) the process of converting cipher text back into plaintext using a cipher and a key
Cryptanalysis The study of principles and methods of transforming an unintelligible message back into
an intelligible message without knowledge of the key. Also called code breaking
Code An algorithm for transforming an intelligible message into an unintelligible one using a code-book.
Teaching Methodology:
Black board Teaching
PowerPoint Presentation
Assessment Methods:
Two internals, 15Marks each will be conducted and the Average of two will be taken.
5M for viva-voce (Average of two internals)
30M for CIE (Rubrics)
Course Outcome:
P P P P P P P P P PO PO PO PS PSO
O O O O O O O O O 10 11 12 O1 2
1 2 3 4 5 6 7 8 9
CO1 3 3 3 2 2 2 2 2 2
CO2 3 3 3 2 2 2 2 2 2
CO3 3 3 3 2 2 2 2 2 2
CO4 3 3 3 2 2 2 2 2 2
21ISL 3 3 3 2 2 2 2 2 2
66
Course Content
1. Imagine you're tasked with ensuring secure communication among field operatives in a
covert operation. Design a C program implementing the Caesar Cipher algorithm to encrypt
and decrypt messages exchanged between operatives, taking 'hello how are u' as the sample
message and ensuring its confidentiality amidst potential interceptions
2. Write a C program that encrypts a messages using a monoalphabetic cipher. Encrypt the
plaintext 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG' with the key
'QWERTYUIOPASDFGHJKLZXCVBNM' and print the resulting ciphertext. Then,
decrypt the ciphertext 'QWE R TUIK BRGOS FXJVN TWHUZ SDG' using the same key
and print the resulting plaintext."
Develop a C program to perform encryption using the Playfair Cipher algorithm, where the
3. user provides a key and a message to be encrypted and decrypted, facilitating secure
communication in a network laboratory setting."
4. Develop a C program for encryption using the Hill Cipher algorithm, allowing users to
input a matrix key and a message to ensure secure communication."
5. Develop a C program to encrypt and decrypt messages using the Polyalphabetic Cipher
algorithm, employing the key 'deceptive' and the plaintext 'wearediscoveredsaveyourself'
6. User A want to communicate to user B but they want to user Asymmetric Key Cryptography
by using RSA algorithms send message to each other.encrypt message at sender side and
decrypt it at receiver side
7. Develop a mechanism to setup a security channel using Diffie-Hellman Key Exchange
between client and server
8. User C want to send message “welcome to ISE” to user D by using AES algorithms encrypt
it and decrypt it at receiver end.
Flow of program The problem The logical The logical The problem
logic statement structure is mostly structure is statement lacks a
follows a clear clear, with only somewhat unclear coherent logical
and logical minor instances of or disjointed, structure, making
sequence of ambiguity or requiring some it difficult to
ideas, confusion. effort to follow understand the
facilitating easy (8) the flow of ideas. sequence of ideas.
understanding. (6) (3)
(10)
1)Imagine you're tasked with ensuring secure communication among field operatives in a covert operation.
Design a C program implementing the Caesar Cipher algorithm to encrypt and decrypt messages
exchanged between operatives, taking 'hello how are u' as the sample message and ensuring its
confidentiality amidst potential interceptions.
ALGORITHM:
Program:
#include <stdio.h>
void caesar(char text[], int shift) {
for (int i = 0; text[i] != '\0'; ++i) {
int main() {
char message[] = "hello how are u";
int key = 3;
// Encryption
caesar(message, key);
printf("Encrypted message: %s\n", message);
// Decryption
caesar(message, -key);
printf("Decrypted message: %s\n", message);
return 0;
}
OUTPUT:
Monoalphabetic cipher
Aim:
The aim of a monoalphabetic cipher is to encrypt plaintext messages to prevent unauthorized individuals from
understanding the content of the communication. It provides a basic level of confidentiality by substituting each
letter with another letter from a fixed mapping.
Description:
In a monoalphabetic cipher, the mapping between the plaintext alphabet and the ciphertext alphabet remains
constant throughout the encryption process. For example, if we shift each letter of the plaintext alphabet by three
positions to the right, 'A' would become 'D', 'B' would become 'E', and so on. The same mapping applies to every
occurrence of each letter in the plaintext.
2. Write a C program that encrypts and decrypts messages using a monoalphabetic cipher. Encrypt the
plaintext 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG' with the key
'QWERTYUIOPASDFGHJKLZXCVBNM' and print the resulting ciphertext. Then, decrypt the ciphertext
'QWE R TUIK BRGOS FXJVN TWHUZ SDG' using the same key and print the resulting plaintext."
Algorithm:
1. Include necessary header files: `<stdio.h>` for standard input/output functions and `<string.h>` for string
manipulation functions
- Declare a character array `ciphertext` to store the encrypted text, sized to accommodate the length of
`plaintext` plus one for the null terminator.
- Declare a character array `plaintext` to store the decrypted text, sized to accommodate the length of
`ciphertext` plus one for the null terminator.
- Decrypt it by finding its position in the `key` and mapping it back to an uppercase letter.
- Initialize character arrays `plaintext` and `key` with the original plaintext and the encryption key, respectively.
6. Execute the program to demonstrate encryption and decryption of text using a monoalphabetic cipher.
Program:
#include <stdio.h>
#include <string.h>
// Function to encrypt plaintext using monoalphabetic cipher
void encrypt(char plaintext[], char key[]) {
int i;
char ciphertext[strlen(plaintext) + 1];
for (i = 0; plaintext[i] != '\0'; i++) {
if (plaintext[i] >= 'A' && plaintext[i] <= 'Z') {
ciphertext[i] = key[plaintext[i] - 'A'];
} else if (plaintext[i] >= 'a' && plaintext[i] <= 'z') {
ciphertext[i] = key[plaintext[i] - 'a'];
} else {
ciphertext[i] = plaintext[i];
}
}
ciphertext[i] = '\0';
printf("Ciphertext: %s\n", ciphertext);
}
// Function to decrypt ciphertext using monoalphabetic cipher
OUTPUT:
Plaintext: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
Ciphertext: ZIT JXOEA WKGVF YGB PXDHL GCTK ZIT SQMN RGU
Decrypted plaintext: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
DESCRIPTION: The Playfair cipher starts with creating a key table. The key table is a 5×5 grid of letters that
will act as the key for encrypting your plaintext. Each of the 25 letters must be unique and one letter of the alphabet
is omitted from the table (as there are 25 spots and 26 letters in the alphabet).
To encrypt a message, one would break the message into digrams (groups of 2 letters) such that, for example,
"HelloWorld" becomes "HE LL OW OR LD", and map them out on the key table. The two letters of the diagram
are considered as the opposite corners of a rectangle in the key table. Note the relative position of the corners of
this rectangle. Then apply the following 4 rules, in order, to each pair of letters in the plaintext:
1. If both letters are the same (or only one letter is left), add an "X" after the first letter
2. If the letters appear on the same row of your table, replace them with the letters to their immediate right
respectively
3.If the letters appear on the same column of your table, replace them with the letters immediately below
respectively
4. If the letters are not on the same row or column, replace them with the letters on the same row respectively but
at the other pair of corners of the rectangle defined by the original pair.
3. Develop a C program to perform encryption using the Playfair Cipher algorithm, where the user provides
a key and a message to be encrypted, facilitating secure communication in a network laboratory setting.
ALGORITHM:
STEP-3: Arrange the keyword without duplicates in a 5*5 matrix in the row order and fill the remaining cells
with missed out letters in alphabetical order. Note that ‘i’ and ‘j’ takes the same cell.
STEP-4: Group the plain text in pairs and match the corresponding corner letters by forming a rectangular grid.
Program
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* Function for Playfair Cipher encryption */
void Playfair(char str[], char keystr[]) {
char keyMat[5][5];
// Key & plainText
char ks = strlen(keystr);
char ps = strlen(str);
void toUpperCase(char encrypt[], int ps) {
/*this function looks for a digraph's characters in the key matrix and returns their positions.*/
void search(char keyMat[5][5], char a, char b, int arr[]) {
if (a == 'j')
a = 'i';
else if (b == 'j')
b = 'i';
for(int i = 0; i < 5; i++) {
for(int j = 0; j < 5; j++) {
if (keyMat[i][j] == a) {
arr[0] = i;
arr[1] = j;
}
else if (keyMat[i][j] == b) {
arr[2] = i;
arr[3] = j;
}
}
}
}
/* This function avoids duplication and levels out the length of plain text by making it even.*/
int prep(char str[], int p) {
int sub = p;
for (int i = 0; i < sub; i += 2) {
if(str[i]==str[i+1]){
for(int j=sub; j>i+1; j--){
str[j]=str[j-1];
}
str[i+1]='x';
sub+=1;
}
}
str[sub]='\0';
if (sub % 2 != 0) {
str[sub++] = 'z';
str[sub] = '\0';
}
return sub;
}
// Here, the encryption is done.
void encrypt(char str[], char keyMat[5][5], int pos) {
int a[4];
for(int i=0; i<pos; i+=2){
search(keyMat, str[i], str[i + 1], a);
if (a[0] == a[2]) {
str[i] = keyMat[a[0]][(a[1] + 1)%5];
str[i + 1] = keyMat[a[0]][(a[3] + 1)%5];
}
else if (a[1] == a[3]) {
str[i] = keyMat[(a[0] + 1)%5][a[1]];
str[i + 1] = keyMat[(a[2] + 1)%5][a[1]];
}
else {
str[i] = keyMat[a[0]][a[3]];
str[i + 1] = keyMat[a[2]][a[1]];
}
}
}
ks = removeSpaces(keystr, ks);
ps = removeSpaces(str, ps);
ps = prep(str, ps);
createMatrix(keystr, ks, keyMat);
encrypt(str, keyMat, ps);
toUpperCase(str, ps);
/* str is the final encrypted string in uppercase */
printf("Cipher text: %s\n", str);
}
int main() {
char string[200], keyString[200];
printf("Enter key: ");
scanf("%[^\n]s", &keyString);
printf("Enter plaintext: ");
scanf("\n");
scanf("%[^\n]s", &string);
OUTPUT:
4. Develop a C program for encryption using the Hill Cipher algorithm, allowing users to input a matrix
key and a message to ensure secure communication."
ALGORITHM:
STEP-1: Read the plain text and key from the user.
STEP-2: Split the plain text into groups of length three.
STEP-3: Arrange the keyword in a 3*3 matrix.
STEP-4: Multiply the two matrices to obtain the cipher text of length three.
STEP-5: Combine all these groups to get the complete cipher text.
Program:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#define MAX_SIZE 10
// Pad the message with 'X' to make its length a multiple of keySize
for (i = 0; i < messageLength; i++) {
paddedMessage[i] = message[i] - 'A';
}
for (; i < paddedLength; i++) {
paddedMessage[i] = 23; // 'X' - 'A' = 23
}
int main() {
int keySize, keyMatrix[MAX_SIZE][MAX_SIZE], i, j;
char message[1000];
return 0;
}
OUTPUT:
5. Develop a C program to encrypt and decrypt messages using the Polyalphabetic Cipher algorithm,
employing the key 'deceptive' and the plaintext 'wearediscoveredsaveyourself'.
Aim:
Develop a C program to implement encryption and decryption using the Polyalphabetic Cipher algorithm with a
given key and plaintext.
Description:
The Polyalphabetic Cipher is a type of substitution cipher where multiple cipher alphabets are used to encrypt the
plaintext. The key is a keyword or phrase that determines the shifting pattern for each letter in the plaintext. In this
problem, we'll be implementing the Polyalphabetic Cipher algorithm with the key 'deceptive' and encrypting the
plaintext 'wearediscoveredsaveyourself'.
Example:
Given:
Plaintext: wearediscoveredsaveyourself
Key: deceptive
Encryption:
Algorithm:
1. Start with the given plaintext and key.
2. Repeat the key until it matches the length of the plaintext.
3. Encrypt or decrypt each letter in the plaintext using the corresponding letter in the repeated key:
a. For encryption: Add the numerical values of the plaintext letter and key letter, subtract 97 (the ASCII
value of 'a'), and take the remainder when divided by 26. Convert the result back to a letter.
b. For decryption: Subtract the numerical values of the key letter from the ciphertext letter, add 26 if
the result is negative, and convert the result back to a letter.
4. Output the resulting ciphertext or decrypted plaintext.
This algorithm ensures that each letter in the plaintext is encrypted or decrypted using a different shifting pattern
DEPARTMENT OF ISE, NMIT, BENGALURU 20
NETWORK SECURITY LAB
based on the corresponding letter in the key, providing stronger security compared to simple substitution ciphers.
Program:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char pt[MAX_LEN] = {'\0'}, ct[MAX_LEN] = {'\0'}, key[MAX_LEN] = {'\0'}, rt[MAX_LEN] = {'\0'};
int i, j;
// Encrypt plaintext
for (i = 0; i < strlen(pt); i++) {
ct[i] = (((pt[i] - 'a') + (key[i] - 'a')) % 26) + 'a'; // Ensure modulo operation works correctly
}
printf("\nCipher text is: %s\n", ct);
// Decrypt ciphertext
for (i = 0; i < strlen(ct); i++) {
return 0;
}
Output:
Enter the key: deceptive
6. User A want to communicate to user B but they want to user Asymmetric Key Cryptography by using
RSA algorithms send message to each other encrypt message at sender side and decrypt it at receiver side
Aim: Implement RSA asymmetric key cryptography to enable secure communication between User A and User B,
allowing them to encrypt messages at the sender side and decrypt them at the receiver side.
Description: RSA (Rivest-Shamir-Adleman) is a widely-used asymmetric encryption algorithm for secure
communication. It involves the use of a public key for encryption and a private key for decryption. In this scenario,
User A will use User B's public key to encrypt the message, and User B will use their private key to decrypt the
message.
Algorithm:
1. Key Generation:
User B generates a pair of RSA keys: a public key (e, n) and a private key (d, n).
The public key (e, n) is shared with User A, while the private key (d, n) is kept secret by User B.
c=me mod n.
User A sends the ciphertext c to User B.
User B uses their private key (d, n) to compute the original message m using the RSA decryption
formula: m=cd mod n.
Example:
Let's say User B generates RSA keys with the following parameters:
Public key (e, n): (17, 3233)
2. User A encrypts m using User B's public key: c=m 17 mod 3233
4. User B decrypts the ciphertext c using their private key:m=c 2753 mod 3233.
5. User B converts the integer m back into the plaintext message "HELLO".
This process ensures that only User B can decrypt the message using their private key, providing secure
communication between the two users.
Program:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
int main() {
RSA *rsa_A = NULL, *rsa_B = NULL;
unsigned char *plaintext = (unsigned char *)"Hello, User B!";
unsigned char ciphertext[MAX_LEN] = {0};
unsigned char decryptedtext[MAX_LEN] = {0};
// Encryption by User A
int encrypted_len = RSA_public_encrypt(strlen((char *)plaintext), plaintext, ciphertext, rsa_B,
RSA_PKCS1_PADDING);
if (encrypted_len == -1) {
fprintf(stderr, "Error encrypting message\n");
RSA_free(rsa_A);
RSA_free(rsa_B);
return 1;
}
// Decryption by User B
int decrypted_len = RSA_private_decrypt(encrypted_len, ciphertext, decryptedtext, rsa_B,
RSA_PKCS1_PADDING);
if (decrypted_len == -1) {
fprintf(stderr, "Error decrypting message\n");
RSA_free(rsa_A);
RSA_free(rsa_B);
return 1;
}
RSA_free(rsa_A);
RSA_free(rsa_B);
return 0;
}
Compile:
gcc -o rsa_example rsa_example.c -lssl –lcrypto
Output:
Encrypted message by User A: 75e5aa857a47e204c7d0c09c70d79ee8bf240051de...
Decrypted message by User B: Hello, User B!
[or]
#include <stdio.h>
int main() {
// Public and private keys
long long int p = 61;
long long int q = 53;
long long int n = p * q;
long long int phi = (p - 1) * (q - 1);
long long int e = 17; // Public exponent
long long int d = 413; // Private exponent
// Message to be encrypted
long long int plaintext = 123;
// Encryption
long long int ciphertext = encrypt(plaintext, e, n);
printf("Encrypted message: %lld\n", ciphertext);
// Decryption
long long int decryptedtext = decrypt(ciphertext, d, n);
printf("Decrypted message: %lld\n", decryptedtext);
return 0;
}
Output:
Encrypted message: 1692
Decrypted message: 123
7. Develop a mechanism to setup a security channel using Diffie-Hellman Key Exchange between client and
server
Aim: Develop a mechanism to establish a secure communication channel between a client and a server using the
Diffie-Hellman Key Exchange algorithm.
Description: The Diffie-Hellman Key Exchange algorithm allows two parties to establish a shared secret key over
an insecure communication channel without exchanging the key explicitly. This shared key can then be used for
encryption and decryption, ensuring secure communication between the parties.
Mechanism:
1. Setup:
Both the client and the server agree on two public parameters: a large prime number p and a
primitive root modulo g.
These parameters are typically chosen beforehand and are public knowledge.
2. Key Generation:
Both the client and the server generate their private keys:
Each party calculates their public key using the formula: A=ga mod p or B=gb mod p.
The public keys A and B are exchanged between the client and the server.
Once the public keys are exchanged, each party can calculate the shared secret key:
Both the client and the server now have the same shared secret key S, which can be used for
encryption and decryption.
After establishing the shared secret key, the client and the server can use symmetric encryption
algorithms (e.g., AES) with the shared key S to encrypt and decrypt messages exchanged between
them.
Example: Let's illustrate the Diffie-Hellman Key Exchange mechanism with a simple example:
1. Client and server agree on public parameters: p=23 and g=5.
2. Client chooses a=6 (private key), calculates A=56 mod 23=8, and sends A=8 to the server.
3. Server chooses b=15 (private key), calculates B=515 mod 23=19, and sends B=19 to the client.
6. Both client and server now have the shared secret S=2 and can use it for encryption and decryption.
This mechanism ensures that even if an eavesdropper intercepts the public keys exchanged between the client and
the server, they cannot determine the shared secret key without knowing the private keys, providing secure
communication between the two parties.
Program:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
exp /= 2;
}
return result;
}
int main() {
int private_key_client, private_key_server;
int public_key_client, public_key_server;
int shared_secret_client, shared_secret_server;
return 0;
}
Output:
8. User C want to send message “welcome to ISE” to user D by using AES algorithms encrypt it and decrypt
it at receiver end.
Aim: Implement the AES encryption algorithm to securely send a message from User C to User D and decrypt it
at the receiver end.
Description: AES (Advanced Encryption Standard) is a symmetric encryption algorithm widely used for securing
sensitive data. It operates on fixed-size blocks of data and supports key lengths of 128, 192, or 256 bits. In this
scenario, User C will encrypt the message "welcome to ISE" using AES encryption and send it to User D, who will
decrypt the message using the same key.
Mechanism:
1. Encryption (Sender Side):
User C selects a secret key (128, 192, or 256 bits) for AES encryption.
User C encrypts the plaintext message using the AES encryption algorithm and the secret key to
obtain the ciphertext.
User D uses the same secret key used by User C to encrypt the message.
User D decrypts the ciphertext using the AES decryption algorithm and the secret key to obtain
the original plaintext message.
Example:
Let's illustrate the AES encryption and decryption process using a simple example:
Plaintext message: "welcome to ISE"
User C encrypts the plaintext message "welcome to ISE" using AES encryption with the secret
key "mysecretkey12345".
User D decrypts the ciphertext using AES decryption with the same secret key
"mysecretkey12345".
Note: In practice, secure key exchange mechanisms (e.g., Diffie-Hellman) may be used to securely share the
secret key between User C and User D before encryption and decryption. Additionally, padding schemes may be
used to ensure that the plaintext message length is compatible with the block size of AES.
Program:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/aes.h>
int main() {
unsigned char plaintext[] = "welcome to ISE";
unsigned char ciphertext[AES_BLOCK_SIZE]; // AES block size is 128 bits
unsigned char decryptedtext[AES_BLOCK_SIZE];
printf("%02x", ciphertext[i]);
}
printf("\n");
printf("Decrypted message: %s\n", decryptedtext);
return 0;
}
Output:
Viva Questions
1. What is network security, and why is it important in modern computing?
2. Explain the CIA triad and its significance in network security.
3. How would you differentiate between authentication and authorization?
4. Define symmetric and asymmetric encryption algorithms and provide examples of each.
5. Can you explain how a digital signature functions and its relevance in network security?
6. Describe the purpose of cryptographic hash functions in network security.
7. Discuss common network-layer attacks like DoS and DDoS attacks.
8. What is ARP spoofing, and what measures can be taken to prevent it?
9. Explain how SSL/TLS protocols secure communication over the internet.
10. What role do firewalls play in network security, and what are the different types of firewalls?
11. How does an Intrusion Detection System (IDS) differ from a firewall, and what are its key components?
12. Can you explain how symmetric encryption works and provide an example of a symmetric encryption
algorithm?
13. What are some advantages and disadvantages of using symmetric encryption in network security?
14. How does the process of key distribution work in symmetric encryption systems?
15. Describe the principles behind asymmetric encryption and provide an example of an asymmetric
encryption algorithm.
16. What role do public and private keys play in asymmetric encryption, and how are they generated?
17. Discuss the advantages and limitations of asymmetric encryption compared to symmetric encryption.
18. Explain the purpose of cryptographic hash functions in network security.
19. What properties should a secure hash function possess?
20. How are hash functions used in digital signatures and data integrity verification?
21. Define digital signatures and their significance in ensuring message authenticity and integrity.
22. How does a digital signature scheme work, and what role do hash functions play in this process?
23. What are some potential vulnerabilities associated with digital signatures, and how can they be mitigated?
24. Describe the purpose of key exchange algorithms in establishing secure communication channels.
25. Explain the Diffie-Hellman key exchange algorithm and its significance in secure communication
protocols.
26. How does the RSA algorithm facilitate key exchange in asymmetric encryption systems?
27. What are block cipher modes of operation, and why are they important in symmetric encryption?
28. Describe the Electronic Codebook (ECB) and Cipher Block Chaining (CBC) modes, including their
strengths and weaknesses.
29. How does the initialization vector (IV) enhance the security of block cipher modes like CBC?
30. Define stream ciphers and provide an example of a stream cipher algorithm.
31. How do stream ciphers differ from block ciphers in terms of operation and application?
32. Discuss the advantages and limitations of stream ciphers compared to block ciphers.
33. What is cryptanalysis, and how does it relate to security algorithms?
34. Describe some common cryptanalysis techniques used to break encryption schemes.
35. How can encryption algorithms be strengthened against cryptanalysis attacks?
REFERENCES