def generate_ecdsa_key(scheme='<STR_LIT>'):
<EOL>securesystemslib.formats.ECDSA_SCHEME_SCHEMA.check_match(scheme)<EOL>ecdsa_key = {}<EOL>keytype = '<STR_LIT>'<EOL>public = None<EOL>private = None<EOL>public, private =securesystemslib.ecdsa_keys.generate_public_and_private(scheme)<EOL>key_value = {'<STR_LIT>': public.replace('<STR_LIT:\r\n>', '<STR_LIT:\n>'),<EOL>'<STR_LIT>': '<STR_LIT>'}<EOL>keyid = _get_keyid(keytype, scheme, key_value)<EOL>key_value['<STR_LIT>'] = private<EOL>ecdsa_key['<STR_LIT>'] = keytype<EOL>ecdsa_key['<STR_LIT>'] = scheme<EOL>ecdsa_key['<STR_LIT>'] = keyid<EOL>ecdsa_key['<STR_LIT>'] = key_value<EOL>ecdsa_key['<STR_LIT>'] =securesystemslib.settings.HASH_ALGORITHMS<EOL>return ecdsa_key<EOL>
<Purpose>
  Generate public and private ECDSA keys, with NIST P-256 + SHA256 (for
  hashing) being the default scheme.  In addition, a keyid identifier for the
  ECDSA key is generated.  The object returned conforms to
  'securesystemslib.formats.ECDSAKEY_SCHEMA' and has the form:

  {'keytype': 'ecdsa-sha2-nistp256',
   'scheme', 'ecdsa-sha2-nistp256',
   'keyid': keyid,
   'keyval': {'public': '',
              'private': ''}}

  The public and private keys are strings in TODO format.

  >>> ecdsa_key = generate_ecdsa_key(scheme='ecdsa-sha2-nistp256')
  >>> securesystemslib.formats.ECDSAKEY_SCHEMA.matches(ecdsa_key)
  True

<Arguments>
  scheme:
    The ECDSA signature scheme.  By default, ECDSA NIST P-256 is used, with
    SHA256 for hashing.

<Exceptions>
  securesystemslib.exceptions.FormatError, if 'scheme' is improperly
  formatted or invalid (i.e., not one of the supported ECDSA signature
  schemes).

<Side Effects>
  None.

<Returns>
  A dictionary containing the ECDSA keys and other identifying information.
  Conforms to 'securesystemslib.formats.ECDSAKEY_SCHEMA'.