{
if (debug)
{
System.out.println("Constructing lookup Array");
}
NaccacheSternPrivateKeyParameters priv = (NaccacheSternPrivateKeyParameters)key;
Vector primes = priv.getSmallPrimes();
lookup = new Vector[primes.size()];
for (int i = 0; i < primes.size(); i++)
{
BigInteger actualPrime = (BigInteger)primes.elementAt(i);
int actualPrimeValue = actualPrime.intValue();
lookup[i] = new Vector();
lookup[i].addElement(ONE);
if (debug)
{
System.out.println("Constructing lookup ArrayList for " + actualPrimeValue);
}
BigInteger accJ = ZERO;
for (int j = 1; j < actualPrimeValue; j++)
{
accJ = accJ.add(priv.getPhi_n());
BigInteger comp = accJ.divide(actualPrime);
lookup[i].addElement(priv.getG().modPow(comp, priv.getModulus()));
}
}
}
}