Saturday, August 14, 2010

My Agent Security Scenario : The Discussion

Implementation of Caesar algorithm using Java programming language based on Mobile agent approach
Designed and Implemented by Omar Adnan Butros Isaid with ID 200530158
This system implemented as homework during the course in special topics in faculty computer networks system, semester 20091


The following papers represent the analysis of my implementation of ceaser cipher algorithm using Java language and Agent-oriented approach, after this analysis I enclosed the code of the system

This system consists of four classes :

  • Father Aglet
  • Encrypt Aglet
  • Decrypt Aglet
  • Global class

This four classes represents a system implements Caesar cipher algorithm . Caesar cipher is the first recorded substitution encryption algorithm. Caesar cipher is categorized under symmetric cryptography.

Requirements of Symmetric cryptography algorithm are:

  • encryption algorithm
  • Decryption algorithm
  • Secure key

3. System Analysis and Design

3.1 The System Static Structure

I implemented the encryption algorithm in the method encrypt() in the Aglet Encrypt, and decryption algorithm in the method Decrypt() in aglet Decrypt
This Encrypt and Decrypt aglets are supported by the members of the Global class , that all their members can be seen and shared by all aglets in the package .The class Global has an array of characters helps to token clear user name and password into tokens each token is a character. The algorithms of the system (encryption/decryption) algorithms based on conversion the characters to its ASCII code and vice versa. This system is the implementation of Caesar cipher algorithm that has to do with upper case and lower case characters only. The Integer variables (_AT_HOME,_At_REMOTE , _Back_AT_HOME, _STATEs ) control the action of aglet in its method run()

3.2 The System Dynamic Process

The class Father instantiates Encrypt and Decrypt aglets. Encrypt aglet dispatches to the host atp://OMAR-PC:1024 from the home atp://OMAR-PC:4434 .At remote host the aglet can read secret values from the file c:\Secret.txtas clear text.

I mean by the secret information is the user name and the password .each one of them loaded from the file to a separate string. The user name stored in the variable userName and password in password. The string stores in array of characters using java predefined methods that act as preparing step before calling encrypt() method. The method encrypt() move each character three forwarding steps in alphabetical order .Calling the method encrypt() , the elements of the array of characters stored in a string using the global method array_in_string().

Aglet Encrypt Now dispatches back to the home carrying encrypted strings (username, password).The Encrypt passes a message that is tabular synchronous message to the Decrypt aglets.The aglet named Decrypt handle the message using public boolen handleMessage(Messagge) method.
The Aglet Encrypt handling the message successfully get the secret information (username, password) using the method getArg (String value), that called twice. One time to get the user name and store in a usernamedata member and the second to store the password in password data member .each string stored in array of characters for decryption and after decryption the array of characters stored back into the string

Let us summarize the encryption/Decryption steps:

  1. user name and password stored in the strings userName and Password
  2. The class Encrypt load the values from the file c:\Secret.txt

  3. The class Decrypt fetish the value from the tabular message sent by the class Encrypt aglet, when return back to the home
  4. The userName and Password each one passes in the following steps each in turn
  5. Store userName/Password in the global array of characters array_char[]
  6. Each character forward/backward according to the method encrypt or Decrypt three steps in alphabetical order
  7. After calling encrypt() or Decrypt() the array of characters character by character grouped back into the string “userName” or “Password”

3.3 Relationship Model

  1. The Aglets Encrypt/Decrypt instantiated from the same Aglet Father
  2. Decrypt AgletDecrypt Aglet remains nearly doing nothing till the Message passes from the “Encrypt” aglet
  3. both aglets use the same instances of the arrays: int array_int [] and char array_char []

4. Role of Aglets

The Aglet Father

  1. instantiates the aglets Encrypt and Decrypt
  2. Provides the public objects named “encryptProxy” and “decryptProxy” of type AgletProxy Class .And so, the Aglet named Encrypt can send the message from Encrypt Aglet to Decrypt aglet

The Aglet Encrypt

  1. Pass over the network to the host atp://OMAR-PC1024
  2. At remote host loads the secret information as clear text
  3. Encrypt the secret information
  4. Return back to the home atp: //OMAR-PC:4434 with encrypted data. At home passes the encrypted information to the aglet “Decrypt”

The Aglet Decrypt

  1. Handle the Message from the aglet Decrypt and before only do nothing waits for this message at the home atp://OMAR-PC:4434
  2. Decryption of the secret information
  3. The below screen shot represents the arrival of aglet Encrypt to the host atp://OMAR-PC:1024 .where load secret information and encrypt them then return back to home atp://OMAR-PC:4434

The below shot represents the “Encrypt”,returning to home and pass to “Decrypt” that decrypt and display the secret information

No comments:

Post a Comment