emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch to include EasyPG to Emacs


From: Daiki Ueno
Subject: Re: patch to include EasyPG to Emacs
Date: Fri, 15 Feb 2008 11:20:10 +0900

2008/2/15, Richard Stallman <address@hidden>:
>     > How can that work?  You need to give the key each time you decrypt.
>
>     (I guess that you mean "encrypt" rather than "decrypt").
>
> I should have said "give your passphrase".  That's needed for
>  decryption.

That depends on situations (reading or writing, symmetric encryption
or public key encryption, and gpg-agent is running or not).  I believe
the current behavior reasonable enough and intuitive for users.  Here
is the accurate logic in pseudo code.

When reading:

If the file is encrypted in symmetric encryption
  If gpg-agent is running
    use gpg-agent; gpg is able to by-pass the interaction with Emacs,
    and it will directly ask the user with pinentry.  gpg-agent doesn't
    cache passphrase for symmetric encryption in this case.
  Else
    the user will be prompted for passphrase from the minibuffer.  The
    passphrase may be cached if certain variable is set.
  End
Else
  If gpg-agent is running
    use gpg-agent.  gpg-agent may cache the passphrase in this case.
  Else
    the user will be prompted for passphrase from the minibuffer.  The
    passphrase will never be cached.
  End
End

When writing:

If the file is being created
  ask user how to encrypt the content
Else
  inherit the encryption parameters of the file
End

If the user select symmetric encryption
  the same behavior with the reading case, except that passphrase will
  be prompted twice for confirmation.
Else
  the same behavior with the reading case
End
-- 
Daiki Ueno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]