in a random manner and the value of nP of each
digit is unknown, so the prediction of next prime
is impossible to an attacker.We change this com-
bination every half an hour to prevent the attacker
from tabulating the combination for further use.
Table 2: Total Number of primes, primes whose (p-1)/2 also
a prime and selected primes in each digit.
Digits 2 3 4 5 6 7 8
Total no of
primes(TNP) 21 143 1061 8363 68906 586081 5096876
No of primes
whose (p-1)/2 5 18 90 555 3654 26333 198911
also a prime(NP)
No of primes
selected in 5 10 70 300 2000 9000 10000
random(nP)
The Generation algorithm takes in four argu-
ments. servertime, pdigits, selectedPrimes array
(which contains a randomly chosen combination
from the total set of primes), selectedGenerators
array (which contains corresponding generators of
primes selected) and nP which denotes number of
primes for each digit in the selectedPrimes array.
The algorithm used for generation of p dynamically
overcomes the attacks discussed in scenario1 and
scenario2.
Algorithm Generate (p,α,β)
1. mapvalue ← servertime mod nP
2. p=selectedPrimes[pdigits][mapvalue]
3. α = selectedGenerators[pdigits][mapvalue]
4. β= RandomNumber(2,p-1)
Scenario 3. In this scenario the attacker satisfies the
equation (1) but the (p,α,β) values sent by the at-
tacker are not the same as the values sent by the
server. The attacker changes the original values
which is a repudiation attack. To overcome this
attack the server makes use of session variables to
store (p,α,β) values on the server side for verifi-
cation. This is the only storage cost at the server
end and reasonable for the present day memory
on the server. These numbers take 12 bytes and
current server can handle 3K requests per second.
For a 60 seconds timeout the state table goes up to
2.1MB which is tolerable.
Scenario 4. In this scenario the attacker sends gen-
uine (p,α,β) values and instead of finding x he
will send random value between 2 to p-1 i.e., he
will send (p,α,β,random value). To counter this
attack the server will verify whether values sent
by the client are satisfying equation(1) or not.
The probability of such request going through is
1/(p − 2) which becomes small when p is greater
than 100. The probability of that the chosen ran-
dom value is x for 3-digit primes is 0.00272 and
for 4-digit number 0.00023 and this probability
becomes small when p increases.
Scenario 5. For each field one generator is pre-
computed and stored on server side when same
prime encounters the generator sent will be same
only β changes in this case. At this scenario the at-
tacker computes the exponent table once and uses
it when the same prime encounters. In this case
the attacker have to save all the values of α
x
mod p
where x varies from 1 to (p − 1). From Table 2
number of 8 digit primes(NP) are 198911 which
requires a storage space of around 2MB and to
save all the values of beta the storage space re-
quired is 2MB for each 8-digit prime. So the total
storage space required is around 389GB. As this
much storage space is not available in all the com-
promised systems involved in attack, this type of
attack is not practical with the current hardware
technology.
Algorithm used for verification takes in four ar-
guments p,β,α and x values sent by the client.
The verification algorithm overcomes the attacks
discussed in Scenario 3 and Scenario 4.
Algorithm Verification
1. check whether p,α,β are genuine using session
variables saved on the server side.
2. If p,α,β are genuine then do the following
(a) If β ≡ α
x
mod p
i. Process Request
(b) Else Drop Request
3. Else Drop Request
5 IMPLEMENTATION
To test our proposed solution we have used the fol-
lowing setup
Server Configuration. Intel Xeon Quad CPU, pro-
cessor speed 3.60 GHz each, 4 GB RAM, Win
2003 server.
Client Configuration. Intel core2 Duo CPU with
processor speed 3.00 GHz and 2.99 GHz, 2 GB
RAM, Windows XP professional operating sys-
tem.
5.1 Results
To show the effectiveness of our solution we have
used the same web applications as in (Saraiah and
SECRYPT 2010 - International Conference on Security and Cryptography
266