all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: help-gnu-emacs@gnu.org
Subject: Re: A question on encryption
Date: Thu, 28 Aug 2014 08:22:30 +0800	[thread overview]
Message-ID: <8738chzcmx.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 20140827212724.7d0065e0@aga-netbook

Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:

[...]

> I created a test file (call it "test") with a single line of text and
> did two things:
>
> 1. C-x C-f test RET, C-x C-w test.gpg RET
>
> Then I selected the key and hit ok.
>
> 2. From the command line:
> gpg -e -r key-id -o test2.gpg test
>
> The two resulting files were different (difference in length of 3
> bytes; find-file-literally and manual inspection showed that the
> beginnings were identical, but the endings were not).
>
> My question is: why is that so?  I instrumented the function
> epg-start-encrypt for Edebug, and it seems that the argument list it
> constructed was identical or equivalent to the one I'm giving on the
> command line.
>
> My other question is: is it fine?  I'm an (almost) complete layman
> with crypto, and I don't want to open some huge security hole because
> of my ignorance.  (I want to store my email passwords in encrypted
> files, set a very short timeout in gpg-agent and connect it to my
> mailing client, so that stealing my laptop won't enable the thief to
> impersonate me.)

I don't know what's going on with your specific problem, but let me
recommend the "pass" command-line utility for this situation. It does
just what you want -- storing passwords as gpg-encrypted files -- and if
you have the agent running, that keeps all your secrets locked up
nicely, without too much inconvenience. I have both SMTP and IMAP set up
to fetch their passwords using an invocation of pass, and it works
great.

If your goal is to learn the EPG library, then ignore this!

Eric




  reply	other threads:[~2014-08-28  0:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 19:27 A question on encryption Marcin Borkowski
2014-08-28  0:22 ` Eric Abrahamsen [this message]
2014-08-28  1:00   ` Marcin Borkowski
2014-08-28  6:53   ` Alan Schmitt
     [not found] <mailman.7656.1409167662.1147.help-gnu-emacs@gnu.org>
     [not found] ` <7zbnr5mesz.fsf@example.com>
2014-08-28  6:30   ` Marcin Borkowski
2014-08-29  3:22 ` Stefan Monnier
2014-08-29 12:28   ` Marcin Borkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8738chzcmx.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.