def import_ed25519_privatekey_from_file(filepath, password=None, prompt=False):
<EOL>securesystemslib.formats.PATH_SCHEMA.check_match(filepath)<EOL>if password and prompt:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if password is not None:<EOL><INDENT>securesystemslib.formats.PASSWORD_SCHEMA.check_match(password)<EOL>if not len(password):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT><DEDENT>elif prompt:<EOL><INDENT>password = get_password('<STR_LIT>'<EOL>'<STR_LIT>' + Fore.RED + filepath + Fore.RESET + '<STR_LIT>',<EOL>confirm=False)<EOL>if len(password) == <NUM_LIT:0>: <EOL><INDENT>password = None<EOL><DEDENT><DEDENT>with open(filepath, '<STR_LIT:rb>') as file_object:<EOL><INDENT>json_str = file_object.read()<EOL>return securesystemslib.keys.import_ed25519key_from_private_json(json_str, password=password)<EOL><DEDENT>
<Purpose>
  Import the encrypted ed25519 key file in 'filepath', decrypt it, and return
  the key object in 'securesystemslib.formats.ED25519KEY_SCHEMA' format.

  The private key (may also contain the public part) is encrypted with AES
  256 and CTR the mode of operation.  The password is strengthened with
  PBKDF2-HMAC-SHA256.

<Arguments>
  filepath:
    <filepath> file, an RSA encrypted key file.

  password:
    The password, or passphrase, to import the private key (i.e., the
    encrypted key file 'filepath' must be decrypted before the ed25519 key
    object can be returned.

  prompt:
    If True the user is prompted for a passphrase to decrypt 'filepath'.
    Default is False.

<Exceptions>
  securesystemslib.exceptions.FormatError, if the arguments are improperly
  formatted or the imported key object contains an invalid key type (i.e.,
  not 'ed25519').

  securesystemslib.exceptions.CryptoError, if 'filepath' cannot be decrypted.

<Side Effects>
  'password' is used to decrypt the 'filepath' key file.

<Returns>
  An ed25519 key object of the form:
  'securesystemslib.formats.ED25519KEY_SCHEMA'.