2 .\" Public Domain 1995 Rickard E. Faith (faith@cs.unc.edu)
3 .TH MCOOKIE 1 "25 September 1995" "" "Linux Programmer's Manual"
5 mcookie \- generate magic cookies for xauth
7 .BI "mcookie [\-v] [\-f " filename " ]"
10 generates a 128-bit random hexadecimal number for use with the X authority
11 system. Typical usage:
13 xauth add :0 . `mcookie`
16 The "random" number generated is actually the output of the MD5 message
17 digest fed with various piece of random information: the current time, the
18 process id, the parent process id, the contents of an input file (if
20 is specified), and several bytes of information from the first of the
21 following devices which is present:
28 The entropy in the generated 128-bit is probably quite small (and,
29 therefore, vulnerable to attack) unless a non-pseudorandom number generator
34 It is assumed that none of the devices opened will block.