def readKeyFile(keyFilename: str) -> tuple:
    """Read key from key file

    Reads the given public/private key file and returns the key.

    Args:
        keyFilename: String containing absolute path to public/private key file.

    Returns:
        The key as a (n,e) or (n,d) tuple value.
    """

    fo = open(keyFilename)
    content = fo.read()
    fo.close()
    keySize, n, EorD = content.split(',')
    return int(keySize), int(n), int(EorD)