Cryptography Reference
In-Depth Information
//Check the response, based on the value of challenge
if (!response.modPow(BigIntegerMath.TWO,modulus).equals(z[challenge]))
{
System.out.println(“Response does not check-closing connection”);
break;
}
if (i<trials-1) out.println(“N”);
else {
out.println(“Y”);
System.out.println(“Respondent approved.”);
}
}
//Close the connection with this respondent
socket.close();
} catch (IOException ioe) {
System.out.println(ioe.toString());
}
}
}
Here is a test run of Respondent and Challenger running on two different computers.
Respondent:
Enter host name or IP address of challenger:
**********
You have yet to be approved.
You have yet to be approved.
You have yet to be approved.
You have yet to be approved.
You have yet to be approved.
Your claim of identity has been accepted.
Challenger:
Enter the number of challenges to issue per respondent:
5
Request received from **********/**********
Respondent approved.
Note that I have crossed out the names/IP addresses of the machines running these pro-
grams.
Search WWH ::




Custom Search