def read_public_key(public_key_path: str) -> str:
    """Loads the public key from file or raises a `RuntimeError`.

        :param public_key_path: Path to the public key.

    """
    with open(public_key_path, 'r') as file:
        public_key_lines = [i for i in file.readlines() if i]
        if len(public_key_lines) != 1:
            raise RuntimeError("Unexpected public key format"
                               " at '{public_key_path}':"
                               " Single line expected.")
        return public_key_lines[0]