From owner-freebsd-questions@FreeBSD.ORG Tue Aug 4 02:28:53 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9A2A106564A for ; Tue, 4 Aug 2009 02:28:53 +0000 (UTC) (envelope-from modulok@gmail.com) Received: from mail-ew0-f206.google.com (mail-ew0-f206.google.com [209.85.219.206]) by mx1.freebsd.org (Postfix) with ESMTP id 3530B8FC14 for ; Tue, 4 Aug 2009 02:28:52 +0000 (UTC) (envelope-from modulok@gmail.com) Received: by ewy2 with SMTP id 2so3358325ewy.43 for ; Mon, 03 Aug 2009 19:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=FHPKhapZ9Qn5H5PtcidIJIOx6YQATHB1l+S/Ml2o8T8=; b=SIcUWoZxZD9rEdAp+LDTPzW5+87xVf7FwErDD1WYm6TacMa2sodIzZ9YzzZiUEnbV9 1WjOOyx3W4iRRs3y8gtgxhx+zWLT52qCytoZ92hc1CMYOJibk8x27WbdLoqX3kGF466i Ir0siOLrjR6d4ySEzyWpcTtODngFWNSDUVl64= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=sGEHXI4LD/qMqQVZrg4MvvyLdFEMH863SSUyX1fkqMCE/QoasYIo013vmiqIdQnP+V reb8+pDhEz4kD3rcYnakaYNmxNcEfJA3DG89/21Z1SK6w02G8BWwlO8CojTToGX4Lb8S 40PrsAj9ahRsEu49ld9ymg+tKK6hV6wiVtsPw= MIME-Version: 1.0 Received: by 10.210.89.7 with SMTP id m7mr5970307ebb.14.1249352932247; Mon, 03 Aug 2009 19:28:52 -0700 (PDT) Date: Mon, 3 Aug 2009 20:28:52 -0600 Message-ID: <64c038660908031928v15a76d15g5599e6f3fef936e1@mail.gmail.com> From: Modulok To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Secure password generation...blasphemy! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Aug 2009 02:28:54 -0000 I need a way to generate a lot of secure passwords. So, I read all about it. Either people are getting way carried away, or I'm missing something... There seems to be a lot of superstition about entropy. People have come up with quite creative ways at generating passwords using everything from dice in a shoebox to radio static recorded with a mic, to dedicated entropy hardware. Most seem to discourage using any computer program to generate passwords. The reasoning is that computers employ "only" pseudo-random number generator (PRNG, henceforth). I wrote a python script which uses /dev/random, and hashes the output with sha256. I then truncate the output to the desired length. Blasphemy! According to the superstitious password crowd my passwords are not very secure ... maybe. However, wouldn't hashing bytes from /dev/random be quite secure? The hash function would cover any readily apparent patterns, if they were found to existed. Both sha256 and yarrow are, to date, believed to be cryptographically secure. (Assuming the implementations are correct.) Therefore, using a cryptographically secure pseudo-random number generator and an equally secure hash function should be damn well good enough, right? I'd think that listening for cosmic background radiation or environmental infrared is drifting a little far from being in the realm of practical. Right? Just looking for any re-assurances. -Modulok-