From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5314 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: Recommended way to probe for bcrypt support? Date: Mon, 23 Jun 2014 21:07:26 -0700 Message-ID: <20140624040726.GA708@muslin> References: <20140623215357.GB564@muslin> <20140623223339.GP179@brightrain.aerifal.cx> <20140623231735.GA4835@openwall.com> <20140623235254.GQ179@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1403582846 3425 80.91.229.3 (24 Jun 2014 04:07:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Jun 2014 04:07:26 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5319-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jun 24 06:07:18 2014 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 1WzI0o-0002qM-D4 for gllmg-musl@plane.gmane.org; Tue, 24 Jun 2014 06:07:14 +0200 Original-Received: (qmail 28421 invoked by uid 550); 24 Jun 2014 04:07:13 -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 28413 invoked from network); 24 Jun 2014 04:07:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=1/7DnyV+XszokPdn5Q4mFTfej+JxmpdgWZFh9abzYCQ=; b=0x1CvCyCnsXvToj4xvKWvD9M3m7CB2llTSZlgOMRiL8SBv/vdWgDf8EOR8aJPW3elU 8KLbYlnmqIalmnnjyjVgAqGhP5+OpNqQ1e5Ei7aYeORN+LUVS2vWmV3hXFeZ6TXD9+eH DUOtSD+6IrvLwZ8bOsbtz5bnPEKjnGW2/D9dgrZAjkZul6F17KkWX5lkIsoWmqcFsvfH dgSSbbgGvJtTpOxu/+/974wmM9ciQaMUQ2L293AIT0HAT+tndy4od3htjH7mxITrLWAz MGwer041r9zLSwAa+X7ue1m6sz09VaDIzosFypFtLf182hPO8ZpMqqZzgOoxGfz6NWXR 6/6w== X-Received: by 10.66.146.105 with SMTP id tb9mr601054pab.157.1403582821124; Mon, 23 Jun 2014 21:07:01 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140623235254.GQ179@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:5314 Archived-At: On Mon, Jun 23, 2014 at 07:52:55PM -0400, Rich Felker wrote: > > Unfortunately, at runtime detecting bcrypt in > > this way is a bit slow since the minimum cost setting is 4 (meaning 16 > > iterations of the eksBlowfish loop). For mkpasswd it is acceptable - > > so do it - but e.g. in phpass I am reluctant to do it that way. > > I'm not clear why it would be necessary to probe for it when not > actually attempting to use it, except in cases like providing a list > of supported hashes (e.g. --help or similar). The normal usage case > for "runtime probe" seems to be "try to use it, and report failure if > it's not available". FYI, (toybox) mkpasswd has "-m help". (passwd currently has a static list of hashes.) Thanks, Isaac Dunham