From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nala Ginrut Newsgroups: gmane.lisp.guile.devel Subject: Re: About Guile crypto support Date: Mon, 04 Feb 2013 12:15:40 +0800 Organization: HFG Message-ID: <1359951340.2754.44.camel@Renee-desktop.suse> References: <1359896146.2754.19.camel@Renee-desktop.suse> <1359947520.2754.27.camel@Renee-desktop.suse> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1359951352 3377 80.91.229.3 (4 Feb 2013 04:15:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Feb 2013 04:15:52 +0000 (UTC) Cc: guile-devel@gnu.org To: Daniel Hartwig Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Feb 04 05:16:12 2013 Return-path: Envelope-to: guile-devel@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 1U2DTY-0002U0-8k for guile-devel@m.gmane.org; Mon, 04 Feb 2013 05:16:12 +0100 Original-Received: from localhost ([::1]:44596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2DTF-000736-NT for guile-devel@m.gmane.org; Sun, 03 Feb 2013 23:15:53 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2DTA-00072q-Ol for guile-devel@gnu.org; Sun, 03 Feb 2013 23:15:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U2DT9-0002Wt-1E for guile-devel@gnu.org; Sun, 03 Feb 2013 23:15:48 -0500 Original-Received: from mail-pa0-f42.google.com ([209.85.220.42]:34913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U2DT8-0002Wi-HZ for guile-devel@gnu.org; Sun, 03 Feb 2013 23:15:46 -0500 Original-Received: by mail-pa0-f42.google.com with SMTP id kq12so236890pab.15 for ; Sun, 03 Feb 2013 20:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:subject:from:to:cc:date:in-reply-to :references:organization:content-type:x-mailer:mime-version :content-transfer-encoding; bh=p4E9A4SSPiRcBJopDsdI9EnzsWgV0uH7n0PC7PmRaHM=; b=gZCBFXT4IkmoEx1rvJsgPIxhO6/z7grRvFMBRH6oLDHuSV9KvGPgwYHip4M5P+/XtV uayE9ysEgtFQ/LyVnTqI6iJRCULpOxDeuth6Dr05Fucsz2XbbgbvrFsJ40ph4Ws0JB/S S8vGEA/U2Uz2PUxYLAjEwFrPGUkK/Gk2XD8/cQrfRxSR6ZbIbO+IGLFY5SdX6lOUMGYI yCZ+tSG8hQqh8uVtp4eeFP1D7IXUMeCHjMuD+EM+vBCk9if0z9ipF49FzBGo0FAewH8k U5j+sCDTShJ94jx+v41/OtwUVQUi/EriBXcnE9kMHth+7vB+ALPPffPxqKKxoj75XCYn iAUg== X-Received: by 10.66.81.231 with SMTP id d7mr48464404pay.27.1359951345540; Sun, 03 Feb 2013 20:15:45 -0800 (PST) Original-Received: from [147.2.147.112] ([61.14.130.226]) by mx.google.com with ESMTPS id bi2sm17996335pab.18.2013.02.03.20.15.42 (version=SSLv3 cipher=RC4-SHA bits=128/128); Sun, 03 Feb 2013 20:15:44 -0800 (PST) In-Reply-To: X-Mailer: Evolution 3.4.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.220.42 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15680 Archived-At: On Mon, 2013-02-04 at 11:35 +0800, Daniel Hartwig wrote: > On 4 February 2013 11:12, Nala Ginrut wrote: > >> If your goal is only to provide crypto. support to Guile programs, > >> then time is better spent providing a wrapper to the existing library. > >> Concerns about adding an external dependency do not hold much weight > >> next to the advantages of directly using the library; “don't repeat > >> yourself”, and all that. > >> > > > > That's my aim, nowadays a language should provide md5/sha1 at least > > since they are very common. > > > >> Perhaps you are aware that there an extension for gcrypt under > >> development, with modules for the hash and randomize functions: > >> . > >> > > > > I have a similar project too: > > https://gitorious.org/nacre/libgcrypt-guile > > > > The other project is much further along, providing direct bindings to > gcrypt and has a convenience form (quick-hash ALGORITHM DATA). > Suggest to continue working there rather than duplicating efforting. > > Taking a quick look at your code, there are some problems that > immediately stand out. The calls to gcry_control should not be in > mda, being repeated on every call; libgcrypt documents even specify > that language bindings should not handle init, which is a task for the > application. > libgcrypt-guile is old and earlier than grcypt-guile one year. I need digest things and there's no guildhall, so I have to write a buggy one. I'm glad there's a better choice for it. ;-) > > Write a lib-wrapper is another story, guys who needs more specific > > feature(efficiency/security) could use these packages from guildhall. > > But my opinion is to provide the common digest API in ice-9, many guys > > asked such a questions, and I suggested them use my libgcrypt-guile, but > > I can't answer why Guile doesn't has these common API. So I decide to > > add them. > > > > What do you think? > > Personally I would work with the existing gcrypt-guile project. It is > LGPL and anyone who needs such functionality can easily import it. As > mentioned above, it already provides the quick-hash form which I > believe is what you are looking for. > > I also don't any pressing need to move this in to the core Guile > distribution when it is freely available as an addon. But I see that > we disagreed on this same point with your colorized module as well :-) > Well, I think there's a little difference to add module to core between us. My opinion is to add very common thing to core, though sometimes these things maybe not a very proper core API. But anyway, considering guildhall works in the long term, these two opinions difference are trivial. ;-) I don't against anything about gcrypt-guile, it's fine. But I think adding common digest APIs into core is a considerable topic. If folks need more powerful crypto things, finding other more expert packages in the guildhall is a better choice. But most of the time, they just need md5/sha since doing some hash work is very common nowadays. Users don't have to download & compile another project, or install guildhall for that if they just need md5. They will choice a pipe for 'md5sum' instead. I do think Guile should provide convenience for such issue. What do you think? > Regards