Posts

Showing posts with the label CS3550

CS3550 Final Exam

1. Identify True or False for the following statements: (10*1 = 10) (a) A TCP header has source and destination port address. ___ (b) OSI model has 5 layers. ___ (c) In a TCP/IP model, an application can communicate with the underneath transport layer through a port number. ____ (d) PDU header has the control information. ____ (e) UDP is an example of TCP protocol. _____ (f) HTTP is an example of TCP protocol. _____ (g) UDP provides a reliable connection for transferring data between applications. ___ (h) A TCP header is minimum 160 bits. _____ (i) TCP header does not contain sequence and acknowledge number. ____ (j) A UDP header has source and destination IP address. ____ 2. For TCP protocol, show the sequence of packet exchange for the following: (a) 3-way handshake, and (b) Connection closing or teardown. (3+3=6) Ans: 3. Briefly discuss three characteristics of TCP that ensure reliable communication. (2*3= 6) Ans: 4. Consider the following ...

Double Transposition in Java

/* Dalibor Labudovic*/ /* not stable */ package doubletransporition; import java.io.*; import java.util.*; class NewDoubleTransposition {     public static void main(String args[])     {         NewEncryptAndDecrypt ned=new NewEncryptAndDecrypt();         ned.input();     } } class NewEncryptAndDecrypt {     Scanner sc=new Scanner(System.in);     void input()     {         int ch;         do         {             System.out.println("\n\t\t*****ENTER*****");             System.out.println("\t1.Encrypt");             System.out.println("\t2.Decrypt");             System.ou...

Vigenere Cipher in Java

/* Dalibor Labudovic */ /* Not 100% stable but work ok*/ package cs3550; import java.util.Scanner; public class vigenerecipher {     public static void main(String[] args) {         @SuppressWarnings("resource")         Scanner input = new Scanner(System.in);                         System.out.println("Encyption...");         System.out.println("Enter Pass Phrase: ");         String phrase = input.nextLine();         System.out.println("Enter plain Text: ");         String plain = input.nextLine();         System.out.print("Here is the encryption: ");         String enc = encrypt(plain, phrase);     ...

CS3550 Test 1 Questions and Answers