Pasquale Frega <
pasqual...@tiscali.it> wrote:
> On Wed, 13 Apr 2016 16:13:38 +0200
> Pasquale Frega <
pasqual...@tiscali.it> wrote:
> > On Sun, 10 Apr 2016 18:53:52 -0000 (UTC)
> > Rich <ri...@example.invalid> wrote:
> >
> > >
> > > There are plenty of ways, but they all begin with use of a
> > > cryptographically secure random number generator, and proper seeding of
> > > that random number generator.
> > >
> >
> > Whats about this?
> >
> > paskali@zemir:~$ tclsh
> > % variable _seed [pid];
From an "is is secure?" standpoint - no, nothing you can do will make
Tcl's rand() generator "secure" (in a general sense).
Is it good enough to generate better randomized passwords than you
would do yourself, manually: yes. Humans are very bad at 'randomly'
generating anything. Is it secure against a knowledgeable attacker:
no.
Again, you need to define your threat model (something you've avoided
now across multiple posts) in order to make any call as to "secure".
There is an extreme gap between "secure against my nine year old little
brother" and "secure against NSA spying". So far, you've failed, even
after having been prodded several times, to provide any definition of
whom you are trying to secure against. Without that definition, the
only answer that is safe when it comes to using Tcl's default rand()
generator is: no - not secure.
Note, the hard part about generating secure random numbers is picking a
seed value. The seed itself needs to be *randomly* generated. There's
a huge catch-22 there unless you've got some form of radioactive decay
(or other) physical random number generator available.
Also using [pid] as a seed is not secure. Nor is using the output from
[clock] secure. *Any* deterministic input as a seed makes the
resulting pseudo-random number generator insecure. There have been
numerous breaks throughout history of different cryptosystems where the
break was because a non-random seed was chosen for a high quality
cryptographic random number generator.