1 mkpasswd.c documentation
3 This is documentation for the updated mkpasswd.c included with a number
4 of ircd, irc services, and non-IRC related programs
6 This version of mkpasswd can create DES, Extended DES, BlowFish, and MD5
7 passwords, with either randomly generated or user provided salts.
10 -m Generate an MD5 password
11 -d Generate a DES password
12 -b Generate a BlowFish password
13 -e Generate an Extended (BSDi) DES password
14 -l Specify a length for a random MD5 or BlowFish salt
15 -r Specify a number of rounds for a BlowFish or Extended DES password
16 BlowFish: no more than 6 recommended, no less than 4 accepted
17 Extended DES: default of 25
18 -s Specify a salt, 2 alphanumeric characters for DES, up to 16 for MD5,
19 up to 22 for BlowFish, 2 for Extended DES
20 -p Specify a plaintext password to use
24 Without the presence of any parameters, it'll behave like the old mkpasswd,
25 creating a DES password with a randomly generated salt and prompting for
26 the password (without echo).
28 A DES salt is a pair of alphanumeric characters ('.' and '/' are permitted
29 as well), such as 'a4' or 'Td'.
31 An MD5 salt consists of up to 16 (though most implementations limit you to
32 8) alphanumeric characters (plus '.' and '/'),
33 such as 'tGd' or 'J6d4dfG'.
35 A BlowFish salt consists of up to 22 alphanumeric characters (plus '.' and
36 '/'). BlowFish also specifies a number of rounds*, by default 4.
39 The encryption algorithms supported depend on your system's crypt()
41 The maximum length of an MD5 salt is limited to your systems crypt()
42 implementation, typically 8.
44 Supported Platforms (Known and tested):
45 Linux glibc (DES and MD5)
46 FreeBSD 3.x (DES (MD5 maybe))
47 FreeBSD 4.x (DES, MD5, BlowFish, Extended DES)
48 Solaris 2.5-2.6 (DES only)
49 Cygwin 1.1.4 (DES only)
50 Prior Cygwin with the MD5 libcrypt (MD5 only)
51 OpenBSD 2.7 (don't link with -lcrypt) (DES, MD5, Blowfish)
52 Mac OS-X (Darwin) (don't link with -lcrypt) (DES only)
54 An MMK build script is included, as well as an MD5 crypt() implementation
56 Other systems probably work, but they haven't been amply tested.
58 * BlowFish's rounds parameter is a logarithm, not an integer value