From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3224 Path: news.gmane.org!not-for-mail From: Gregor Pintar Newsgroups: gmane.linux.lib.musl.general Subject: Re: High-priority library replacements? Date: Fri, 26 Apr 2013 19:24:37 +0200 Message-ID: References: <20130425041553.GA13951@brightrain.aerifal.cx> <20130426005545.GA7923@Caracal> <20130426154728.GQ20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1366997089 12945 80.91.229.3 (26 Apr 2013 17:24:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Apr 2013 17:24:49 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3228-gllmg-musl=m.gmane.org@lists.openwall.com Fri Apr 26 19:24:53 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UVmO9-0008Tf-SY for gllmg-musl@plane.gmane.org; Fri, 26 Apr 2013 19:24:50 +0200 Original-Received: (qmail 7956 invoked by uid 550); 26 Apr 2013 17:24:48 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7946 invoked from network); 26 Apr 2013 17:24:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=TU5RpI4GMjIjWgoZSn6x/24uY1CPwL56mFLoeTU4u0A=; b=oDc2pwwaN1skTa3B+jjKccYVdVoUIR9sx7mxCPgIrQBJXNdwTRDL2QQMQ76s4cFHKs Kdz0YgHHE2NTpTjEjZArElK/TWQ7LR1M4jaSzIOuSQruK17CE3k16cP8eLxAR5X0xKiL HRYKXNEvEkGWHjdBRCL5Yvw2XSX4OAasJ4UeMYJly6Rk5IjLbIS5HoQM4Md8XCMUGu3C yJijlnADguEeIkUdEjjLpFnf1bBI0qYVM/+cymxvwqEDpDFgBt4tOBRKC5kCsCs/0c8S xYhKao8Ms0LrYyS8yGO55FL27WftnUIPRQvALvpUL2SKdPL64VtgsoA6OgzZS+yu5BtP Bc4g== X-Received: by 10.180.84.162 with SMTP id a2mr5449400wiz.14.1366997077262; Fri, 26 Apr 2013 10:24:37 -0700 (PDT) In-Reply-To: <20130426154728.GQ20323@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:3224 Archived-At: 2013/4/26, Rich Felker : > On Fri, Apr 26, 2013 at 10:11:32AM +0200, Gregor Pintar wrote: >> 2013/4/26, idunham@lavabit.com : >> > I hate to be the one who says this, but... >> > Why another crypto library? >> > There are at least 6 I can think of off the top of my head >> > (openssl crypto, gcrypt, nettle, tomcrypt, gpg, openbgp) >> > and I know that's not even half of them. >> > tomcrypt is already good (as Rich mentioned), so code quality isn't >> > a reason. >> Most of them are realy bad (support only few ciphers, ugly API, >> inflexible, license). >> tomcrypt is good, but it has some global states (ltc_cipher_descriptor, >> ...) > > Yes, this is stupid, but I don't think there's any reason to use it. > Can't you just use the extern descriptor for the cipher you want > directly? You can't, because modes read from global descriptor. See: https://github.com/libtom/libtomcrypt/blob/master/src/modes/ctr/ctr_start.c > In any case, I agree that when using tomcrypt the register > and unregister functions should be nop'd out and the cipher_descriptor > array replaced with a const version thereof. There may be more changes > needed to fix it too, but that sounds like most of it. But that would break API anyway.