Sunday, September 12, 2010

eMail Message Format

  1. SFTS supports rich-text format message. Common formatting such as bold, underline, italic, etc are available.
  2. The formatting is the HTML (HyperText Markup Language) which is understandable by most text editors.
  3. The proprietary formatting will not be processed and error message will be shown instead.

Friday, September 10, 2010

eMail Encryption

1. The level of encryption is divided into three levels, they are low, medium and strong.

2. Low level encryption

     - 1024-bit asymmetric encryption + 1 round 512-bit symmetric encryption

3. medium level encryption

     - 1024-bit asymmetric encryption + 3 round 512-bit symmetric encryption

4. strong level encryption

     - 2048-bit asymmetric encryption + 5 round 512-bit symmetric encryption

User's Key Pair

1. Each user will be given two pairs of keys (1 pair of 1024-bit private and public key and 1 pair of 2048-bit private and public key).

2. Public keys will be stored by the system while the private keys will be personally kept by the users.

3. Without the private keys, user can't view eMail's content and send eMail (user can only manage her/his contacts).

Wednesday, September 8, 2010

eMail Message Category


1. eMail message can be categorized into six major categories (I categorized personally). Please refer picture above for pictorial understanding.

Note

1. eMail with formatted message and attachment(s).

2. eMail with unformatted message and attachment(s).

3. eMail with formatted message but without attachment(s).

4. eMail with unformatted message but without attachment(s).

5. eMail without message but with attachment(s).

6. eMail without message and attachment(s).

Monday, October 12, 2009

server

import java.rmi.Remote;
import java.rmi.RemoteException;


public interface inter extends Remote
{
double operate(double a, double b, int choice) throws RemoteException;
}

















import java.rmi.*;
import java.rmi.registry.*;
import java.rmi.server.*;
import java.rmi.server.UnicastRemoteObject;
import java.net.*;


public class server extends UnicastRemoteObject implements inter
{
public static Registry registry;


public double operate(double a, double b, int choice)
{

System.out.println("The first number : " + a);
System.out.println("The first number : " + b);

if(choice == 1)
{ System.out.println((a + b)); return (a + b); }
else if(choice == 2)
{ System.out.println((a - b)); return (a - b); }
else if(choice == 3)
{ System.out.println((a * b)); return (a * b); }
else
{ System.out.println((a / b)); return (a / b); }
}

server() throws RemoteException
{}

static public void main(String[] par)
{
try
{
server s = new server();
registry = LocateRegistry.createRegistry(3333);
registry.rebind("serverop", s);
}

catch(RemoteException e)
{
System.out.println(e);
System.exit(1);
}

}

}

client

import java.rmi.*;
import java.rmi.registry.*;
import java.net.*;

import java.util.Scanner;


public class client
{
public static Scanner in = new Scanner(System.in);
public static inter server;
public static Registry registry;

public static double a,
b;
public static String choice;
public static String cont;



static public void main(String[] par)
{

try
{
registry = LocateRegistry.getRegistry("localhost", 3333);
//registry = LocateRegistry.getRegistry(serverAddress, (new Integer(serverPort)).intValue());

server = (inter)(registry.lookup("serverop"));


do
{
do
{
System.out.println("\n\tPlease select operation.");
System.out.println("\t 1. Addition.");
System.out.println("\t 2. Subtraction.");
System.out.println("\t 3. Multiplication.");
System.out.println("\t 4. Division.");

System.out.print("\tYour choice : "); choice = in.nextLine();

if(!((choice.equals("1"))||(choice.equals("2"))||(choice.equals("3"))||(choice.equals("4"))))
{ System.out.println("You have entered an invalid choice."); }

}while(!((choice.equals("1"))||(choice.equals("2"))||(choice.equals("3"))||(choice.equals("4"))));




System.out.print("\tYour first number : "); a = Double.parseDouble(in.nextLine());
System.out.print("\tYour second number : "); b = Double.parseDouble(in.nextLine());

System.out.println("The result : " + server.operate(a, b, Integer.parseInt(choice)));
System.out.println("Do you want to continue [Y / N] : "); cont = in.nextLine();




}while(cont.equals("Y")||cont.equals("y"));
}

catch(RemoteException e)
{
e.printStackTrace();
}
catch(NotBoundException e)
{
e.printStackTrace();
}


}
}