added int type conversion to modp

fixed elliptic equality check