From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3260 Path: news.gmane.org!not-for-mail From: Gregor Pintar Newsgroups: gmane.linux.lib.musl.general Subject: Re: High-priority library replacements? Date: Tue, 30 Apr 2013 16:11:29 +0200 Message-ID: References: <20130426005545.GA7923@Caracal> <20130429101620.GG12689@port70.net> <20130429215500.GJ12689@port70.net> <20130430021014.GC20323@brightrain.aerifal.cx> <20130430083516.GK12689@port70.net> <20130430113020.GL12689@port70.net> 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 1367331109 14167 80.91.229.3 (30 Apr 2013 14:11:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Apr 2013 14:11:49 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3264-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 30 16:11:48 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 1UXBHW-0006BU-MS for gllmg-musl@plane.gmane.org; Tue, 30 Apr 2013 16:11:47 +0200 Original-Received: (qmail 7369 invoked by uid 550); 30 Apr 2013 14:11:42 -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 7340 invoked from network); 30 Apr 2013 14:11:41 -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=c1jPCTwdGcHD6+L7qirL7DqRHm9AKZ70pCuIkqS5gIU=; b=V3BHia4OJxjRxsOQHiaHRWKMsnHDfslbH/amSguRFUZbzNMICQgJr7jbwFkdnmBh/U i1etTj9ozayl8asddubogqo0K/8t5xDkfq5RRLO7LMzs2VevBK0jhHf494mnpQnD8VQH i4uOZPaP7lugW8uu6vMU4lprclm8sD+ejSGVHktGPoUAtHjMxMJ+o7eCQNpyAiSCNWVl lQdrOMNjKh+g7XUpL24344xgZaojVnAUk1GhzDqiUqoi7qu+26aYWHuOE58MrkuRnoCY uPelvSOnKWD/osUL12bsFDg9XKcc3HnTQOR0cydNER2YFlpUhKfsb27AoYSr/dL9YH54 STfA== X-Received: by 10.180.188.198 with SMTP id gc6mr12825300wic.14.1367331089268; Tue, 30 Apr 2013 07:11:29 -0700 (PDT) In-Reply-To: <20130430113020.GL12689@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:3260 Archived-At: 2013/4/30, Szabolcs Nagy : > * Gregor Pintar [2013-04-30 11:58:26 +0200]: >> 2013/4/30, Szabolcs Nagy : >> > * Gregor Pintar [2013-04-30 08:32:26 +0200]: >> >> My idea was that program would be correct, if it inputs too much data >> >> to hash function. It is very cheap to implement in most algorithms >> >> (detect counter overflow). Otherwise program has to count it himself. >> > >> > i dont think the program has to count >> > >> > eg in case of sha1 if you know that the throughput is less than >> > 10gbps then it takes more than 50years to overflow >> > >> Blowfish can encrypt max 128GB. >> > > i see, i didn't know this > > i wonder how often do ppl check the return value > (eg you don't seem to do it in your tests) > I wrote tests only to see if implementation is close to correct. Most tests doesn't even work (they were not updated when api changed). So tests are not even close to finished. >> > in theory there might be use-cases where the overflow could occure >> > in which case reporting error makes sense, but it seems to me that >> > can be avoided by the proper choice of algorithm or reasonable >> > application design >> > >> Choice of algorithm is not mine. > > i meant that if a tool is used for something that it was not > designed for then that's a user error not a tool error > > > the lib looks fine otherwise, but the hard parts are missing for tls > (rsa,dsa,ecdsa require a bignum library, tls requires a parser for a > lot of complex formats) > Yes, I know I will probably use libtommath (for start) and public key crypto will probably be ported from libtomcrypt (twofish is also form libtomcrypt). tls/ssl will probably be separate.