def genInvSBox( SBox ):
    """
    genInvSBox - generates inverse of an SBox.
    Args:
        SBox: The SBox to generate the inverse.
    Returns:
        The inverse SBox.
    """
    InvSBox = [0]*0x100
    for i in range(0x100):
        InvSBox[ SBox[i] ] = i
    return InvSBox