def generate_signing_key(args):
 if os.path.exists(args.keyfile):
  raise esptool.FatalError(('ERROR: Key file %s already exists' % args.keyfile))
 sk = ecdsa.SigningKey.generate(curve=ecdsa.NIST256p)
 with open(args.keyfile, 'wb') as f:
  f.write(sk.to_pem())
 print ('ECDSA NIST256p private key in PEM format written to %s' % args.keyfile)

def generate_signing_key ( args ) : if os . path . exists ( args . keyfile ) : raise esptool . FatalError ( ( 'ERROR: Key file %s already exists' % args . keyfile ) ) sk = ecdsa . SigningKey . generate ( curve = ecdsa . NIST256p ) with open ( args . keyfile , 'wb' ) as f : f . write ( sk . to_pem ( ) ) print ( 'ECDSA NIST256p private key in PEM format written to %s' % args . keyfile )
generate an ecdsa signing key for signing secure boot images .