From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.180.131 with SMTP id bu3cs35378icb; Mon, 8 Nov 2010 03:33:02 -0800 (PST) Received: by 10.100.110.7 with SMTP id i7mr1922041anc.142.1289215981802; Mon, 08 Nov 2010 03:33:01 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id c32si10361799anc.27.2010.11.08.03.33.01; Mon, 08 Nov 2010 03:33:01 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 3D0A31858389; Mon, 8 Nov 2010 06:33:01 -0500 (EST) Received: from mail-vw0-f50.google.com (mail-vw0-f50.google.com [209.85.212.50]) by rubyforge.org (Postfix) with ESMTP id 6E9AA1858381 for ; Mon, 8 Nov 2010 06:21:13 -0500 (EST) Received: by vws4 with SMTP id 4so1643823vws.23 for ; Mon, 08 Nov 2010 03:21:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:received :in-reply-to:references:date:message-id:subject:from:to:content-type; bh=bCoWmZW/zKZ/Y43uMx8ofrrRCnj0hZr8bzZoKrwjf0k=; b=LCrm6rFVG+AQOUYx67BECU1QFxdgzlGHTDwIrk4QLSTnj1KRswuKAQEaDKGPeEcVLw 7OzQn1fWED8OT++l5vZTaOIvkgJscPprNqeWN6FVVoEnXlqaNOkIrhegktzu7U6YaVWl Fi3KCizRGSfCXZNU/TJPP0gym6Xd3rvYb1Zu0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=X7mQv/cEBqyM9dE/D1PZjjMYh7YZC1aDrGy162uRjMQ1xO4H/R8kTvq3cS09eC9let 5cICBG+83+57p04/O4qTjaJyhc8s0/2GmzC0jK/jrMUjOEVgfVLwvkHTzVQAdenmEJ8q zFl2OS7LcZtTwyo2uR2mKpEYU0wDOZ/v7RqXQ= MIME-Version: 1.0 Received: by 10.224.217.197 with SMTP id hn5mr3745279qab.315.1289215273080; Mon, 08 Nov 2010 03:21:13 -0800 (PST) Received: by 10.229.219.68 with HTTP; Mon, 8 Nov 2010 03:21:12 -0800 (PST) Received: by 10.229.219.68 with HTTP; Mon, 8 Nov 2010 03:21:12 -0800 (PST) In-Reply-To: References: Date: Mon, 8 Nov 2010 11:21:12 +0000 Message-ID: From: Hamish D To: sup-devel@rubyforge.org Subject: Re: [sup-devel] [PATCH] Converted crypto to use the gpgme gem X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1571256861==" Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org --===============1571256861== Content-Type: multipart/alternative; boundary=20cf300fb4a5641761049488d2e7 --20cf300fb4a5641761049488d2e7 Content-Type: text/plain; charset=UTF-8 Best hang fire on this patch. It appears to crash when verifying a signature when the public key is not available. I'm investigating the problem and how to fix it cleanly and I'll resubmit once I've done that. Hamish On Nov 6, 2010 8:08 PM, "Hamish D" wrote: I often find that loading long threads of encrypted messages (I have several of over 10 messages and one of nearly 40) leads to lots of flickering as the console replaces sup, sup comes back, the console comes back again ... It is also very slow, and involves writing decrypted messages to disk (if only temporarily) which could be a security hole. So I've looked about and found the gpgme gem which provides an API to use, and allows decryption entirely in memory. So I've rewritten lib/sup/crypto.rb to use gpgme. The functionality is pretty much the same. Things I'm aware of that are different: * we can't set the signature algorithm, so we have to use whatever is set in the user's preferences * the gpg-args hook has been replaced by the gpg-options hook Other than that I think it is the same, although it took some work to get the signature output to be the same. The other main difference is that it's much faster and nicer now :) It could do with some testing - I don't have much in the way of messages that cause gpg to complain, so if you do, please try opening those messages with this code and see if the behaviour is reasonable - no crashes, given messages about why your message was bad etc. Also I guess I should ask if people are happy to use this gem. Is it hard to use on Macs? I guess I could rewrite this patch so it falls back to the gpg binary if gpgme is not available ... To install this patch on Debian/Ubuntu you can either * apt-get install libgpgme-ruby * apt-get install libgpgme11-dev; gem install gpgme Hamish Downer --20cf300fb4a5641761049488d2e7 Content-Type: text/html; charset=UTF-8

Best hang fire on this patch. It appears to crash when verifying a signature when the public key is not available. I'm investigating the problem and how to fix it cleanly and I'll resubmit once I've done that.

Hamish

On Nov 6, 2010 8:08 PM, "Hamish D" <dmishd@gmail.com> wrote:

I often find that loading long threads of encrypted messages (I have
several of over 10 messages and one of nearly 40) leads to lots of
flickering as the console replaces sup, sup comes back, the console
comes back again ... It is also very slow, and involves writing
decrypted messages to disk (if only temporarily) which could be a
security hole. So I've looked about and found the gpgme gem which
provides an API to use, and allows decryption entirely in memory.

So I've rewritten lib/sup/crypto.rb to use gpgme. The functionality is
pretty much the same. Things I'm aware of that are different:

* we can't set the signature algorithm, so we have to use whatever is
set in the user's preferences
* the gpg-args hook has been replaced by the gpg-options hook

Other than that I think it is the same, although it took some work to
get the signature output to be the same. The other main difference is
that it's much faster and nicer now :)

It could do with some testing - I don't have much in the way of
messages that cause gpg to complain, so if you do, please try opening
those messages with this code and see if the behaviour is reasonable -
no crashes, given messages about why your message was bad etc.

Also I guess I should ask if people are happy to use this gem. Is it
hard to use on Macs? I guess I could rewrite this patch so it falls
back to the gpg binary if gpgme is not available ...

To install this patch on Debian/Ubuntu you can either

* apt-get install libgpgme-ruby
* apt-get install libgpgme11-dev; gem install gpgme

Hamish Downer

--20cf300fb4a5641761049488d2e7-- --===============1571256861== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel --===============1571256861==--