Showing posts with label Lecture Notes. Show all posts
Showing posts with label Lecture Notes. Show all posts

Sunday, January 11

INTERNET SECURITY : Networking Lecture Notes

TOPIC: INTERNET SECURITY



What is IPSec?
IPSecurity (IPSec) is a collection of protocols designed to provide security at the network layer.

Transport mode:  The IPSec header and trailer are added to the information  corning from the transport layer. The IP header is added later.

Tunnel mode: It takes an IP packet, including the header, applies IPSec security methods to the entire packet, and then adds a new IP header .


What are the protocols associated with IPSec?

Authentication Header (AH): provides source authentication and data integrity. The protocol uses a hash function and a symmetric key to create a message digest;


Encapsulating Security Payload (ESP) :source authentication ,data integrity and privacy


What are the reserved Addresses for private networks?
Prefix Range Total
10/8 10.0.0.0 to 10.255.255.255 2^24
172.16/12 172.16.0.0 to 172.31.255.255 2^20
192.168/16 192.168.0.0 to 192.168.255.255 2^16

What is Virtual private Network?

Virtual private network (VPN) is a technology that is  used by large organizations that use the global Internet for both intra- and inter organization communication, but require privacy in their internal communications.

VPN technology uses IPSec in the tunnel mode to provide authentication, integrity, and privacy.
All messages for internal communication will travel through Internet after encapsulated inside another packet using IPSec Tunneling.

The public network (Internet) is responsible for carrying the packet from Source side router  to destination side router. Outsiders cannot decipher the contents of the packet or the
source and destination addresses. Deciphering takes place at destination router, which finds the destination address of the packet and delivers it.

Explain Secure Socket layer (SSL)?

Secure Socket Layer (SSL) is designed to provide security and compression to data generated from the application layer.

1. SSL divides the data into blocks of 214 bytes or less.
2. Each fragment of data is compressed by using one of the lossless compression methods
3. To preserve the integrity of data, SSL uses a keyed-hash function to create a MAC.
4. To provide confidentiality, the original data is encrypted using symmetric key
5. A header is added to the encrypted payload. The payload is then passed to a reliable transport layer protocol.

Transport Layer Security (TLS) is the IETF standard version of SSL.

What is the use of Pretty Good Privacy (PGP)?
 PGP is designed to create authenticated and confidential e-mails.

What is Firewall?

A firewall is a device (usually a router) installed between the internal network of an organization and the rest of the Internet. It is designed to filter some packets.

Packet Filter: It can forward or block packets based on the IP addresses , Transport layer protocol or port addresses. It uses a filtering table to decide which packets must be discarded (not forwarded).

Proxy firewall: The server opens the packet at the application level and finds out if the request is legitimate.

Tuesday, June 19

Pointers (Lecture Notes) : CUSAT s1s2 Questions




Hi friends,

Here I'm posting some important concepts asked in CUSAT B Tech S1 S2 C programming examination. All the concepts are descried here in very briefly so that you can grasp it quickly.
Here we go..!!! :)



Pointer

· Pointer is a variable that represents the location of a data item.

· Address operator (&) : It evaluates the address of its operand.

· Indirection Operator(*): Used to access data item referenced by a pointer.

Example:

Main()

{

Int a=3;

Int *ptr;

Ptr=&a;

Printf(“%d %u” , *ptr, ptr);

}

Pointer to an array

· A pointer can be used to reference an array.

· The name of an array will work as the pointer to its first element.

Main()

{

Int a[]= { 1, 2 , 3, 4};

Int *ptr =a;

For(int i=0; i<4;i++)

{

Printf(“%d”,* ptr+i);

}

Arrays of Pointers

· A group of pointers are stored in an array.

· Arrays of pointers can be used to store multidimensional arrays

Datatype *array[size];

Structures:

· A collection of heterogeneous elements.

· In structure memory will be allocated for each element.

Struct student {

Char name[20];

Int mark;

};

Union

· Similar to structures, A collection of heterogeneous elements.

· Memory will be allocated for largest member only. Other members have to share this memory.

union student {

Char name[20];

Int mark;

};





Thursday, May 31

SELECTION SORT ~ CUSAT Previous Questions with Answers- C programming.( S1 S2)



Hi friends,

Here I'm posting a C program implementing Selection sort. It is specially dedicated to S1 S2 B tech students because Selection sort is one of the most frequently asking questions in "Computer  Programming" exams. Hope this will be Useful  4  you.!!! :)



#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n,i,j,temp,a[50]; 


printf("\nEnter how many elements=");
scanf("%d",&n); 


printf("\nEnter %d elements",n);//
Input the elements
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);




for(i=0;i<n-1;i++)//
Sorting the elements
{
for(j=i+1;j<n;j++)
{
if(a[i]>a[j])
{
temp=a[j];
a[j]=a[i];
a[i]=temp;
}
}
}
printf("\nSorted Array:\n");
for(i=0;i<n;i++)
{
printf("%d\n",a[i]);
}

}


Any doubt in the code? Comment it here..!!

Monday, May 28

CUSAT Previous Questions with Answers- C programming.( S1 S2)





Hi Friends,


here I'm posting one of the frequently asking question in CUSAT B tech C programming ( s 1 s2 ) and its solution:

Question:



Write a C program which prints all Armstrong numbers between 1 and 1000.


Solution:



#include<stdio.h>
main()
{
int number, temp, digit=0, dup;

printf("Printing all Armstrong numbers between 1 and 500:\n\n");

number = 1;

while (number <= 500)
{
temp=0;
dup=number;
while(dup>0)
{
digit=dup%10;
temp+=(digit*digit*digit);
dup=dup/10;
}
if (temp==number)
{
printf("\nAmstrong Number:%d", temp);
}
number++;
}
getch();
}