def import_curve(p, a, b, g, r, name='dummyName', oid=(1, 3, 132, 0, 255)):
 if isinstance(p, str):
  p = pkcs_os2ip(p)
 if isinstance(a, str):
  a = pkcs_os2ip(a)
 if isinstance(b, str):
  b = pkcs_os2ip(b)
 if isinstance(r, str):
  r = pkcs_os2ip(r)
 curve = CurveFp(p, a, b)
 (x, y) = extract_coordinates(g, curve)
 generator = Point(curve, x, y, r)
 return Curve(name, curve, generator, oid)

def import_curve ( p , a , b , g , r , name = 'dummyName' , oid = ( 1 , 3 , 132 , 0 , 255 ) ) : if isinstance ( p , str ) : p = pkcs_os2ip ( p ) if isinstance ( a , str ) : a = pkcs_os2ip ( a ) if isinstance ( b , str ) : b = pkcs_os2ip ( b ) if isinstance ( r , str ) : r = pkcs_os2ip ( r ) curve = CurveFp ( p , a , b ) ( x , y ) = extract_coordinates ( g , curve ) generator = Point ( curve , x , y , r ) return Curve ( name , curve , generator , oid )
create an ecdsa .