ec.c: Reject strings with trailing junk in the curve-point constructor.
[catacomb-python] / catacomb / __init__.py
index dc5ecbb..725f6d2 100644 (file)
@@ -275,7 +275,7 @@ def secret_unbox(k, n, c):
 class BaseRat (object):
   """Base class implementing fields of fractions over Euclidean domains."""
   def __new__(cls, a, b):
-    a, b = cls.RING(a), cls.RING(b)
+    a, b = cls.RING._implicit(a), cls.RING._implicit(b)
     q, r = divmod(a, b)
     if r == cls.ZERO: return q
     g = b.gcd(r)