def test_permutation_atf(self): test_array = array([ [1, -1, -1, 1, -1, 1], [-1, 1, 1, -1, -1, 1], ]) assert_array_equal(LTFArray.transform_permutation_atf(test_array, k=4), [[[-1, -1, 1, -1, -1, 1], [-1, 1, -1, -1, -1, -1], [-1, 1, 1, 1, -1, 1], [-1, 1, 1, -1, -1, -1]], [[-1, -1, -1, -1, 1, -1], [-1, -1, 1, 1, -1, 1], [-1, 1, -1, 1, 1, 1], [-1, -1, -1, 1, -1, 1]]])
def test_permutation_atf(self): """This method tests the permuation atf transformation with predefined input and output for k=4 PUFs.""" test_array = array([ [1, -1, -1, 1, -1, 1], [-1, 1, 1, -1, -1, 1], ], dtype=tools.BIT_TYPE) assert_array_equal(LTFArray.transform_permutation_atf(test_array, k=4), [[[-1, -1, 1, -1, -1, 1], [-1, 1, -1, -1, -1, -1], [-1, 1, 1, 1, -1, 1], [-1, 1, 1, -1, -1, -1]], [[-1, -1, -1, -1, 1, -1], [-1, -1, 1, 1, -1, 1], [-1, 1, -1, 1, 1, 1], [-1, -1, -1, 1, -1, 1]]])