Log Book
10 September 2007
Ive finished implementing the Final Report, im sending it for Binding.
8 September 2007
The
Questionnaire2 is a survey ive made to check how much time does it take people to solve the captcha. This helps in evaluating the performance metrics of the CAPTCHA implemented.
8 September 2007
I 've changed the way the difficulty levels are implemented:
Level one:
Taking the positioning of the numbers into consideration, level one consists of removing the entries from one row( or column) entirely, in such a way that we end up with one missing value from each column(or row).
Taking the Sudoku as a 4x4 matrix with x-y axis, one can see that we only have missing values on one axis only.

For example, taking the matrix in figure
Level1 , it’s obvious to see that we have only missing values on the first row of the matrix. Therefore the computation of the missing values is going to be straightforward: x is equal to 3, y is equal to 2, z is equal to 4, and t is equal to 1. We only need to figure out the missing number from the column (x 4 2 1) to find the solution. The ability to find all the numbers from just the row OR the column gives this difficulty level a class 1.
Level two:

In this CAPTCHA we need also to figure out the unknown numbers x, y , z, t. Although the number of missing variables remains 4, it is more difficult to find out answers because one has to scan the rows and columns in order to find the right answer. In this example, to find x, we must scan the row (x y 4 1) and look for numbers (4,1) and then we have to scan the column (x z 2 1) and look also for numbers (2,1). We remove the repeated number, and then we end up with (2, 1 4) and we deduce that the missing number x is equal to 3. Same method can be done on all other missing numbers. The fact that we need to scan the row AND the column in order to find the unknown variable gives this difficulty a level 2 on the difficulty scale 1, 2, 3.
Level three:
To solve a CAPTCHA like this one, the user needs to use 3 different methods at the same time to deduce the answer. This fact makes this CAPTCHA a level 3 CAPTCHA. The first method is row or column scanning, the second method is the method row AND column scanning, and the third is the 2x2 matrix box scanning.
The three scanning techniques are illustrated in the Figure below.
6 September 2007
I'm still trying to relate math to the difficulty levels to prove how to measure the difficulty levels of the CAPTCHAs
Im currently writing my report: I've included the Webpage code and the CAPTCHA code right into it. Figures are available in the Report.
27 August 2007
I've finished implementing the difficulty levels into the Sudoku:
1st level: one row removed i.e. 4 numbers.
2nd Level: one block removed.
3rd Level: 6 numbers removed.
Work has now begun on writing the Report.
24 August 2007
The Sudoku Code is shown Below:
<html>
<head>
<title>THE CAPTCHA WITH DIFFERENT DIFFICULTY LEVELS</title>
</head>
<body>
<?php
print " The original Captcha:<br />";
$h =
rand(1,
4);
$i=
4;
$j =
1;
$k =
2;
$l =
3;
$m=
4;
//Stage one toward the Creation of the Captcha
$selar=
array( 0=>
$j,
1=>
$k,
2=>
$l,
3=>
$m);
$tempar=
$selar;
$Sudoku0=
array(0 ,
0 ,
0 ,
0 );
$i=
0;
while( ($Sudoku0["0"] &&
$Sudoku0["1"] &&
$Sudoku0["2"] &&
$Sudoku0["3"]) ==
0)
{
$h=
rand(0,
3);
//randomise h
if($tempar[$h] !=
0)
{
$Sudoku0["$i"]=
$tempar[$h];
$tempar[$h]=
0;
$i++;
}
}
print "$Sudoku0[0] \t".
"$Sudoku0[1] \t || ".
"$Sudoku0[2] \t".
"$Sudoku0[3] \t" .
"<br />";
//end of stage One
//Stage two
$tempar=
$selar;
$Sudoku1=
array(0 ,
0 ,
0 ,
0 );
//initialisations for stage 2
$i=
0;
$j=
0;
while( ($Sudoku1["0"] &&
$Sudoku1["1"] &&
$Sudoku1["2"] &&
$Sudoku1["3"]) ==
0 )
{
$h=
rand(0,
3);
if ( $j <=
1)
{
if($tempar[$h] !=
$Sudoku0[0])
{
if($tempar[$h] !=
$Sudoku0[1])
{
if ($tempar[$h] !=
0)
{
$Sudoku1[$i]=
$tempar[$h];
$i++;
$j++;
$tempar[$h]=
0;
}}}}
if ( $j >
1 )
{
if($tempar[$h] !=
$Sudoku0[2])
{
if($tempar[$h] !=
$Sudoku0[3])
{
if ($tempar[$h] !=
0)
{
$Sudoku1[$i]=
$tempar[$h];
$i++;
$j++;
$tempar[$h]=
0;
}}}}
} // end of while
print "$Sudoku1[0] \t".
"$Sudoku1[1] \t || ".
"$Sudoku1[2] \t".
"$Sudoku1[3] \t" .
"<br />";
print "======<br />";
//end of Stage two
//Stage Three
$i=
0;
$j=
0;
$tempar=
$selar;
$Sudoku2=
array(0 ,
0 ,
0,
0 );
while( ($Sudoku2["0"] &&
$Sudoku2["1"] &&
$Sudoku2["2"] &&
$Sudoku2["3"]) ==
0 )
{
$h=
rand(0,
3);
if($tempar[$h] !=
$Sudoku0[$i])
{
if($tempar[$h] !=
$Sudoku1[$i])
{
if ($tempar[$h] !=
0)
{
$Sudoku2[$i]=
$tempar[$h];
$i++;
$j++;
$tempar[$h]=
0;
}}}
} //end of While
print "$Sudoku2[0] \t".
"$Sudoku2[1] \t || ".
"$Sudoku2[2] \t".
"$Sudoku2[3] \t" .
"<br />";
//end of stage Three
//Stage Four
$i=
0;
$j=
0;
$tempar=
$selar;
$Sudoku3=
array(0 ,
0 ,
0,
0 );
while( ($Sudoku3["0"] &&
$Sudoku3["1"] &&
$Sudoku3["2"] &&
$Sudoku3["3"]) ==
0 )
{
$h=
rand(0,
3);
if($tempar[$h] !=
$Sudoku0[$i])
{
if($tempar[$h] !=
$Sudoku1[$i])
{
if($tempar[$h] !=
$Sudoku2[$i])
{
if ($tempar[$h] !=
0)
{
$Sudoku3[$i]=
$tempar[$h];
$i++;
$j++;
$tempar[$h]=
0;
}}}}
} //end of while
print "$Sudoku3[0] \t".
"$Sudoku3[1] \t || ".
"$Sudoku3[2] \t".
"$Sudoku3[3] \t" .
"<br /><br /> <br />";
//end of stage Four
// The Full Solved Sudoku Matrix is Created!
//Stage Five
//Adding Difficulty levels to the CAPTCHA
$d0=
$Sudoku0;
$d1=
$Sudoku1;
$d2=
$Sudoku2;
$d3=
$Sudoku3;
?>
<table border=
"5">
<tr> <td> Difficulty Levels</td>
</tr>
<tr>
<td>
<table border=
"4" cellspacing=
"20">
<tr>
<td>Level
1</td>
<td>Level
2</td>
<td>Level
3</td>
</tr>
<tr>
<td>
<?php
//Level one Difficulty
$h=
rand(1,
4);
$L1=
$h;
if ( $h ==
1)
{
$d0[0]=x;
$d0[1]=y;
$d0[2]=z;
$d0[3]=t;
}
if( $h ==
2)
{
$d1[0]=x;
$d1[1]=y;
$d1[2]=z;
$d1[3]=t;
}
if( $h ==
3)
{
$d2[0]=x;
$d2[1]=y;
$d2[2]=z;
$d2[3]=t;
}
if( $h ==
4)
{
$d3[0]=x;
$d3[1]=y;
$d3[2]=z;
$d3[3]=t;
}
print "$d0[0] \t".
"$d0[1] \t || ".
"$d0[2] \t".
"$d0[3] \t" .
"<br />";
print "$d1[0] \t".
"$d1[1] \t || ".
"$d1[2] \t".
"$d1[3] \t" .
"<br />";
print "======<br />";
print "$d2[0] \t".
"$d2[1] \t || ".
"$d2[2] \t".
"$d2[3] \t" .
"<br />";
print "$d3[0] \t".
"$d3[1] \t || ".
"$d3[2] \t".
"$d3[3] \t" .
"<br />";
//End of Level one
?>
</td>
<td>
<?php
//Level two Difficuly
$d0=
$Sudoku0;
$d1=
$Sudoku1;
$d2=
$Sudoku2;
$d3=
$Sudoku3;
$h=
rand(1,
4);
$L2=
$h;
if ( $h ==
1) //Removing the numbers from the Matrix and
{ // replacing them with variable names.
$d0[0]=x;
$d0[1]=y;
$d1[0]=z;
$d1[1]=t;
}
if( $h ==
2)
{
$d2[0]= x;
$d2[1]= y;
$d3[0]= z;
$d3[1]=t;
}
if( $h ==
3)
{
$d0[2]=x;
$d0[3]=y;
$d1[2]=z;
$d1[3]=t;
}
if( $h ==
4)
{
$d2[2]=x;
$d2[3]=y;
$d3[2]=z;
$d3[3]=t;
}
print "$d0[0] \t".
"$d0[1] \t || ".
"$d0[2] \t".
"$d0[3] \t" .
"<br />";
print "$d1[0] \t".
"$d1[1] \t || ".
"$d1[2] \t".
"$d1[3] \t" .
"<br />";
print "======<br />";
print "$d2[0] \t".
"$d2[1] \t || ".
"$d2[2] \t".
"$d2[3] \t" .
"<br />";
print "$d3[0] \t".
"$d3[1] \t || ".
"$d3[2] \t".
"$d3[3] \t" .
"<br />";
//End of Level two
?>
</td>
<td>
<?php
//Level three Difficuly
$d0=
$Sudoku0;
$d1=
$Sudoku1;
$d2=
$Sudoku2;
$d3=
$Sudoku3;
$d0[1]=
$d0[3]=
$d1[0]=
$d1[2]=
$d2[1]=
$d2[0]=
$d2[2]=
$d3[3]=
$d4[1]=
_;
print "$d0[0] \t".
"$d0[1] \t || ".
"$d0[2] \t".
"$d0[3] \t" .
"<br />";
print "$d1[0] \t".
"$d1[1] \t || ".
"$d1[2] \t".
"$d1[3] \t" .
"<br />";
print "======<br />";
print "$d2[0] \t".
"$d2[1] \t || ".
"$d2[2] \t".
"$d2[3] \t" .
"<br />";
print "$d3[0] \t".
"$d3[1] \t || ".
"$d3[2] \t".
"$d3[3] \t" .
"<br />";
//End of Level three
?>
//Testing for the right answers
</td>
</tr>
</table>
</td>
</tr>
<table border=
"4">
<tr>
<td>
<form action=
"" method=
"get">
<select name=
"Number1">
<option value=
"0">x</option>
<option value=
"1">
1</option>
<option value=
"2">
2</option>
<option value=
"3">
3</option>
<option value=
"4">
4</option>
</select>
<select name=
"Number2">
<option value=
"0">y</option>
<option value=
"1">
1</option>
<option value=
"2">
2</option>
<option value=
"3">
3</option>
<option value=
"4">
4</option>
</select>
<select name=
"Number3">
<option value=
"0">z</option>
<option value=
"1">
1</option>
<option value=
"2">
2</option>
<option value=
"3">
3</option>
<option value=
"4">
4</option>
</select>
<select name=
"Number4">
<option value=
"0">t</option>
<option value=
"1">
1</option>
<option value=
"2">
2</option>
<option value=
"3">
3</option>
<option value=
"4">
4</option>
</select>
<select name=
"Number5">
<option value=
"0">a</option>
<option value=
"1">
1</option>
<option value=
"2">
2</option>
<option value=
"3">
3</option>
<option value=
"4">
4</option>
</select>
<select name=
"Number6">
<option value=
"0">b</option>
<option value=
"1">
1</option>
<option value=
"2">
2</option>
<option value=
"3">
3</option>
<option value=
"4">
4</option>
</select>
<select name=
"Number7">
<option value=
"0">c</option>
<option value=
"1">
1</option>
<option value=
"2">
2</option>
<option value=
"3">
3</option>
<option value=
"4">
4</option>
</select>
<select name=
"Number8">
<option value=
"0">d</option>
<option value=
"1">
1</option>
<option value=
"2">
2</option>
<option value=
"3">
3</option>
<option value=
"4">
4</option>
</select>
<select name=
"Number9">
<option value=
"0">v</option>
<option value=
"1">
1</option>
<option value=
"2">
2</option>
<option value=
"3">
3</option>
<option value=
"4">
4</option>
</select>
<select name=
"Number10">
<option value=
"0">w</option>
<option value=
"1">
1</option>
<option value=
"2">
2</option>
<option value=
"3">
3</option>
<option value=
"4">
4</option>
<input type=
"submit" value=
"Submit">
</form>
</td>
</tr>
<tr>
<td>
<?php
$N1=
$_GET["Number1"];
$N2=
$_GET["Number2"];
$N3=
$_GET["Number3"];
$N4=
$_GET["Number4"];
$flag=
0;
if($L1 ==
1)
{
if( ($N1 ==
$Sudoku0[0]) &&
($N2 ==
$Sudoku0[1]) &&
($N3 ==
$Sudoku0[2]) &&
($N4 ==
$Sudoku0[3]) )
{
$flag=
1;
}
}
if($L1 ==
2)
{
if( ($N1 ==
$Sudoku1[0]) &&
($N2 ==
$Sudoku1[1]) &&
($N3 ==
$Sudoku10[2]) &&
($N4 ==
$Sudoku1[3]) )
{
$flag=
1;
}
}
if($L1 ==
3)
{
if( ($N1 ==
$Sudoku2[0]) &&
($N2 ==
$Sudoku2[1]) &&
($N3 ==
$Sudoku2[2]) &&
($N4 ==
$Sudoku2[3]) )
{
$flag=
1;
}
}
if($L1 ==
4)
{
if( ($N1 ==
$Sudoku3[0]) &&
($N2 ==
$Sudoku3[1]) &&
($N3 ==
$Sudoku3[2]) &&
($N4 ==
$Sudoku3[3]) )
{
$flag=
1;
}
}
if($flag ==
1)
{
print "PAss!<br />";
}
if($flag ==
0)
{
print "Fail!<br />";
}
?>
</td>
</tr>
</table>
</body>
</html>
21 August 2007
I've just finished the integration of the sudoku into the Website i already created.
The sudoku implemented works about 5 over 6 times. that means 83.34% of the time.
I'm still running tests to check the availability of the Sudoku.
The algorithm flow charts of the Sudoku Stages are shown in the figure below.
1 August 2007
I finished today the implementation of the Sudoku Puzzle
It is randomly generated as the user refreshes the webpage.
I Also finished the other month the webpage I was working on as a part of the project. The webpage is an introductory page that talks about the Sudoku Captcha and
Displays the projects progress.
14 July 2007
Training in the PHP language continued during this period. I managed to create a code that uses most of the functions used in the project. The code of the training periode is the one shown below.
Eventhought it has no meaning, it uses most of the essential functions in PHP.

