CSC17 New Assignment: Due Wednesday 5/6 OVOAP: Our Very Own Authentication Protocol We've learned that authentication, or anti-spoofing, is a key instrument of network security. Packet filtering firewalls such as provided by Linux and iptables can give us a certain level of assurance, but there are ways to get around it. For example, we may try to refuse ssh service by blocking connections to port 22. But one can run the ssh server on some other port, or use DNAT to bounce from one port to another. One can also write a "proxy" rely program to accept data on one socket and send it over another. A properly configured firewall is very useful, especially if it can identify the physical origins of a packet. But this is often not possible, as for example, when wireless connections are present, or if our router depends on a higher-up router which may or may not implement the security measures we may wish to assume. We may also wish to authenticate a client (or server) based on more than just tcp/ip information, such as the username of the client. With a packet-filtering firewall, we often cannot afford to make it too rigid lest we put unnecessary restrictions on ourselves. By lifting authentication up to its own layer of abstraction (above tcp/ip), we give ourselfs greater flexibility in implementing security measures. For this assignment we will implement a simplified version of the "Kerberos" system, and which is described in chapter 8 of your textbook. Our protocol (OVOAP) depends on two key ingredients. The first is the existence of a "trusted" third-party authentication server - someone such as the official system administrator that you've decided is trustworthy. The second ingredient is an encryption scheme. and we'll use a very easy-to-implment two step scheme involving a "key" and a permutation. The key is a 512 byte randomly generated sequence assigned to your host (find in guest home directory). To apply the key to a 512 byte buffer, we apply the bitwise xor operation. The "perm" is a 2048 byte file that contains an array of 512 4-byte integers. the permutation allows us to permute the bytes of an array to different locations. Given: (BSIZE should be 512) byte[] Ms = new byte[BSIZE]; // message to be encrypted byte[] Cy = new byte[BSIZE]; // ciphertext buffer (encrypted Ms) byte[] keyA = new byte[BSIZE]; // key for connecting client int[] permA = new int[BSIZE]; // permutation for A The following code shows how to load the key/perm from file and apply them: // load permutation and key files: DataInputStream fink = new DataInputStream(new FileInputStream("my.key")); j = fink.read(keyA,0,BSIZE); fink.close(); DataInputStream finp = new DataInputStream(new FileInputStream("my.perm")); for(i=0;i