public long discreteLogarithm(BigInteger value)
	{
		if(cache.containsKey(value)) {
			return cache.get(value);
		}
		
		boolean logFound = false;
		long power = 0;
		BigInteger current = BigInteger.valueOf(1);
		while(!logFound)
		{
			if(current.equals(value)) {
				logFound = true;
			} else {
				power++;
				current = multiplyMod(current);
			}
		}
		
		return power;
	}