def rotword(w):
    """
    Function used in the Key Expansion routine that takes a four-byte word and
    performs a cyclic permutation.
    """
    w = w.reshape(4, 8)
    return w[1] + w[2] + w[3] + w[0]
