Exemplo n.º 1
0
def transform(entry, direction, width, x):
    assert x < 2 ** width
    assert entry < 2 ** width
    return utils.rrot((x ^ entry), direction + 1, width)
Exemplo n.º 2
0
def transform(entry, direction, width, x):
    assert x < 2**width
    assert entry < 2**width
    return utils.rrot((x ^ entry), direction + 1, width)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)