private static void validatePrivateKeyInput(String[] keyData) throws Exception {
        final MKMath math = new MKMath();

        if (keyData.length != 3) {
            throw new KeyDataViolationException("Error: Key data of private key does not contain three elements.");
        }
        
        if(Integer.parseInt(keyData[1]) > Integer.parseInt(keyData[0])) {
            throw new KeyDataViolationException("Error: The multiplier is bigger than the modulo.");
        }

        if (!math.isPrime(Long.parseLong(keyData[0]))) {
            throw new KeyDataViolationException("Error: Modulo is not prime.");
        }

        if (!math.isCoPrime(Integer.parseInt(keyData[1]), Integer.parseInt(keyData[0]))) {
            throw new KeyDataViolationException("Error: The multiplier and modulo is not coprime.");
        }

        String[] keystring = keyData[2].split(",");
        if (keystring.length != 16) {
            throw new KeyDataViolationException("Error: Private key does not contain 16 elements.");
        }

        long[] privateKey = new long[keystring.length];
        for (int i = 0; i < privateKey.length; ++i) {
            privateKey[i] = Long.parseLong(keystring[i]);
        }

        if (!math.isSuperIncreasing(privateKey)) {
            throw new Exception("Error: Private key is not superincreasing.");
        }

        for (int i = 0; i < privateKey.length; ++i) {
            if (privateKey[i] > Long.MAX_VALUE) {
                throw new KeyDataViolationException("Error: An element in the private key is larger than Long.MAX_VALUE.");
            }
        }
    }