def transform(entry, direction, width, x): assert x < 2 ** width assert entry < 2 ** width return utils.rrot((x ^ entry), direction + 1, width)
def transform(entry, direction, width, x): assert x < 2**width assert entry < 2**width return utils.rrot((x ^ entry), direction + 1, width)
def rotpair(self, left, right, i, width): assert utils.rrot(left, i, width) == right assert utils.lrot(right, i, width) == left assert utils.lrot(left, i, width) == utils.rrot(left, width-i, width)
def rotpair(self, left, right, i, width): assert utils.rrot(left, i, width) == right assert utils.lrot(right, i, width) == left assert utils.lrot(left, i, width) == utils.rrot(left, width - i, width)