From owner-freebsd-stable Tue Jul 10 7:31:40 2001 Delivered-To: freebsd-stable@freebsd.org Received: from smtp1.sentex.ca (smtp1.sentex.ca [199.212.134.4]) by hub.freebsd.org (Postfix) with ESMTP id 34C2B37B403 for ; Tue, 10 Jul 2001 07:31:37 -0700 (PDT) (envelope-from mike@sentex.net) Received: from simoeon.sentex.net (simeon.sentex.ca [209.112.4.47]) by smtp1.sentex.ca (8.11.2/8.11.1) with ESMTP id f6AEVNO49984; Tue, 10 Jul 2001 10:31:23 -0400 (EDT) (envelope-from mike@sentex.net) Message-Id: <5.1.0.14.0.20010710102259.04255440@marble.sentex.ca> X-Sender: mdtpop@marble.sentex.ca X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 10 Jul 2001 10:24:55 -0400 To: HIRATA Yasuyuki From: Mike Tancsa Subject: Re: Generating encrypted passwords Cc: stable@FreeBSD.ORG In-Reply-To: <20010710220142V.yasu@asuka.net> References: <4.2.2.20010710081901.05a68008@192.168.0.12> <200107100306.NAA21657@lightning.itga.com.au> <4.2.2.20010710081901.05a68008@192.168.0.12> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 10:01 PM 7/10/01 +0900, HIRATA Yasuyuki wrote: > > What about a > > srand (time ^ $$ ^ unpack "%L*", `ps -auxw | gzip`); > > > > at the start of your program > >If you use perl 5.005 or later, it's better to call srand without seed >or not to call srand at all. See perldoc -f srand for detail. Hi, but the same perldoc says, .... Note that you need something much more random than the default seed for cryptographic purposes. Checksumming the compressed output of one or more rapidly changing operating system status programs is the usual method. For example: srand (time ^ $$ ^ unpack "%L*", `ps axww | gzip`); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message