[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A source of entropy?
-----BEGIN PGP SIGNED MESSAGE-----
On Mon, 25 Nov 1996, inssdl wrote:
> Last weekend I spent time formatting a little over 100 new floppies. When
> I was staring at the monitor between changes, I started looking at the
> volume serial number that was being thrown up for each disk.
>
> These *appeared* to be unpredictable from the previous serial number given.
>
> If the serial number is represented as xxxx-yyyy then sometimes yyyy
> would be one less than the previous yyyy but xxxx always seemed to be
> "random".
The serial number is derived from the time of day. This is used by a lot of
programs to get a few bits of entropy, so the disk serial number will probably
not add much entropy. Here's a post I saved from alt.hackers that explains the
exact algorithm:
From: [email protected] (jsl2228)
Newsgroups: alt.hackers
Subject: Re: Disk Serial Numbers.
Date: 17 May 1995 04:36:00 GMT
MICHAEL PAUL DANIEL ([email protected]) wrote:
: Just a quick question.. How does MS-DOS determine the serial number when
: you format a disk??
It's not a pesudo-randum number #, it actually has a formula. It's
based on the current date & time.
unsigned long int NS; (Serial numbers are 32 bits)
NS = ( ( ( ((seconds << 8) + hundreth) ) +
((day << 8) + month) ) << 16 ) +
( ((hour << 8) + minutes) + year);
Try this: get a disk that is already formatted (but whose data you
don't care about:)
>FORMAT A:/Q/U/V:""
Format the disk once, note the serial number, then immediately
format it again. Note that the second serial number only differs in
a few digits from the first.
[rest deleted]
Mark
- --
finger -l for PGP key
PGP encrypted mail prefered.
0xf9b22ba5 now revoked
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3
Charset: noconv
iQEVAwUBMpoP1yzIPc7jvyFpAQHRrwf9ErlmAu6WObOvxPIX1ZC1NhpeoLOJXO8T
WfLow0dDTKqN7+kfHNbE3sFJpX5hZptglsLqB2I0xFobdOlbDhTIQ34qZ0ZNIKTG
CX+ILythFWw4bAGnHanecK80FTpMP9lQRBMSZt+CrKi5YteLkdHHsS2aq+JdbHlI
RJkNiVfwkHdfLvIiKDAQqx7IzjW2oM7Q32D2zySb8aDNB2cn7CawlJauq69ultWG
O1axD7wf2q3G4NccvgZQx4c0W6loF7NWgiDQVchvI6eCxILDg5LYrj7aH9RfomcO
4sTjdoxXaopZiRt5lhLCXtx9+z4VKtuSuFyTCDM8xLoNPEcbYrFXow==
=GXvQ
-----END PGP SIGNATURE-----