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