JHUISI / charm

Charm: A Framework for Rapidly Prototyping Cryptosystems
http://charm-crypto.io
GNU Lesser General Public License v3.0
552 stars 167 forks source link

Issue converting signed integer to int #225

Open fabienpe opened 5 years ago

fabienpe commented 5 years ago

Charm seem to have an issue converting á negative 'integer' to a python int. For instance:

on Windows 10:

int(integer(-1234567890))
-2308342482

on Ubuntu:

int(integer(-1234567890))
-2308309714

The work around is to check if the number if negative, convert it and then apply the sign again but this is not ideal...