#!/usr/bin/perl

# This is a script for getting the time of RSA for generation key pair and encrypt/decrypt for different key sizes.
# Author: Shweta Agrawal
# Date: Aug 15, 2003

# Accept the arguments
if($#ARGV != 0)
	{
	print "Usage: $0 <output file name>";
    exit;
	}
else
	{
	$outfile = $ARGV[0];	
	}

#write into the output file
$command = "echo -n > $outfile"; 
system($command);

#Run the RSA program and write the desired output in output file
#for ($count = 1; $count <= 5; $count++)
#{
	for ($i = 128; $i<=1024; $i+=128)
	{
		$keysize = $i;
		#write the key size
		$command = "echo Size: $keysize >> $outfile";
		system($command);
		#write various time values
		$command = "java RSA $keysize y 2>> $outfile";
		system($command);
	}
#}

