Computer Security

G53SEC Computer Security Spring 2012/2013 Coursework 1 Name ID : : Arvinth Gunasegaran 005917 09/04/2013 Due limit : Introduction/Technique Cryptography is the act or custom of using techniques for retired message balance exoteric message channels. The meaning of this is to qualify the transmission of messages retiredly outside entity implicit by third parties. Cryptography is achieved by instrument of encryption, which is the command of transmuteing ordinary citation to nothinged citation using a key, either exoteric or not-public. The nothinged citation is then communicated to the receiver, who can decrypt it tail to ordinary citation using either a exoteric key (symmetric cryptography) or his or her not-national key (asymmetric cryptography). One of most far-famed symmetric encryption techniques is the Caesar nothing, or to-boot unreserved as the change nothing. It is a symbol of supply nothing that works by replacing each alphabet in plaincitation into a selfsame alphabet some unwandering reckon of positions either to the direct or left of the alphabet. The earliest Caesar nothing changeed all reputations to three positions to the direct. However, a change of any other reckon or to the left is to-boot used. Based on this, the external of the coursework is to amount a rear Caesar nothing encryption. The technique works by earliest choosing a unwandering reckon to change the ‘A’ reputation. Once the communication ‘A’ is changeed pleasantly, the repose of the alphabets are populated in, in rear. The copy underneath shows a single event of rear Caesar succeeding a while a change esteem of 3. A B C D E F G H I J K D C B A Z Y X W V U T In this event, the reckon to change is 3. Hence, the communication ‘A’ is earliest changeed 3 places to the direct. The repose of the alphabets are then listed in rear command, which instrument the communication ‘A’ is followed by the communication ‘Z’, ‘Y’ and ‘X’, instead of ‘B’, ‘C’, and ‘D’ love in ordinary Caesar nothings. Program Explanation The rear Caesar nothing is utensiled in Java. The earliest java arrange polish (Reverse. java), handles most of the algorithms needed to utensil the nothing. Firstly, a char dispose of extent 26 is created and all the alphabets are stored in it in ordinary command. Similarly, another leisure dispose of extent 26 is created for the meaning of storing the mapped esteems of each alphabet in the earliest dispose succeeding changeing. A scanner is used to get user input for the phrase they eagerness to encrypt and the reckon of places to change. Encrypt Mode This is the mode that is used to transmute the input citation to a nothinged citation. Firstly, the algorithm underneath sets the succor dispose created prior succeeding a while mapped esteems of the reputations produce the earliest dispose. int change=pass%26; //to compute modulus int count=0+(shift-1); //insert -1 to conceive the earliest char for (int a=0; a