Introduction To The Osi Seven Layer Model Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Networking is a prime concern for information security. The ubiquitous nature of network connectivity may let us access the world from our computer, but it also lets that same world gain access back to us in ways we may not desire. No matter how well we secure our own hosts, we are still vulnerable if the parts of the infrastructure between our distant destinations and ourselves fall victim to intentional exploitation or unwitting mishap. Information security and data networking are inextricably linked topics.

Today's network engineer has no choice but to be security-conscious, and the security engineer has no choice but to understand the network he is tasked to secure.

Like many ISO standards, much of its formal theory does not make it into the real world of actual implementation, but the powerful concepts that the OSI model present are a key element in most modern network system designs. Anyone who has worked with data networking or security has likely heard the terms "layer three" or "layer two" or "application layer."

Layer One - the Physical Layer

The physical layer is responsible for the physical communication between end stations. It is concerned with the actual encoding and transmission of data in electromechanical terms of voltage and wavelength [2, 3, 4, 5, and 6]. For purposes of information security we can widen this definition to apply to all physical world factors, such as physical media and input device access, power supply, and any other issue bounded by physical terms.

Layer Two - Data Link Layer

The Data Link Layer is concerned with the logical elements of transmissions between two directly connected stations. It deals with issues of local topology where many stations may share a common local media. This is the layer where data packets are prepared for transmission by the physical layer. The data link layer is the realm of MAC addresses and VLANs as well as WAN protocols such as Frame Relay and ATM.

Switch issues such as broadcast and collision domains are a layer two concern. It is also the realm of wireless protocols such as the various flavors of 802.11 wireless networking [2, 3, 4, 5, 6]. For discussion purposes we will consider layer two to pertain to any direct data transmission issue, including modems, wireless and WAN circuits.

Layer Three - Network Layer

The Network layer is concerned with the global topology of the internet work - it is used to determine what path a packet would need to take to reach a final destination over multiple possible data links and paths over numerous intermediate hosts. This layer typically uses constructs such as IP addresses to identify nodes, and routing tables to identify overall paths through the network and the more immediate next-hop that a packet may be forwarded to. Protocols such as ARP facilitate that process, giving layer two mapping to layer three addresses, and telling layer three what link-layer path should be taken to follow its routing table's indication of the appropriate path. In the opposite direction, protocols such as IP will identify their higher-level layer four transmission protocol such as TCP or UDP in order to direct layer four as to how the incoming data should be handled [2, 3, 4, 5, and 6].

Layer Four - Transport Layer

The Transport Layer is concerned with the transmission of data streams into the lower layers of the model, taking data streams from above and packaging them for transport, and with the reassembly and passing of incoming data packets back into a coherent stream for the upper layers of the model. Transport protocols may be designed for high reliability and use mechanisms to ensure data arrives complete at its destination, such as the TCP protocol, or protocols may choose to reduce overhead and simply depend upon the best efforts of the lower layers to deliver the data, and the protocols of the upper layers to ensure success to the levels they require, such as with the UDP protocol. Transport protocols may implement flow control, quality of service, and other data stream controls to meet their transmission needs [2, 3, 4, 5, and 6].

Layer Five- Session Layer

The Session Layer is concerned with the organization of data communications into logical flows. It takes the higher layer requests to send data and organizes the initiation and cessation of communication with the far end host. The session layer then presents its data flows to the transport layer below where actual transmission begins. Session protocols will often deal with issues of access and accessibility, allowing local applications to identify and connect to remote services, and advertising services to remote clients and dealing with subsequent requests to connect. The session layer also deals with higher-order flow control from an application perspective; just as the transport layer may control transmission from a network-oriented perspective and limit the flow to match the available network capacity, the session layer may control the flow up through to the application layer and limit the rate that data enters or leaves that realm based on arbitrary or dynamic limits [2, 3, 4, 5, 6].

Layer Six- Presentation Layer

The Presentation Layer deals with the organization of data passed from the application layer into the network. This layer allows for the standardization of data and the communication of data between dissimilar hosts, such as platforms with different binary number representation schemes or character sets (ASCII vs. UNICODE, for example.) Presentation Layer protocols typically rely upon a standardized data format for use on the network, and various conversion schemes to convert from the standardized format into and out of specific local formats. The Presentation Layer can also control network-layer enhancements such as compression or encryption [2, 3, 4, 5, and 6].

Layer Seven- Application Layer

The Application Layer deals with the high-level functions of programs that may utilize the network. User interface and primary function live at this layer. All functions not pertaining directly to network operation occur at this layer [2, 3, 4, 5, and 6].

Q2. Why is polyalphabetic substitution superior to monoalphabetic substitution?

Answer: In cryptography, a substitution cipher is a method of encryption by which units of plaintext are replaced with ciphertext according to a regular system; the "units" may be single letters (the most common), pairs of letters, triplets of letters, mixtures of the above, and so forth. The receiver deciphers the text by performing an inverse substitution.

Substitution ciphers can be compared with transposition ciphers. In a transposition cipher, the units of the plaintext are rearranged in a different and usually quite complex order, but the units themselves are left unchanged. By contrast, in a substitution cipher, the units of the plaintext are retained in the same sequence in the ciphertext, but the units themselves are altered.