THe output if the previous code is shown below:
19 may 2007
The result of the questionnaire stated that 66.66% prefer to use Soduku Captcha as it is easier and more fun.
33.33% prefer to use the Actual CAPTCHA rather than the new one.
Concerning the Cost:
The Sudoku Captcha is based on logic puzzles so practically it will cost nothing to design and implement.
Array Implementation and counts up and down in PHP
29th April
See Code in File manager
Questionnaire 23rd April
One can see the contents of the questionnaire from the file manager.
Learning PHP 30th March
Experimenting with the PHP
Since this is my first encounter with the PHP program, I was going to experiment on it using simple sets of instruction.
In Windows, the editor is Notepad, and the File's output is shown under Internet Explore(or Equivalent).
All the files edited under Notepad are to be saved in the htdocs folder under the Xampp folder.
The first File is a test file and it's only to check the operability of the whole package.
The result can be seen below:
Installing the XAMPP 29th March
This program in an Apache Server distribution that promotes SQL, PHP, and Perl.
The first thing one needs to do is to download the Package from the website "
http://www.apachefriends.org/en/index.html".
One should click on the Link shown in the Image.
After that one must choose the "XAMPP for Windows" Link.
Then choose the XAMPP 1.6.0a download (installer Link).
After the 29.5 MB file downloads, we run it to install it.
The program then put an icon on the desktop called" XAMPP Control Panel".
In order to run the XAMPP, one must click on that icon.
To start the Apatche Server, one must click on the Start Button on the Control Panel. Note that the Icon remains in the Taskbar as a way to indicate that the XAMPP server is running.
Who is going to be using it 24th March
The implementation for a Su-Do-Ku based CAPTCHA will ensure a high level of security. However the main issue here will be: who will be using it?
Su-Do-Ku is not a game that you know by heart, One need to know the rules before Playing it. This game is not for people under the age of 4; since under the age of 4 one doesnt know the basic rules of math.
But as being said before, one must learn it before playing it. So I would suggest Attaching a " How to Play?" manual next to the CAPTCHA.
The Environment 17th March
The Environment in which the CAPTCHA ("vaguely defined until this point)" is supposed to work in is web based.
I was thinking of a website which contains public files and other files that are more confidential. This site could be" the University forum (Electric and Computer Engineering (ECE intranet's Forum)".
The Intranet's forum allows people to communicate and leave messages on the board with open source answer. If not subscribed, the user enters in a guest mode! In this mode, the user is not allowed add comments and have access to some of the sites "restricted to students" files; he is only able to read the messages on the board.
Therefore and in order to be able to read and add messages to the Forum, one must register and subscribe to the Forum. The way to do it is simple:
First you click on: New user
A licence Agreement on what a subscriber is expected to behave on this forum.
If the user agrees on it, the sign-up process continues.
Then the user is asked about his personal Information and details like: login name, Name, Surname, Course enrolled in, Time Zone, Password and Contact e-mail.
A Hacker, with only these requirements from a new user, can write a program that can keep on signing up virtual people and overload the Forum; this would cause the failure of the service provided by the Forum.
In order to reduce this kind of attack, Scientists at Carnegie Mellon University Have introduced what is Know as a "CAPTCHA" Completely Automated Turing test to tell Computers from Humans Apart.
The University forum uses a graphical Captcha that asks the user to enter the number included in six images. For humans, this step is easy, they just need to look at the image and conclude the number. However for a computer it is a bit harder since it cannot read images like we do, it uses brute force to solve this logic puzzle.
The CAPTCHA
The CAPTCHA to be implemented is based on a logic replacement puzzle or more generally known as the Su-do-ku, which means "one on each row" in Japanese.
After checking the Agreement box, one proceeds to the phase of filling all the personal details, and at the end of the page, a CAPTCHA based image is provided. The CAPTCHA here in question is a Small Sudoku grid of 4x4. The matrix is half full and the user is asked to fill the last row. Ex:
The matrix to be filed is :
[ 1 2 3 4]
[ 3 4 2 1]
[ 4 3 1 2]
[ - - - - ]
The user has to enter this Combination in order to be allowed to create the Matrix:
2 1 4 3
The Matrix becomes then:
[ 1 2 3 4]
[ 3 4 2 1]
[ 4 3 1 2]
[
2 1 4 3]
Upon the entry of these numbers the user is left to continue the subscription.