From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: A question on encryption Date: Wed, 27 Aug 2014 21:27:24 +0200 Organization: WMI UAM Message-ID: <20140827212724.7d0065e0@aga-netbook> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1409167678 14073 80.91.229.3 (27 Aug 2014 19:27:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2014 19:27:58 +0000 (UTC) To: GNU Emacs users list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 27 21:27:52 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XMiso-0007ys-Vk for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Aug 2014 21:27:51 +0200 Original-Received: from localhost ([::1]:33019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMiso-0007qK-IY for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Aug 2014 15:27:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMisZ-0007qD-KS for help-gnu-emacs@gnu.org; Wed, 27 Aug 2014 15:27:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMisU-0004i2-Cz for help-gnu-emacs@gnu.org; Wed, 27 Aug 2014 15:27:35 -0400 Original-Received: from msg.wmi.amu.edu.pl ([150.254.78.50]:39026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMisU-0004ho-7K for help-gnu-emacs@gnu.org; Wed, 27 Aug 2014 15:27:30 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id DD33C46C97 for ; Wed, 27 Aug 2014 21:27:26 +0200 (CEST) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tCKna5XYy1i6 for ; Wed, 27 Aug 2014 21:27:26 +0200 (CEST) Original-Received: from aga-netbook (unknown [185.13.171.31]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id B114046C7A for ; Wed, 27 Aug 2014 21:27:26 +0200 (CEST) X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.20; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 150.254.78.50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99436 Archived-At: Hi all, I'm experimenting with encryption in Emacs using the EPG library. I'm using Emacs version: ============================================================ GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-08-22 on chindi02, modified by Debian ============================================================ and gpg version: ============================================================ gpg (GnuPG) 1.4.14 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Home: ~/.gnupg Supported algorithms: Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128, CAMELLIA192, CAMELLIA256 Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 Compression: Uncompressed, ZIP, ZLIB, BZIP2 ============================================================ 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.) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University