Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The output of the sdes.encrypt function is a bit strange. The elements of the output can be coerced to the reals but not to integers. So, something like this should work. Replace your return with

return [(ZZ(RR(a)) + ZZ(RR(b))) % 2 for a,b in zip(block1, block2)]