<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def alg2keytype(alg):
 """ Go from algorithm name to key type. :param alg: The algorithm name :return: The key type """

    if not alg or alg.lower() == "none":
        return "none"
    elif alg.startswith("RS") or alg.startswith("PS"):
        return "RSA"
    elif alg.startswith("HS") or alg.startswith("A"):
        return "oct"
    elif alg.startswith("ES") or alg.startswith("ECDH-ES"):
        return "EC"
    else:
        return None