2 .\" $FreeBSD: src/usr.sbin/ntp/doc/ntp.keys.5,v 1.1.2.4 2002/12/29 16:35:42 schweikh Exp $
3 .\" $DragonFly: src/usr.sbin/ntp/doc/Attic/ntp.keys.5,v 1.2 2003/06/17 04:29:58 dillon Exp $
10 .Nd NTP daemon key file format
14 Following is a description of the format of NTP key files.
15 For a description of the use of these files, see the
16 .Qq Authentication Support
21 In the case of DES, the keys are 56 bits long with,
22 depending on type, a parity check on each byte.
23 In the case of MD5, the keys are 64 bits (8 bytes).
25 reads its keys from a file specified using the
27 command line option or the
29 statement in the configuration file.
30 While key number 0 is fixed by the NTP standard
32 and may not be changed,
33 one or more of the keys numbered 1 through 15
34 may be arbitrarily set in the keys file.
36 The key file uses the same comment conventions
37 as the configuration file.
38 Key entries use a fixed format of the form
44 is a positive integer,
46 is a single character which defines the key format,
53 may be given in one of four different formats,
57 The four key types, and corresponding formats,
61 The key is a 64-bit hexadecimal number in the format
62 specified in the DES specification;
63 that is, the high order seven bits of each octet are used
64 to form the 56-bit key
65 while the low order bit of each octet is given a value
66 such that odd parity is maintained for the octet.
67 Leading zeroes must be specified
68 (i.e., the key must be exactly 16 hex digits long)
69 and odd parity must be maintained.
70 Hence a zero key, in standard format, would be given as
71 .Ql 0101010101010101 .
73 The key is a 64-bit hexadecimal number in the format
74 specified in the NTP standard.
75 This is the same as the DES format,
76 except the bits in each octet have been rotated one bit right
77 so that the parity bit is now the high order bit of the octet.
78 Leading zeroes must be specified and odd parity must be maintained.
79 A zero key in NTP format would be specified as
80 .Ql 8080808080808080 .
82 The key is a 1-to-8 character ASCII string.
83 A key is formed from this by using the low order 7 bits
84 of each ASCII character in the string,
85 with zeroes added on the right
86 when necessary to form a full width 56-bit key,
87 in the same way that encryption keys are formed from
91 The key is a 1-to-8 character ASCII string,
92 using the MD5 authentication scheme.
93 Note that both the keys and the authentication schemes (DES or MD5)
94 must be identical between a set of peers sharing the same key number.
97 Note that the keys used by the
101 programs are checked against passwords
102 requested by the programs and entered by hand,
103 so it is generally appropriate to specify these keys in ASCII format.
105 .Bl -tag -width /etc/ntp.drift -compact
107 the default name of the configuration file
116 has gotten rather fat.
117 While not huge, it has gotten larger than might
118 be desirable for an elevated-priority daemon running on a workstation,
119 particularly since many of the fancy features which consume the space
120 were designed more with a busy primary server, rather than a high
121 stratum workstation, in mind.