There are a number of different types of substitution cipher. If the cipher operates on single letters, it is termed a simple substitution cipher; a cipher that operates on larger groups of letters is termed polygraphic. A monoalphabetic cipher uses fixed substitution over the entire message, whereas a polyalphabetic cipher uses a number of substitutions at different times in the message, where a unit from the plaintext is mapped to one of several possibilities in the ciphertext and vice-versa.

Monoalphabetic Substitution

One simple example of symmetric key cryptography is the Monoalphabetic substitution.

In this case, the relationship between a character in the plaintext and a character in the

Ciphertext is always one-to-one. An example Monoalphabetic substitution is the Caesar cipher. In this approach a character in the ciphertext is substituted by another character shifted by three places, e.g. A is substituted by D. Key feature of this approach is that it is very simple but the code can be attacked very easily.

Polyalphabetic Substitution

This is an improvement over the Caesar cipher. Here the relationship between a character in the plaintext and a character in the ciphertext is always one-to-many.

Example of polyalphabetic substitution is the Vigenere cipher. In this case, a particular character is substituted by different characters in the cipher text depending on its position in the plaintext. Explains the polyalphabetic substitution. Here the top row shows different characters in the plaintext and the characters in different bottom rows show the characters by which a particular character is to be replaced depending upon its position in different rows from row-0 to row-25.

Polyalphabetic is more superior then monoalphabetic because monoalphabetic is very simple but the code can be attacked very easily, and polyalphabetic is more complex and the code is harder to attack successfully.

Q3.Why is conventional encryption/decryption method not suitable for a bank?

Answer: Conventional Cryptography: In conventional cryptography, also called secret‐key or symmetric‐key encryption, one key is used both for encryption and decryption. The Data Encryption Standard (DES) is an example of a conventional cryptosystem that is widely employed by the Federal Government. Conventional encryption has benefits. It is very fast. It is especially useful for encrypting data that is not going anywhere. However, conventional encryption alone as a means for transmitting secure data can be quite expensive simply due to the difficulty of secure key distribution. Recall a character from your favorite spy movie: the person with a locked briefcase handcuffed to his or her wrist. What is in the briefcase, anyway? It's probably not the missile launch code/biotoxin formula/invasion plan itself. It's the key that will decrypt the secret data. For a sender and recipient to communicate securely using conventional encryption, they must agree upon a key and keep it secret between themselves. If they are in different physical locations, they must trust a courier, the Bat Phone, or some other secure communication medium to prevent the disclosure of the secret key during transmission. Anyone who overhears or intercepts the key in transit can later read, modify, and forge all information encrypted or authenticated with that key. From DES to Captain Midnight's Secret Decoder Ring, the persistent problem with conventional encryption is key distribution: how do you get the key to the recipient without someone intercepting it?

So in the banks we don't use conventional encryption/decryption because there are only one key is used both for encryption and decryption and any attacker can easily hack that key and after hacking of our key our all data will be unsafe, So that we don't use conventional method because it is unsafe for the important transactions like banking.

PART - B

Q4. Define types of attacks based on what is known to the attacker.

Answer: Hacker Attacks

I use the term "hacker attacks" to indicate hacker attacks that are not automated by programs such as viruses, worms, or Trojan horse programs. There are various forms that exploit weakness in security. Many of these may cause loss of service or system crashes.

IP spoofing - An attacker may fake their IP address so the receiver thinks it is sent from a location that it is not actually from. There are various forms and results to this attack.

The attack may be directed to a specific computer addressed as though it is from that same computer. This may make the computer think that it is talking to itself. This may cause some operating systems such as Windows to crash or lock up.

Gaining access through source routing. Hackers may be able to break through other friendly but less secure networks and get access to your network using this method.

Man in the middle attack -

Session hijacking - An attacker may watch a session open on a network. Once authentication is complete, they may attack the client computer to disable it, and use IP spoofing to claim to be the client who was just authenticated and steal the session. This attack can be prevented if the two legitimate systems share a secret which is checked periodically during the session.

Server spoofing - A C2MYAZZ utility can be run on Windows 95 stations to request LANMAN (in the clear) authentication from the client. The attacker will run this utility while acting like the server while the user attempts to login. If the client is tricked into sending LANMAN authentication, the attacker can read their username and password from the network packets sent.

DNS poisoning - This is an attack where DNS information is falsified. This attack can succeed under the right conditions, but may not be real practical as an attack form. The attacker will send incorrect DNS information which can cause traffic to be diverted. The DNS information can be falsified since name servers do not verify the source of a DNS reply. When a DNS request is sent, an attacker can send a false DNS reply with additional bogus information which the requesting DNS server may cache. This attack can be used to divert users from a correct web server such as a bank and capture information from customers when they attempt to logon.

Password cracking - Used to get the password of a user or administrator on a network and gain unauthorized access.

Q5. Write a Program to implement polyalphabetic substitution ciphers.

Answer:

#include <stdio.h>

#include <ctype.h>

#include <string.h>

