From owner-freebsd-stable Tue Jul 10 7:47:46 2001 Delivered-To: freebsd-stable@freebsd.org Received: from mercury.asuka.ne.jp (mercury.asuka.ne.jp [210.155.86.62]) by hub.freebsd.org (Postfix) with ESMTP id 5917A37B40E for ; Tue, 10 Jul 2001 07:47:36 -0700 (PDT) (envelope-from yasu@asuka.net) Received: from localhost (localhost [127.0.0.1]) by mercury.asuka.ne.jp (Postfix) with ESMTP id 7AC2C5E5A; Tue, 10 Jul 2001 23:43:53 +0900 (JST) To: mike@sentex.net Cc: stable@FreeBSD.ORG Subject: Re: Generating encrypted passwords From: HIRATA Yasuyuki In-Reply-To: <5.1.0.14.0.20010710102259.04255440@marble.sentex.ca> References: <4.2.2.20010710081901.05a68008@192.168.0.12> <20010710220142V.yasu@asuka.net> <5.1.0.14.0.20010710102259.04255440@marble.sentex.ca> X-Face: 7%a.tv,8"?iT8?|]>3u{(,ER`DSn^tGI'OrJaMEv+UaeyiblNlS~N#;!9SaMa=(gI>IuKqsImWzoiTnu|9+xA1g}1==:UHtY-0vrJ&"g9sYUa56<""X)B.3X&r?iDz=K>%W@O(V~r K)`wq+:[`&^!wB[**-!][YRLXPvIn#L?fb1vm$AKQW1X?P1-%?uf@x`&`r>1B;aBjeS([x5yy0+b X-Mailer: Mew/1.94.2 XEmacs/21.5 (anise) (i386-unknown-freebsd4.3) Organization: Asuka.Net X-URL: http://yasu.asuka.net/ X-Moe: =?iso-2022-jp?B?GyRCPzlCdE0lGyhC?=, =?iso-2022-jp?B?GyRCP0BIeDRRTmsbKEI=?= (=?iso-2022-jp?B?OBskQjduGyhCNBskQkZ8MEo5XxsoQg==?=), =?iso-2022-jp?B?GyRCN241XCQiJGYbKEI=?= X-Moe-Info: See http://www.x-moe.org/ for detail. Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20010710235206S.yasu@asuka.net> Date: Tue, 10 Jul 2001 23:52:06 +0900 (JST) X-Dispatcher: imput version 20000228(IM140) Lines: 34 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 Hi, From: Mike Tancsa To: HIRATA Yasuyuki Subject: Re: Generating encrypted passwords Date: Tue, 10 Jul 2001 10:24:55 -0400 Message-ID: <5.1.0.14.0.20010710102259.04255440@marble.sentex.ca> > > > 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`); Oh, I missed the purpose. In this case, checksumming the gzip's output seems better. Thanks. ---- HIRATA Yasuyuki http://yasu.asuka.net/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message