@@ -64,9 +64,9 @@ def __init__(self, p, a, b, h=None):
6464 The curve of points satisfying y^2 = x^3 + a*x + b (mod p).
6565
6666 h is an integer that is the cofactor of the elliptic curve domain
67- parameters; it is the number of points satisfying the elliptic curve
68- equation divided by the order of the base point. It is used for selection
69- of efficient algorithm for public point verification.
67+ parameters; it is the number of points satisfying the elliptic
68+ curve equation divided by the order of the base point. It is used
69+ for selection of efficient algorithm for public point verification.
7070 """
7171 self .__p = mpz (p )
7272 self .__a = mpz (a )
@@ -82,9 +82,9 @@ def __init__(self, p, a, b, h=None):
8282 The curve of points satisfying y^2 = x^3 + a*x + b (mod p).
8383
8484 h is an integer that is the cofactor of the elliptic curve domain
85- parameters; it is the number of points satisfying the elliptic curve
86- equation divided by the order of the base point. It is used for selection
87- of efficient algorithm for public point verification.
85+ parameters; it is the number of points satisfying the elliptic
86+ curve equation divided by the order of the base point. It is used
87+ for selection of efficient algorithm for public point verification.
8888 """
8989 self .__p = p
9090 self .__a = a
@@ -228,7 +228,8 @@ def __eq__(self, other):
228228 zz2 = z2 * z2 % p
229229
230230 # compare the fractions by bringing them to the same denominator
231- # depend on short-circuit to save 4 multiplications in case of inequality
231+ # depend on short-circuit to save 4 multiplications in case of
232+ # inequality
232233 return (x1 * zz2 - x2 * zz1 ) % p == 0 and (
233234 y1 * zz2 * z2 - y2 * zz1 * z1
234235 ) % p == 0
@@ -309,8 +310,8 @@ def scale(self):
309310 zz_inv = z_inv * z_inv % p
310311 self .__x = self .__x * zz_inv % p
311312 self .__y = self .__y * zz_inv * z_inv % p
312- # we are setting the z last so that the check above will return true
313- # only after all values were already updated
313+ # we are setting the z last so that the check above will return
314+ # true only after all values were already updated
314315 self .__z = 1
315316 finally :
316317 self ._scale_lock .writer_release ()
@@ -599,7 +600,7 @@ def __mul__(self, other):
599600
600601 @staticmethod
601602 def _leftmost_bit (x ):
602- """Return integer with the same magnitude as x but hamming weight of 1 """
603+ """Return integer with the same magnitude as x but only one bit set """
603604 assert x > 0
604605 result = 1
605606 while result <= x :
@@ -688,9 +689,9 @@ def __init__(self, curve, x, y, order=None):
688689 # self.curve is allowed to be None only for INFINITY:
689690 if self .__curve :
690691 assert self .__curve .contains_point (x , y )
691- # for curves with cofactor 1, all points that are on the curve are scalar
692- # multiples of the base point, so performing multiplication is not
693- # necessary to verify that. See Section 3.2.2.1 of SEC 1 v2
692+ # for curves with cofactor 1, all points that are on the curve are
693+ # scalar multiples of the base point, so performing multiplication is
694+ # not necessary to verify that. See Section 3.2.2.1 of SEC 1 v2
694695 if curve and curve .cofactor () != 1 and order :
695696 assert self * order == INFINITY
696697
0 commit comments