#include <process.h>

void vigenereCipher(char *,char *);

void encipher();

void decipher();

void main()

{

int choice;

//loop takes choice from user and calles appropriate function

while(1)

{

printf("\n1. Encrypt Text\n");

printf("2. Decrypt Text\n");

printf("3. Exit\n");

printf("Enter Your Choice : ");

scanf("%d",&choice);

fflush(stdin);

if(choice == 3)

exit(0);

else if(choice == 1)

encipher();

else if(choice == 2)

decipher();

else

printf("Please Enter Valid Option.");

}

}

void encipher()

{

unsigned int i,j;

char input[257],key[33];

printf("Enter Text to be Encrypted [Max. 256 characters/ only alphabets]:\n ");

gets(input);

printf("Enter Encryption Key [Max. 32 Characters/ only aphabets]: ");

gets(key);

for(i=0,j=0;i<strlen(input);i++,j++)

{

//repeat the key if you are at end of it.

if(j>=strlen(key))

{

j=0;

}

//actual logic -> character from input + character from key % 26 is encrypted charater

printf("%c",65+(((toupper(input[i])-65)+(toupper(key[j])-65))%26));

}

}

void decipher()

{

unsigned int i,j;

char input[257],key[33];

int value;

printf("Enter Text to be Decrypted [Max. 256 characters/ only alphabets]:\n ");

gets(input);

printf("Enter Decryption Key [Max. 32 Characters/ only aphabets]: ");

gets(key);

for(i=0,j=0;i<strlen(input);i++,j++)

{

//repeat the key if you are at end of it.

if(j>=strlen(key))

{

j=0;

}

//similar to encipher only difference is you need to subtract

value = (toupper(input[i])-64)-(toupper(key[j])-64);

//if value is negative. We have to rotate it backwards (like backwards from z,y,x)

//so add it to 26 (it's a negative value to adding will actually cause subtraction) to get original character.

if( value < 0)

{

value = 26 + value;

}

printf("%c",65 + (value % 26));

}

}

Q6. Encrypted the following plain text by Playfair substitution.

"wearediscoveredsaveyourself"

Answer:

#include<stdio.h>   

#include<string.h>   

#include<process.h>   

void  usage(int argc );   

int   getx(char c);   

int   gety(char c);   

char box[5][5]={'p' , 'l' , 'a' , 'y' , 'f',    

'i' , 'r' , 'b' , 'c' , 'd',   

'e' , 'g' , 'h' , 'k' , 'm',   

'n' , 'o' , 'q' , 's' , 't',   

'u' , 'v' , 'w' , 'x' , 'z'   

};   

void main(int argc , char *argv[])   

{   

    usage(argc);   

    FILE *fpin,*fpout;   

    char temp1,temp2,out1,out2;   

    int firstx,firsty,secondx,secondy;   

    if((fpin=fopen(argv[1],"rb"))==NULL)   

    {   

        printf("%s open failed!\n",argv[1]);   

        exit(0);   

    }   

    if((fpout=fopen(argv[2],"wb"))==NULL)   

    {   

        printf("%s create failed!\n",argv[2]);   

        exit(0);   

    }   

    while(temp1=fgetc(fpin),!feof(fpin))   

    {   

        while(temp1=fgetc(fpin),!feof(fpin))   

        {   

            temp2=fgetc(fpin);   

            if(feof(fpin))   

            {   

                temp2='x';   

                printf("xÌæ´úÁ˽áβ!\n");   

            }    

        }   

        if(temp1==temp2)   

        {   

            fseek(fpin,-1L,1);   

            temp2='x';   

        }   

        if(temp1=='j')   

            temp1='i';   

        if(temp2=='j')   

            temp2='i';   

        firstx=getx(temp1);   

        firsty=gety(temp1);   

        secondx=getx(temp2);   

        secondy=gety(temp2);   

        if(firstx==secondx)   

        {   

            out1=box[firstx][((firsty+6)%5)];   

            out2=box[firstx][((secondy+6)%5)];   

        }   

        else if(firsty==secondy)   

        {   

            out1=box[((firstx+1)%5)][firsty];   

            out2=box[((secondx+1)%5)][firsty];   

        }   

        else   

        {   

            out1=box[firstx][secondy];   

            out2=box[secondx][firsty];   

        }   

        fputc(out1,fpout);   

        fputc(out2,fpout);   

    }   

    printf("ok!\n");   

    fclose(fpin);   

    fclose(fpout);   

}   

void usage(int argc )   

{   

    if(argc!=3)   

    {   

        printf("usage: playfair sourcefile destfile\n");   

        exit(0);   

    }   

}   

int getx(char c)   

{   

    int k=0;   

    for(int i=0;i<5;i++)   

    {   

        for(int j=0;j<5;j++)   

            if(box[i][j]==c)   

                k=i;   

    }   

    return k;   

}   

int gety(char c)   

{   

    int k=0;   

    int i;   

    int j;   

    for(i=0;i<5;i++)   

    {   

        for(j=0;j<5;j++)   

            if(box[i][j]==c)   

                k=j;   

    }   

    return k;   

}

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.