1275970Scy.de1 NOP
2275970Scy.  it 1 an-trap
3275970Scy.  if \\n[.$] \,\\$*\/
4275970Scy..
5275970Scy.ie t \
6275970Scy.ds B-Font [CB]
7275970Scy.ds I-Font [CI]
8275970Scy.ds R-Font [CR]
9275970Scy.el \
10275970Scy.ds B-Font B
11275970Scy.ds I-Font I
12275970Scy.ds R-Font R
13362716Scy.TH ntp-keygen @NTP_KEYGEN_MS@ "23 Jun 2020" "ntp (4.2.8p15)" "User Commands"
14275970Scy.\"
15344884Scy.\" EDIT THIS FILE WITH CAUTION (in-mem file)
16275970Scy.\"
17362716Scy.\" It has been AutoGen-ed June 23, 2020 at 02:21:08 AM by AutoGen 5.18.5
18275970Scy.\" From the definitions ntp-keygen-opts.def
19275970Scy.\" and the template file agman-cmd.tpl
20275970Scy.SH NAME
21275970Scy\f\*[B-Font]ntp-keygen\fP
22275970Scy\- Create a NTP host key
23275970Scy.SH SYNOPSIS
24275970Scy\f\*[B-Font]ntp-keygen\fP
25275970Scy.\" Mixture of short (flag) options and long options
26275970Scy[\f\*[B-Font]\-flags\f[]]
27275970Scy[\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
28275970Scy[\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
29275970Scy.sp \n(Ppu
30275970Scy.ne 2
31275970Scy
32275970ScyAll arguments must be options.
33275970Scy.sp \n(Ppu
34275970Scy.ne 2
35275970Scy
36275970Scy.SH DESCRIPTION
37275970ScyThis program generates cryptographic data files used by the NTPv4
38275970Scyauthentication and identification schemes.
39330106SdelphijIt can generate message digest keys used in symmetric key cryptography and,
40330106Sdelphijif the OpenSSL software library has been installed, it can generate host keys,
41330106Sdelphijsigning keys, certificates, and identity keys and parameters used in Autokey
42330106Sdelphijpublic key cryptography.
43275970ScyThese files are used for cookie encryption,
44330106Sdelphijdigital signature, and challenge/response identification algorithms
45275970Scycompatible with the Internet standard security infrastructure.
46275970Scy.sp \n(Ppu
47275970Scy.ne 2
48275970Scy
49330106SdelphijThe message digest symmetric keys file is generated in a format
50330106Sdelphijcompatible with NTPv3.
51330106SdelphijAll other files are in PEM-encoded printable ASCII format,
52330106Sdelphijso they can be embedded as MIME attachments in email to other sites
53275970Scyand certificate authorities.
54275970ScyBy default, files are not encrypted.
55275970Scy.sp \n(Ppu
56275970Scy.ne 2
57275970Scy
58330106SdelphijWhen used to generate message digest symmetric keys, the program
59330106Sdelphijproduces a file containing ten pseudo-random printable ASCII strings
60330106Sdelphijsuitable for the MD5 message digest algorithm included in the
61330106Sdelphijdistribution.
62275970ScyIf the OpenSSL library is installed, it produces an additional ten
63330106Sdelphijhex-encoded random bit strings suitable for SHA1, AES-128-CMAC, and
64330106Sdelphijother message digest algorithms.
65330106SdelphijThe message digest symmetric keys file must be distributed and stored
66275970Scyusing secure means beyond the scope of NTP itself.
67275970ScyBesides the keys used for ordinary NTP associations, additional keys
68275970Scycan be defined as passwords for the
69285169Scy\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
70275970Scyand
71285169Scy\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
72275970Scyutility programs.
73275970Scy.sp \n(Ppu
74275970Scy.ne 2
75275970Scy
76275970ScyThe remaining generated files are compatible with other OpenSSL
77275970Scyapplications and other Public Key Infrastructure (PKI) resources.
78275970ScyCertificates generated by this program are compatible with extant
79275970Scyindustry practice, although some users might find the interpretation of
80275970ScyX509v3 extension fields somewhat liberal.
81275970ScyHowever, the identity keys are probably not compatible with anything
82275970Scyother than Autokey.
83275970Scy.sp \n(Ppu
84275970Scy.ne 2
85275970Scy
86275970ScySome files used by this program are encrypted using a private password.
87275970ScyThe
88275970Scy\f\*[B-Font]\-p\f[]
89330106Sdelphijoption specifies the read password for local encrypted files and the
90275970Scy\f\*[B-Font]\-q\f[]
91330106Sdelphijoption the write password for encrypted files sent to remote sites.
92275970ScyIf no password is specified, the host name returned by the Unix
93330106Sdelphij\fChostname\f[]\fR(1)\f[]
94330106Sdelphijcommand, normally the DNS name of the host, is used as the the default read
95330106Sdelphijpassword, for convenience.
96330106SdelphijThe
97330106Sdelphij\f\*[B-Font]ntp-keygen\fP
98330106Sdelphijprogram prompts for the password if it reads an encrypted file
99330106Sdelphijand the password is missing or incorrect.
100330106SdelphijIf an encrypted file is read successfully and
101330106Sdelphijno write password is specified, the read password is used
102330106Sdelphijas the write password by default.
103275970Scy.sp \n(Ppu
104275970Scy.ne 2
105275970Scy
106275970ScyThe
107330106Sdelphij\f\*[B-Font]pw\f[]
108275970Scyoption of the
109330106Sdelphij\f\*[B-Font]crypto\f[]
110330106Sdelphij\fCntpd\f[]\fR(@NTPD_MS@)\f[]
111275970Scyconfiguration command specifies the read
112275970Scypassword for previously encrypted local files.
113330106SdelphijThis must match the local read password used by this program.
114275970ScyIf not specified, the host name is used.
115330106SdelphijThus, if files are generated by this program without an explicit password,
116275970Scythey can be read back by
117330106Sdelphij\fCntpd\f[]\fR(@NTPD_MS@)\f[]
118330106Sdelphijwithout specifying an explicit password but only on the same host.
119330106SdelphijIf the write password used for encryption is specified as the host name,
120330106Sdelphijthese files can be read by that host with no explicit password.
121275970Scy.sp \n(Ppu
122275970Scy.ne 2
123275970Scy
124275970ScyNormally, encrypted files for each host are generated by that host and
125275970Scyused only by that host, although exceptions exist as noted later on
126275970Scythis page.
127275970ScyThe symmetric keys file, normally called
128330106Sdelphij\fIntp.keys\f[],
129275970Scyis usually installed in
130275970Scy\fI/etc\f[].
131275970ScyOther files and links are usually installed in
132275970Scy\fI/usr/local/etc\f[],
133275970Scywhich is normally in a shared filesystem in
134275970ScyNFS-mounted networks and cannot be changed by shared clients.
135330106SdelphijIn these cases, NFS clients can specify the files in another
136330106Sdelphijdirectory such as
137330106Sdelphij\fI/etc\f[]
138330106Sdelphijusing the
139330106Sdelphij\f\*[B-Font]keysdir\f[]
140330106Sdelphij\fCntpd\f[]\fR(@NTPD_MS@)\f[]
141330106Sdelphijconfiguration file command.
142275970Scy.sp \n(Ppu
143275970Scy.ne 2
144275970Scy
145275970ScyThis program directs commentary and error messages to the standard
146275970Scyerror stream
147330106Sdelphij\fIstderr\f[]
148275970Scyand remote files to the standard output stream
149330106Sdelphij\fIstdout\f[]
150275970Scywhere they can be piped to other applications or redirected to files.
151275970ScyThe names used for generated files and links all begin with the
152275970Scystring
153330106Sdelphij\fIntpkey\&*\f[]
154275970Scyand include the file type, generating host and filestamp,
155275970Scyas described in the
156330106Sdelphij\fICryptographic Data Files\f[]
157275970Scysection below.
158275970Scy.SS Running the Program
159330106SdelphijThe safest way to run the
160275970Scy\f\*[B-Font]ntp-keygen\fP
161330106Sdelphijprogram is logged in directly as root.
162330106SdelphijThe recommended procedure is change to the
163330106Sdelphij\f\*[I-Font]keys\f[]
164330106Sdelphijdirectory, usually
165275970Scy\fI/usr/local/etc\f[],
166330106Sdelphijthen run the program.
167275970Scy.sp \n(Ppu
168275970Scy.ne 2
169275970Scy
170330106SdelphijTo test and gain experience with Autokey concepts, log in as root and
171330106Sdelphijchange to the
172330106Sdelphij\f\*[I-Font]keys\f[]
173330106Sdelphijdirectory, usually
174330106Sdelphij\fI/usr/local/etc\f[].
175330106SdelphijWhen run for the first time, or if all files with names beginning with
176330106Sdelphij\fIntpkey\&*\f[]
177330106Sdelphijhave been removed, use the
178275970Scy\f\*[B-Font]ntp-keygen\fP
179330106Sdelphijcommand without arguments to generate a default
180330106Sdelphij\f\*[B-Font]RSA\f[]
181330106Sdelphijhost key and matching
182330106Sdelphij\f\*[B-Font]RSA-MD5\f[]
183330106Sdelphijcertificate file with expiration date one year hence,
184275970Scywhich is all that is necessary in many cases.
185275970ScyThe program also generates soft links from the generic names
186275970Scyto the respective files.
187330106SdelphijIf run again without options, the program uses the
188330106Sdelphijexisting keys and parameters and generates a new certificate file with
189330106Sdelphijnew expiration date one year hence, and soft link.
190275970Scy.sp \n(Ppu
191275970Scy.ne 2
192275970Scy
193330106SdelphijThe host key is used to encrypt the cookie when required and so must be
194330106Sdelphij\f\*[B-Font]RSA\f[]
195330106Sdelphijtype.
196275970ScyBy default, the host key is also the sign key used to encrypt signatures.
197275970ScyWhen necessary, a different sign key can be specified and this can be
198330106Sdelphijeither
199330106Sdelphij\f\*[B-Font]RSA\f[]
200330106Sdelphijor
201330106Sdelphij\f\*[B-Font]DSA\f[]
202330106Sdelphijtype.
203330106SdelphijBy default, the message digest type is
204330106Sdelphij\f\*[B-Font]MD5\f[],
205330106Sdelphijbut any combination
206275970Scyof sign key type and message digest type supported by the OpenSSL library
207330106Sdelphijcan be specified, including those using the
208330106Sdelphij\f\*[B-Font]AES128CMAC\f[], \f\*[B-Font]MD2\f[], \f\*[B-Font]MD5\f[], \f\*[B-Font]MDC2\f[], \f\*[B-Font]SHA\f[], \f\*[B-Font]SHA1\f[]
209330106Sdelphijand
210330106Sdelphij\f\*[B-Font]RIPE160\f[]
211330106Sdelphijmessage digest algorithms.
212275970ScyHowever, the scheme specified in the certificate must be compatible
213275970Scywith the sign key.
214330106SdelphijCertificates using any digest algorithm are compatible with
215330106Sdelphij\f\*[B-Font]RSA\f[]
216330106Sdelphijsign keys;
217330106Sdelphijhowever, only
218330106Sdelphij\f\*[B-Font]SHA\f[]
219330106Sdelphijand
220330106Sdelphij\f\*[B-Font]SHA1\f[]
221330106Sdelphijcertificates are compatible with
222330106Sdelphij\f\*[B-Font]DSA\f[]
223330106Sdelphijsign keys.
224275970Scy.sp \n(Ppu
225275970Scy.ne 2
226275970Scy
227275970ScyPrivate/public key files and certificates are compatible with
228275970Scyother OpenSSL applications and very likely other libraries as well.
229275970ScyCertificates or certificate requests derived from them should be compatible
230275970Scywith extant industry practice, although some users might find
231275970Scythe interpretation of X509v3 extension fields somewhat liberal.
232275970ScyHowever, the identification parameter files, although encoded
233275970Scyas the other files, are probably not compatible with anything other than Autokey.
234275970Scy.sp \n(Ppu
235275970Scy.ne 2
236275970Scy
237275970ScyRunning the program as other than root and using the Unix
238330106Sdelphij\fCsu\f[]\fR(1)\f[]
239275970Scycommand
240275970Scyto assume root may not work properly, since by default the OpenSSL library
241275970Scylooks for the random seed file
242330106Sdelphij\fI.rnd\f[]
243275970Scyin the user home directory.
244275970ScyHowever, there should be only one
245330106Sdelphij\fI.rnd\f[],
246275970Scymost conveniently
247275970Scyin the root directory, so it is convenient to define the
248330106SdelphijRANDFILE
249275970Scyenvironment variable used by the OpenSSL library as the path to
250330106Sdelphij\fI.rnd\f[].
251275970Scy.sp \n(Ppu
252275970Scy.ne 2
253275970Scy
254275970ScyInstalling the keys as root might not work in NFS-mounted
255275970Scyshared file systems, as NFS clients may not be able to write
256275970Scyto the shared keys directory, even as root.
257275970ScyIn this case, NFS clients can specify the files in another
258275970Scydirectory such as
259275970Scy\fI/etc\f[]
260275970Scyusing the
261275970Scy\f\*[B-Font]keysdir\f[]
262330106Sdelphij\fCntpd\f[]\fR(@NTPD_MS@)\f[]
263330106Sdelphijconfiguration file command.
264275970ScyThere is no need for one client to read the keys and certificates
265275970Scyof other clients or servers, as these data are obtained automatically
266275970Scyby the Autokey protocol.
267275970Scy.sp \n(Ppu
268275970Scy.ne 2
269275970Scy
270275970ScyOrdinarily, cryptographic files are generated by the host that uses them,
271275970Scybut it is possible for a trusted agent (TA) to generate these files
272275970Scyfor other hosts; however, in such cases files should always be encrypted.
273275970ScyThe subject name and trusted name default to the hostname
274275970Scyof the host generating the files, but can be changed by command line options.
275275970ScyIt is convenient to designate the owner name and trusted name
276275970Scyas the subject and issuer fields, respectively, of the certificate.
277275970ScyThe owner name is also used for the host and sign key files,
278275970Scywhile the trusted name is used for the identity files.
279275970Scy.sp \n(Ppu
280275970Scy.ne 2
281275970Scy
282275970ScyAll files are installed by default in the keys directory
283275970Scy\fI/usr/local/etc\f[],
284275970Scywhich is normally in a shared filesystem
285275970Scyin NFS-mounted networks.
286275970ScyThe actual location of the keys directory
287275970Scyand each file can be overridden by configuration commands,
288275970Scybut this is not recommended.
289275970ScyNormally, the files for each host are generated by that host
290275970Scyand used only by that host, although exceptions exist
291275970Scyas noted later on this page.
292275970Scy.sp \n(Ppu
293275970Scy.ne 2
294275970Scy
295275970ScyNormally, files containing private values,
296275970Scyincluding the host key, sign key and identification parameters,
297275970Scyare permitted root read/write-only;
298275970Scywhile others containing public values are permitted world readable.
299275970ScyAlternatively, files containing private values can be encrypted
300275970Scyand these files permitted world readable,
301275970Scywhich simplifies maintenance in shared file systems.
302330106SdelphijSince uniqueness is insured by the
303330106Sdelphij\f\*[I-Font]hostname\f[]
304330106Sdelphijand
305330106Sdelphij\f\*[I-Font]filestamp\f[]
306330106Sdelphijfile name extensions, the files for an NTP server and
307275970Scydependent clients can all be installed in the same shared directory.
308275970Scy.sp \n(Ppu
309275970Scy.ne 2
310275970Scy
311275970ScyThe recommended practice is to keep the file name extensions
312275970Scywhen installing a file and to install a soft link
313275970Scyfrom the generic names specified elsewhere on this page
314275970Scyto the generated files.
315275970ScyThis allows new file generations to be activated simply
316275970Scyby changing the link.
317330106SdelphijIf a link is present,
318330106Sdelphij\fCntpd\f[]\fR(@NTPD_MS@)\f[]
319330106Sdelphijfollows it to the file name to extract the
320330106Sdelphij\f\*[I-Font]filestamp\f[].
321275970ScyIf a link is not present,
322285169Scy\fCntpd\f[]\fR(@NTPD_MS@)\f[]
323330106Sdelphijextracts the
324330106Sdelphij\f\*[I-Font]filestamp\f[]
325330106Sdelphijfrom the file itself.
326275970ScyThis allows clients to verify that the file and generation times
327275970Scyare always current.
328275970ScyThe
329275970Scy\f\*[B-Font]ntp-keygen\fP
330330106Sdelphijprogram uses the same
331330106Sdelphij\f\*[I-Font]filestamp\f[]
332330106Sdelphijextension for all files generated
333275970Scyat one time, so each generation is distinct and can be readily
334275970Scyrecognized in monitoring data.
335275970Scy.sp \n(Ppu
336275970Scy.ne 2
337275970Scy
338330106SdelphijRun the command on as many hosts as necessary.
339330106SdelphijDesignate one of them as the trusted host (TH) using
340330106Sdelphij\f\*[B-Font]ntp-keygen\fP
341330106Sdelphijwith the
342330106Sdelphij\f\*[B-Font]\-T\f[]
343330106Sdelphijoption and configure it to synchronize from reliable Internet servers.
344330106SdelphijThen configure the other hosts to synchronize to the TH directly or
345330106Sdelphijindirectly.
346330106SdelphijA certificate trail is created when Autokey asks the immediately
347330106Sdelphijascendant host towards the TH to sign its certificate, which is then
348330106Sdelphijprovided to the immediately descendant host on request.
349330106SdelphijAll group hosts should have acyclic certificate trails ending on the TH.
350275970Scy.sp \n(Ppu
351275970Scy.ne 2
352275970Scy
353330106SdelphijThe host key is used to encrypt the cookie when required and so must be
354330106SdelphijRSA type.
355330106SdelphijBy default, the host key is also the sign key used to encrypt
356330106Sdelphijsignatures.
357330106SdelphijA different sign key can be assigned using the
358330106Sdelphij\f\*[B-Font]\-S\f[]
359330106Sdelphijoption and this can be either
360330106Sdelphij\f\*[B-Font]RSA\f[]
361330106Sdelphijor
362330106Sdelphij\f\*[B-Font]DSA\f[]
363330106Sdelphijtype.
364330106SdelphijBy default, the signature
365330106Sdelphijmessage digest type is
366330106Sdelphij\f\*[B-Font]MD5\f[],
367330106Sdelphijbut any combination of sign key type and
368330106Sdelphijmessage digest type supported by the OpenSSL library can be specified
369330106Sdelphijusing the
370330106Sdelphij\f\*[B-Font]\-c\f[]
371330106Sdelphijoption.
372275970Scy.sp \n(Ppu
373275970Scy.ne 2
374275970Scy
375330106SdelphijThe rules say cryptographic media should be generated with proventic
376330106Sdelphijfilestamps, which means the host should already be synchronized before
377330106Sdelphijthis program is run.
378330106SdelphijThis of course creates a chicken-and-egg problem
379330106Sdelphijwhen the host is started for the first time.
380330106SdelphijAccordingly, the host time
381330106Sdelphijshould be set by some other means, such as eyeball-and-wristwatch, at
382330106Sdelphijleast so that the certificate lifetime is within the current year.
383330106SdelphijAfter that and when the host is synchronized to a proventic source, the
384330106Sdelphijcertificate should be re-generated.
385275970Scy.sp \n(Ppu
386275970Scy.ne 2
387275970Scy
388330106SdelphijAdditional information on trusted groups and identity schemes is on the
389330106Sdelphij\*[Lq]Autokey Public-Key Authentication\*[Rq]
390330106Sdelphijpage.
391275970Scy.sp \n(Ppu
392275970Scy.ne 2
393275970Scy
394330106SdelphijFile names begin with the prefix
395330106Sdelphij\fIntpkey\f[]_
396330106Sdelphijand end with the suffix
397330106Sdelphij\fI_\f[]\f\*[I-Font]hostname\f[]. \f\*[I-Font]filestamp\f[],
398330106Sdelphijwhere
399330106Sdelphij\f\*[I-Font]hostname\f[]
400330106Sdelphijis the owner name, usually the string returned
401330106Sdelphijby the Unix
402330106Sdelphij\fChostname\f[]\fR(1)\f[]
403330106Sdelphijcommand, and
404330106Sdelphij\f\*[I-Font]filestamp\f[]
405330106Sdelphijis the NTP seconds when the file was generated, in decimal digits.
406330106SdelphijThis both guarantees uniqueness and simplifies maintenance
407330106Sdelphijprocedures, since all files can be quickly removed
408330106Sdelphijby a
409330106Sdelphij\f\*[B-Font]rm\f[] \fIntpkey\&*\f[]
410330106Sdelphijcommand or all files generated
411330106Sdelphijat a specific time can be removed by a
412330106Sdelphij\f\*[B-Font]rm\f[] \fI\&*\f[]\f\*[I-Font]filestamp\f[]
413330106Sdelphijcommand.
414330106SdelphijTo further reduce the risk of misconfiguration,
415330106Sdelphijthe first two lines of a file contain the file name
416330106Sdelphijand generation date and time as comments.
417330106Sdelphij.SS Trusted Hosts and Groups
418275970ScyEach cryptographic configuration involves selection of a signature scheme
419275970Scyand identification scheme, called a cryptotype,
420275970Scyas explained in the
421275970Scy\fIAuthentication\f[] \fIOptions\f[]
422275970Scysection of
423285169Scy\fCntp.conf\f[]\fR(5)\f[].
424330106SdelphijThe default cryptotype uses
425330106Sdelphij\f\*[B-Font]RSA\f[]
426330106Sdelphijencryption,
427330106Sdelphij\f\*[B-Font]MD5\f[]
428330106Sdelphijmessage digest
429330106Sdelphijand
430330106Sdelphij\f\*[B-Font]TC\f[]
431330106Sdelphijidentification.
432275970ScyFirst, configure a NTP subnet including one or more low-stratum
433275970Scytrusted hosts from which all other hosts derive synchronization
434275970Scydirectly or indirectly.
435275970ScyTrusted hosts have trusted certificates;
436275970Scyall other hosts have nontrusted certificates.
437275970ScyThese hosts will automatically and dynamically build authoritative
438275970Scycertificate trails to one or more trusted hosts.
439275970ScyA trusted group is the set of all hosts that have, directly or indirectly,
440275970Scya certificate trail ending at a trusted host.
441275970ScyThe trail is defined by static configuration file entries
442275970Scyor dynamic means described on the
443275970Scy\fIAutomatic\f[] \fINTP\f[] \fIConfiguration\f[] \fIOptions\f[]
444275970Scysection of
445285169Scy\fCntp.conf\f[]\fR(5)\f[].
446275970Scy.sp \n(Ppu
447275970Scy.ne 2
448275970Scy
449275970ScyOn each trusted host as root, change to the keys directory.
450275970ScyTo insure a fresh fileset, remove all
451330106Sdelphij\fIntpkey\f[]
452275970Scyfiles.
453275970ScyThen run
454275970Scy\f\*[B-Font]ntp-keygen\fP
455275970Scy\f\*[B-Font]\-T\f[]
456275970Scyto generate keys and a trusted certificate.
457275970ScyOn all other hosts do the same, but leave off the
458275970Scy\f\*[B-Font]\-T\f[]
459275970Scyflag to generate keys and nontrusted certificates.
460275970ScyWhen complete, start the NTP daemons beginning at the lowest stratum
461275970Scyand working up the tree.
462275970ScyIt may take some time for Autokey to instantiate the certificate trails
463275970Scythroughout the subnet, but setting up the environment is completely automatic.
464275970Scy.sp \n(Ppu
465275970Scy.ne 2
466275970Scy
467275970ScyIf it is necessary to use a different sign key or different digest/signature
468275970Scyscheme than the default, run
469275970Scy\f\*[B-Font]ntp-keygen\fP
470275970Scywith the
471275970Scy\f\*[B-Font]\-S\f[] \f\*[I-Font]type\f[]
472275970Scyoption, where
473275970Scy\f\*[I-Font]type\f[]
474275970Scyis either
475275970Scy\f\*[B-Font]RSA\f[]
476275970Scyor
477275970Scy\f\*[B-Font]DSA\f[].
478330106SdelphijThe most frequent need to do this is when a
479330106Sdelphij\f\*[B-Font]DSA\f[]\-signed
480330106Sdelphijcertificate is used.
481275970ScyIf it is necessary to use a different certificate scheme than the default,
482275970Scyrun
483275970Scy\f\*[B-Font]ntp-keygen\fP
484275970Scywith the
485275970Scy\f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[]
486275970Scyoption and selected
487275970Scy\f\*[I-Font]scheme\f[]
488275970Scyas needed.
489330106SdelphijIf
490275970Scy\f\*[B-Font]ntp-keygen\fP
491275970Scyis run again without these options, it generates a new certificate
492330106Sdelphijusing the same scheme and sign key, and soft link.
493275970Scy.sp \n(Ppu
494275970Scy.ne 2
495275970Scy
496275970ScyAfter setting up the environment it is advisable to update certificates
497275970Scyfrom time to time, if only to extend the validity interval.
498275970ScySimply run
499275970Scy\f\*[B-Font]ntp-keygen\fP
500275970Scywith the same flags as before to generate new certificates
501330106Sdelphijusing existing keys, and soft links.
502275970ScyHowever, if the host or sign key is changed,
503285169Scy\fCntpd\f[]\fR(@NTPD_MS@)\f[]
504275970Scyshould be restarted.
505275970ScyWhen
506285169Scy\fCntpd\f[]\fR(@NTPD_MS@)\f[]
507275970Scyis restarted, it loads any new files and restarts the protocol.
508275970ScyOther dependent hosts will continue as usual until signatures are refreshed,
509275970Scyat which time the protocol is restarted.
510275970Scy.SS Identity Schemes
511275970ScyAs mentioned on the Autonomous Authentication page,
512330106Sdelphijthe default
513330106Sdelphij\f\*[B-Font]TC\f[]
514330106Sdelphijidentity scheme is vulnerable to a middleman attack.
515275970ScyHowever, there are more secure identity schemes available,
516330106Sdelphijincluding
517330106Sdelphij\f\*[B-Font]PC\f[], \f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[]
518330106Sdelphijand
519330106Sdelphij\f\*[B-Font]MV\f[]
520330106Sdelphijschemes described below.
521275970ScyThese schemes are based on a TA, one or more trusted hosts
522275970Scyand some number of nontrusted hosts.
523275970ScyTrusted hosts prove identity using values provided by the TA,
524275970Scywhile the remaining hosts prove identity using values provided
525275970Scyby a trusted host and certificate trails that end on that host.
526275970ScyThe name of a trusted host is also the name of its sugroup
527275970Scyand also the subject and issuer name on its trusted certificate.
528275970ScyThe TA is not necessarily a trusted host in this sense, but often is.
529275970Scy.sp \n(Ppu
530275970Scy.ne 2
531275970Scy
532275970ScyIn some schemes there are separate keys for servers and clients.
533275970ScyA server can also be a client of another server,
534275970Scybut a client can never be a server for another client.
535275970ScyIn general, trusted hosts and nontrusted hosts that operate
536275970Scyas both server and client have parameter files that contain
537275970Scyboth server and client keys.
538275970ScyHosts that operate
539275970Scyonly as clients have key files that contain only client keys.
540275970Scy.sp \n(Ppu
541275970Scy.ne 2
542275970Scy
543275970ScyThe PC scheme supports only one trusted host in the group.
544275970ScyOn trusted host alice run
545275970Scy\f\*[B-Font]ntp-keygen\fP
546275970Scy\f\*[B-Font]\-P\f[]
547275970Scy\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
548275970Scyto generate the host key file
549330106Sdelphij\fIntpkey\f[]_ \f\*[B-Font]RSA\f[] \fIkey_alice.\f[] \f\*[I-Font]filestamp\f[]
550275970Scyand trusted private certificate file
551330106Sdelphij\fIntpkey\f[]_ \f\*[B-Font]RSA-MD5\f[] \f\*[B-Font]_\f[] \fIcert_alice.\f[] \f\*[I-Font]filestamp\f[],
552330106Sdelphijand soft links.
553275970ScyCopy both files to all group hosts;
554275970Scythey replace the files which would be generated in other schemes.
555330106SdelphijOn each host
556330106Sdelphij\f\*[I-Font]bob\f[]
557330106Sdelphijinstall a soft link from the generic name
558275970Scy\fIntpkey_host_\f[]\f\*[I-Font]bob\f[]
559275970Scyto the host key file and soft link
560275970Scy\fIntpkey_cert_\f[]\f\*[I-Font]bob\f[]
561275970Scyto the private certificate file.
562275970ScyNote the generic links are on bob, but point to files generated
563275970Scyby trusted host alice.
564275970ScyIn this scheme it is not possible to refresh
565275970Scyeither the keys or certificates without copying them
566330106Sdelphijto all other hosts in the group, and recreating the soft links.
567275970Scy.sp \n(Ppu
568275970Scy.ne 2
569275970Scy
570330106SdelphijFor the
571330106Sdelphij\f\*[B-Font]IFF\f[]
572330106Sdelphijscheme proceed as in the
573330106Sdelphij\f\*[B-Font]TC\f[]
574330106Sdelphijscheme to generate keys
575275970Scyand certificates for all group hosts, then for every trusted host in the group,
576330106Sdelphijgenerate the
577330106Sdelphij\f\*[B-Font]IFF\f[]
578330106Sdelphijparameter file.
579275970ScyOn trusted host alice run
580275970Scy\f\*[B-Font]ntp-keygen\fP
581275970Scy\f\*[B-Font]\-T\f[]
582275970Scy\f\*[B-Font]\-I\f[]
583275970Scy\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
584275970Scyto produce her parameter file
585330106Sdelphij\fIntpkey_IFFpar_alice.\f[]\f\*[I-Font]filestamp\f[],
586275970Scywhich includes both server and client keys.
587275970ScyCopy this file to all group hosts that operate as both servers
588275970Scyand clients and install a soft link from the generic
589330106Sdelphij\fIntpkey_iff_alice\f[]
590275970Scyto this file.
591275970ScyIf there are no hosts restricted to operate only as clients,
592275970Scythere is nothing further to do.
593330106SdelphijAs the
594330106Sdelphij\f\*[B-Font]IFF\f[]
595330106Sdelphijscheme is independent
596275970Scyof keys and certificates, these files can be refreshed as needed.
597275970Scy.sp \n(Ppu
598275970Scy.ne 2
599275970Scy
600275970ScyIf a rogue client has the parameter file, it could masquerade
601275970Scyas a legitimate server and present a middleman threat.
602275970ScyTo eliminate this threat, the client keys can be extracted
603275970Scyfrom the parameter file and distributed to all restricted clients.
604275970ScyAfter generating the parameter file, on alice run
605275970Scy\f\*[B-Font]ntp-keygen\fP
606275970Scy\f\*[B-Font]\-e\f[]
607330106Sdelphijand pipe the output to a file or email program.
608330106SdelphijCopy or email this file to all restricted clients.
609275970ScyOn these clients install a soft link from the generic
610330106Sdelphij\fIntpkey_iff_alice\f[]
611275970Scyto this file.
612275970ScyTo further protect the integrity of the keys,
613275970Scyeach file can be encrypted with a secret password.
614275970Scy.sp \n(Ppu
615275970Scy.ne 2
616275970Scy
617330106SdelphijFor the
618330106Sdelphij\f\*[B-Font]GQ\f[]
619330106Sdelphijscheme proceed as in the
620330106Sdelphij\f\*[B-Font]TC\f[]
621330106Sdelphijscheme to generate keys
622275970Scyand certificates for all group hosts, then for every trusted host
623330106Sdelphijin the group, generate the
624330106Sdelphij\f\*[B-Font]IFF\f[]
625330106Sdelphijparameter file.
626275970ScyOn trusted host alice run
627275970Scy\f\*[B-Font]ntp-keygen\fP
628275970Scy\f\*[B-Font]\-T\f[]
629275970Scy\f\*[B-Font]\-G\f[]
630275970Scy\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[]
631275970Scyto produce her parameter file
632330106Sdelphij\fIntpkey_GQpar_alice.\f[]\f\*[I-Font]filestamp\f[],
633275970Scywhich includes both server and client keys.
634275970ScyCopy this file to all group hosts and install a soft link
635275970Scyfrom the generic
636330106Sdelphij\fIntpkey_gq_alice\f[]
637275970Scyto this file.
638330106SdelphijIn addition, on each host
639330106Sdelphij\f\*[I-Font]bob\f[]
640330106Sdelphijinstall a soft link
641275970Scyfrom generic
642275970Scy\fIntpkey_gq_\f[]\f\*[I-Font]bob\f[]
643275970Scyto this file.
644330106SdelphijAs the
645330106Sdelphij\f\*[B-Font]GQ\f[]
646330106Sdelphijscheme updates the
647330106Sdelphij\f\*[B-Font]GQ\f[]
648330106Sdelphijparameters file and certificate
649275970Scyat the same time, keys and certificates can be regenerated as needed.
650275970Scy.sp \n(Ppu
651275970Scy.ne 2
652275970Scy
653330106SdelphijFor the
654330106Sdelphij\f\*[B-Font]MV\f[]
655330106Sdelphijscheme, proceed as in the
656330106Sdelphij\f\*[B-Font]TC\f[]
657330106Sdelphijscheme to generate keys
658275970Scyand certificates for all group hosts.
659275970ScyFor illustration assume trish is the TA, alice one of several trusted hosts
660275970Scyand bob one of her clients.
661275970ScyOn TA trish run
662275970Scy\f\*[B-Font]ntp-keygen\fP
663275970Scy\f\*[B-Font]\-V\f[] \f\*[I-Font]n\f[]
664275970Scy\f\*[B-Font]\-p\f[] \f\*[I-Font]password\f[],
665275970Scywhere
666275970Scy\f\*[I-Font]n\f[]
667275970Scyis the number of revokable keys (typically 5) to produce
668275970Scythe parameter file
669330106Sdelphij\fIntpkeys_MVpar_trish.\f[]\f\*[I-Font]filestamp\f[]
670275970Scyand client key files
671330106Sdelphij\fIntpkeys_MVkey\f[]\f\*[I-Font]d\f[] \f\*[I-Font]_\f[] \fItrish.\f[] \f\*[I-Font]filestamp\f[]
672275970Scywhere
673275970Scy\f\*[I-Font]d\f[]
674275970Scyis the key number (0 \&<
675275970Scy\f\*[I-Font]d\f[]
676275970Scy\&<
677275970Scy\f\*[I-Font]n\f[]).
678275970ScyCopy the parameter file to alice and install a soft link
679275970Scyfrom the generic
680330106Sdelphij\fIntpkey_mv_alice\f[]
681275970Scyto this file.
682275970ScyCopy one of the client key files to alice for later distribution
683275970Scyto her clients.
684330106SdelphijIt does not matter which client key file goes to alice,
685275970Scysince they all work the same way.
686330106SdelphijAlice copies the client key file to all of her clients.
687275970ScyOn client bob install a soft link from generic
688330106Sdelphij\fIntpkey_mvkey_bob\f[]
689275970Scyto the client key file.
690330106SdelphijAs the
691330106Sdelphij\f\*[B-Font]MV\f[]
692330106Sdelphijscheme is independent of keys and certificates,
693275970Scythese files can be refreshed as needed.
694275970Scy.SS Command Line Options
695275970Scy.TP 7
696330106Sdelphij.NOP \f\*[B-Font]\-b\f[] \f\*[B-Font]\-\-imbits\f[]= \f\*[I-Font]modulus\f[]
697330106SdelphijSet the number of bits in the identity modulus for generating identity keys to
698330106Sdelphij\f\*[I-Font]modulus\f[]
699330106Sdelphijbits.
700330106SdelphijThe number of bits in the identity modulus defaults to 256, but can be set to
701330106Sdelphijvalues from 256 to 2048 (32 to 256 octets).
702330106SdelphijUse the larger moduli with caution, as this can consume considerable computing
703330106Sdelphijresources and increases the size of authenticated packets.
704330106Sdelphij.TP 7
705330106Sdelphij.NOP \f\*[B-Font]\-c\f[] \f\*[B-Font]\-\-certificate\f[]= \f\*[I-Font]scheme\f[]
706330106SdelphijSelect certificate signature encryption/message digest scheme.
707275970ScyThe
708275970Scy\f\*[I-Font]scheme\f[]
709275970Scycan be one of the following:
710330106Sdelphij\f\*[B-Font]RSA-MD2\f[], \f\*[B-Font]RSA-MD5\f[], \f\*[B-Font]RSA-MDC2\f[], \f\*[B-Font]RSA-SHA\f[], \f\*[B-Font]RSA-SHA1\f[], \f\*[B-Font]RSA-RIPEMD160\f[], \f\*[B-Font]DSA-SHA\f[],
711275970Scyor
712275970Scy\f\*[B-Font]DSA-SHA1\f[].
713330106SdelphijNote that
714330106Sdelphij\f\*[B-Font]RSA\f[]
715330106Sdelphijschemes must be used with an
716330106Sdelphij\f\*[B-Font]RSA\f[]
717330106Sdelphijsign key and
718330106Sdelphij\f\*[B-Font]DSA\f[]
719330106Sdelphijschemes must be used with a
720330106Sdelphij\f\*[B-Font]DSA\f[]
721330106Sdelphijsign key.
722275970ScyThe default without this option is
723275970Scy\f\*[B-Font]RSA-MD5\f[].
724330106SdelphijIf compatibility with FIPS 140-2 is required, either the
725330106Sdelphij\f\*[B-Font]DSA-SHA\f[]
726330106Sdelphijor
727330106Sdelphij\f\*[B-Font]DSA-SHA1\f[]
728330106Sdelphijscheme must be used.
729275970Scy.TP 7
730330106Sdelphij.NOP \f\*[B-Font]\-C\f[] \f\*[B-Font]\-\-cipher\f[]= \f\*[I-Font]cipher\f[]
731330106SdelphijSelect the OpenSSL cipher to encrypt the files containing private keys.
732330106SdelphijThe default without this option is three-key triple DES in CBC mode,
733330106Sdelphij\f\*[B-Font]des-ede3-cbc\f[].
734330106SdelphijThe
735330106Sdelphij\f\*[B-Font]openssl\f[] \f\*[B-Font]\-h\f[]
736330106Sdelphijcommand provided with OpenSSL displays available ciphers.
737330106Sdelphij.TP 7
738330106Sdelphij.NOP \f\*[B-Font]\-d\f[] \f\*[B-Font]\-\-debug-level\f[]
739330106SdelphijIncrease debugging verbosity level.
740275970ScyThis option displays the cryptographic data produced in eye-friendly billboards.
741275970Scy.TP 7
742330106Sdelphij.NOP \f\*[B-Font]\-D\f[] \f\*[B-Font]\-\-set-debug-level\f[]= \f\*[I-Font]level\f[]
743330106SdelphijSet the debugging verbosity to
744330106Sdelphij\f\*[I-Font]level\f[].
745330106SdelphijThis option displays the cryptographic data produced in eye-friendly billboards.
746275970Scy.TP 7
747330106Sdelphij.NOP \f\*[B-Font]\-e\f[] \f\*[B-Font]\-\-id-key\f[]
748330106SdelphijWrite the
749330106Sdelphij\f\*[B-Font]IFF\f[]
750330106Sdelphijor
751330106Sdelphij\f\*[B-Font]GQ\f[]
752330106Sdelphijpublic parameters from the
753330106Sdelphij\f\*[I-Font]IFFkey\f[] \f\*[I-Font]or\f[] \f\*[I-Font]GQkey\f[]
754330106Sdelphijclient keys file previously specified
755330106Sdelphijas unencrypted data to the standard output stream
756330106Sdelphij\fIstdout\f[].
757330106SdelphijThis is intended for automatic key distribution by email.
758275970Scy.TP 7
759330106Sdelphij.NOP \f\*[B-Font]\-G\f[] \f\*[B-Font]\-\-gq-params\f[]
760330106SdelphijGenerate a new encrypted
761330106Sdelphij\f\*[B-Font]GQ\f[]
762330106Sdelphijparameters and key file for the Guillou-Quisquater (GQ) identity scheme.
763330106SdelphijThis option is mutually exclusive with the
764330106Sdelphij\f\*[B-Font]\-I\f[]
765330106Sdelphijand
766330106Sdelphij\f\*[B-Font]\-V\f[]
767330106Sdelphijoptions.
768275970Scy.TP 7
769330106Sdelphij.NOP \f\*[B-Font]\-H\f[] \f\*[B-Font]\-\-host-key\f[]
770330106SdelphijGenerate a new encrypted
771330106Sdelphij\f\*[B-Font]RSA\f[]
772330106Sdelphijpublic/private host key file.
773275970Scy.TP 7
774330106Sdelphij.NOP \f\*[B-Font]\-I\f[] \f\*[B-Font]\-\-iffkey\f[]
775330106SdelphijGenerate a new encrypted
776330106Sdelphij\f\*[B-Font]IFF\f[]
777330106Sdelphijkey file for the Schnorr (IFF) identity scheme.
778330106SdelphijThis option is mutually exclusive with the
779330106Sdelphij\f\*[B-Font]\-G\f[]
780330106Sdelphijand
781330106SdelphijFl V
782330106Sdelphijoptions.
783275970Scy.TP 7
784330106Sdelphij.NOP \f\*[B-Font]\-i\f[] \f\*[B-Font]\-\-ident\f[]= \f\*[I-Font]group\f[]
785330106SdelphijSet the optional Autokey group name to
786330106Sdelphij\f\*[I-Font]group\f[].
787330106SdelphijThis is used in the identity scheme parameter file names of
788330106Sdelphij\f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[],
789330106Sdelphijand
790330106Sdelphij\f\*[B-Font]MV\f[]
791330106Sdelphijclient parameters files.
792330106SdelphijIn that role, the default is the host name if no group is provided.
793330106SdelphijThe group name, if specified using
794330106Sdelphij\f\*[B-Font]\-i\f[]
795330106Sdelphijor
796330106Sdelphij\f\*[B-Font]\-s\f[]
797330106Sdelphijfollowing an
798330106Sdelphij\[oq]@@\[cq]
799330106Sdelphijcharacter, is also used in certificate subject and issuer names in the form
800330106Sdelphij\f\*[I-Font]host\f[] \f\*[I-Font]@@\f[] \f\*[I-Font]group\f[]
801330106Sdelphijand should match the group specified via
802330106Sdelphij\f\*[B-Font]crypto\f[] \f\*[B-Font]ident\f[]
803330106Sdelphijor
804330106Sdelphij\f\*[B-Font]server\f[] \f\*[B-Font]ident\f[]
805330106Sdelphijin the ntpd configuration file.
806275970Scy.TP 7
807330106Sdelphij.NOP \f\*[B-Font]\-l\f[] \f\*[B-Font]\-\-lifetime\f[]= \f\*[I-Font]days\f[]
808330106SdelphijSet the lifetime for certificate expiration to
809330106Sdelphij\f\*[I-Font]days\f[].
810330106SdelphijThe default lifetime is one year (365 days).
811275970Scy.TP 7
812330106Sdelphij.NOP \f\*[B-Font]\-m\f[] \f\*[B-Font]\-\-modulus\f[]= \f\*[I-Font]bits\f[]
813330106SdelphijSet the number of bits in the prime modulus for generating files to
814330106Sdelphij\f\*[I-Font]bits\f[].
815330106SdelphijThe modulus defaults to 512, but can be set from 256 to 2048 (32 to 256 octets).
816330106SdelphijUse the larger moduli with caution, as this can consume considerable computing
817330106Sdelphijresources and increases the size of authenticated packets.
818330106Sdelphij.TP 7
819330106Sdelphij.NOP \f\*[B-Font]\-M\f[] \f\*[B-Font]\-\-md5key\f[]
820330106SdelphijGenerate a new symmetric keys file containing 10
821330106Sdelphij\f\*[B-Font]MD5\f[]
822330106Sdelphijkeys, and if OpenSSL is available, 10
823330106Sdelphij\f\*[B-Font]SHA\f[]
824330106Sdelphijkeys.
825330106SdelphijAn
826330106Sdelphij\f\*[B-Font]MD5\f[]
827330106Sdelphijkey is a string of 20 random printable ASCII characters, while a
828330106Sdelphij\f\*[B-Font]SHA\f[]
829330106Sdelphijkey is a string of 40 random hex digits.
830330106SdelphijThe file can be edited using a text editor to change the key type or key content.
831330106SdelphijThis option is mutually exclusive with all other options.
832330106Sdelphij.TP 7
833330106Sdelphij.NOP \f\*[B-Font]\-p\f[] \f\*[B-Font]\-\-password\f[]= \f\*[I-Font]passwd\f[]
834330106SdelphijSet the password for reading and writing encrypted files to
835330106Sdelphij\f\*[I-Font]passwd\f[].
836330106SdelphijThese include the host, sign and identify key files.
837330106SdelphijBy default, the password is the string returned by the Unix
838330106Sdelphij\f\*[B-Font]hostname\f[]
839330106Sdelphijcommand.
840330106Sdelphij.TP 7
841330106Sdelphij.NOP \f\*[B-Font]\-P\f[] \f\*[B-Font]\-\-pvt-cert\f[]
842330106SdelphijGenerate a new private certificate used by the
843330106Sdelphij\f\*[B-Font]PC\f[]
844330106Sdelphijidentity scheme.
845275970ScyBy default, the program generates public certificates.
846330106SdelphijNote: the PC identity scheme is not recommended for new installations.
847275970Scy.TP 7
848330106Sdelphij.NOP \f\*[B-Font]\-q\f[] \f\*[B-Font]\-\-export-passwd\f[]= \f\*[I-Font]passwd\f[]
849330106SdelphijSet the password for writing encrypted
850330106Sdelphij\f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[] \f\*[B-Font]and\f[] \f\*[B-Font]MV\f[]
851330106Sdelphijidentity files redirected to
852330106Sdelphij\fIstdout\f[]
853330106Sdelphijto
854330106Sdelphij\f\*[I-Font]passwd\f[].
855330106SdelphijIn effect, these files are decrypted with the
856330106Sdelphij\f\*[B-Font]\-p\f[]
857330106Sdelphijpassword, then encrypted with the
858330106Sdelphij\f\*[B-Font]\-q\f[]
859330106Sdelphijpassword.
860330106SdelphijBy default, the password is the string returned by the Unix
861330106Sdelphij\f\*[B-Font]hostname\f[]
862330106Sdelphijcommand.
863275970Scy.TP 7
864330106Sdelphij.NOP \f\*[B-Font]\-s\f[] \f\*[B-Font]\-\-subject-key\f[]= [host] [@@ \f\*[I-Font]group\f[]]
865330106SdelphijSpecify the Autokey host name, where
866330106Sdelphij\f\*[I-Font]host\f[]
867330106Sdelphijis the optional host name and
868330106Sdelphij\f\*[I-Font]group\f[]
869330106Sdelphijis the optional group name.
870330106SdelphijThe host name, and if provided, group name are used in
871330106Sdelphij\f\*[I-Font]host\f[] \f\*[I-Font]@@\f[] \f\*[I-Font]group\f[]
872330106Sdelphijform as certificate subject and issuer.
873330106SdelphijSpecifying
874330106Sdelphij\f\*[B-Font]\-s\f[] \f\*[B-Font]\-@@\f[] \f\*[I-Font]group\f[]
875330106Sdelphijis allowed, and results in leaving the host name unchanged, as with
876330106Sdelphij\f\*[B-Font]\-i\f[] \f\*[I-Font]group\f[].
877330106SdelphijThe group name, or if no group is provided, the host name are also used in the
878330106Sdelphijfile names of
879330106Sdelphij\f\*[B-Font]IFF\f[], \f\*[B-Font]GQ\f[],
880330106Sdelphijand
881330106Sdelphij\f\*[B-Font]MV\f[]
882330106Sdelphijidentity scheme client parameter files.
883330106SdelphijIf
884330106Sdelphij\f\*[I-Font]host\f[]
885330106Sdelphijis not specified, the default host name is the string returned by the Unix
886330106Sdelphij\f\*[B-Font]hostname\f[]
887330106Sdelphijcommand.
888275970Scy.TP 7
889330106Sdelphij.NOP \f\*[B-Font]\-S\f[] \f\*[B-Font]\-\-sign-key\f[]= [\f\*[B-Font]RSA\f[] | \f\*[B-Font]DSA\f[]]
890330106SdelphijGenerate a new encrypted public/private sign key file of the specified type.
891330106SdelphijBy default, the sign key is the host key and has the same type.
892330106SdelphijIf compatibility with FIPS 140-2 is required, the sign key type must be
893330106Sdelphij\f\*[B-Font]DSA\f[].
894275970Scy.TP 7
895330106Sdelphij.NOP \f\*[B-Font]\-T\f[] \f\*[B-Font]\-\-trusted-cert\f[]
896275970ScyGenerate a trusted certificate.
897275970ScyBy default, the program generates a non-trusted certificate.
898275970Scy.TP 7
899330106Sdelphij.NOP \f\*[B-Font]\-V\f[] \f\*[B-Font]\-\-mv-params\f[] \f\*[I-Font]nkeys\f[]
900330106SdelphijGenerate
901330106Sdelphij\f\*[I-Font]nkeys\f[]
902330106Sdelphijencrypted server keys and parameters for the Mu-Varadharajan (MV)
903330106Sdelphijidentity scheme.
904330106SdelphijThis option is mutually exclusive with the
905330106Sdelphij\f\*[B-Font]\-I\f[]
906330106Sdelphijand
907330106Sdelphij\f\*[B-Font]\-G\f[]
908330106Sdelphijoptions.
909330106SdelphijNote: support for this option should be considered a work in progress.
910275970Scy.PP
911275970Scy.SS Random Seed File
912275970ScyAll cryptographically sound key generation schemes must have means
913275970Scyto randomize the entropy seed used to initialize
914275970Scythe internal pseudo-random number generator used
915275970Scyby the library routines.
916275970ScyThe OpenSSL library uses a designated random seed file for this purpose.
917275970ScyThe file must be available when starting the NTP daemon and
918275970Scy\f\*[B-Font]ntp-keygen\fP
919275970Scyprogram.
920275970ScyIf a site supports OpenSSL or its companion OpenSSH,
921275970Scyit is very likely that means to do this are already available.
922275970Scy.sp \n(Ppu
923275970Scy.ne 2
924275970Scy
925275970ScyIt is important to understand that entropy must be evolved
926275970Scyfor each generation, for otherwise the random number sequence
927275970Scywould be predictable.
928275970ScyVarious means dependent on external events, such as keystroke intervals,
929275970Scycan be used to do this and some systems have built-in entropy sources.
930275970ScySuitable means are described in the OpenSSL software documentation,
931275970Scybut are outside the scope of this page.
932275970Scy.sp \n(Ppu
933275970Scy.ne 2
934275970Scy
935275970ScyThe entropy seed used by the OpenSSL library is contained in a file,
936275970Scyusually called
937330106Sdelphij\fI.rnd\f[],
938275970Scywhich must be available when starting the NTP daemon
939275970Scyor the
940275970Scy\f\*[B-Font]ntp-keygen\fP
941275970Scyprogram.
942275970ScyThe NTP daemon will first look for the file
943275970Scyusing the path specified by the
944275970Scy\f\*[B-Font]randfile\f[]
945275970Scysubcommand of the
946275970Scy\f\*[B-Font]crypto\f[]
947275970Scyconfiguration command.
948275970ScyIf not specified in this way, or when starting the
949275970Scy\f\*[B-Font]ntp-keygen\fP
950275970Scyprogram,
951275970Scythe OpenSSL library will look for the file using the path specified
952275970Scyby the
953275970ScyRANDFILE
954275970Scyenvironment variable in the user home directory,
955275970Scywhether root or some other user.
956275970ScyIf the
957275970ScyRANDFILE
958275970Scyenvironment variable is not present,
959275970Scythe library will look for the
960330106Sdelphij\fI.rnd\f[]
961275970Scyfile in the user home directory.
962330106SdelphijSince both the
963330106Sdelphij\f\*[B-Font]ntp-keygen\fP
964330106Sdelphijprogram and
965330106Sdelphij\fCntpd\f[]\fR(@NTPD_MS@)\f[]
966330106Sdelphijdaemon must run as root, the logical place to put this file is in
967330106Sdelphij\fI/.rnd\f[]
968330106Sdelphijor
969330106Sdelphij\fI/root/.rnd\f[].
970275970ScyIf the file is not available or cannot be written,
971275970Scythe daemon exits with a message to the system log and the program
972275970Scyexits with a suitable error message.
973275970Scy.SS Cryptographic Data Files
974330106SdelphijAll file formats begin with two nonencrypted lines.
975330106SdelphijThe first line contains the file name, including the generated host name
976330106Sdelphijand filestamp, in the format
977330106Sdelphij\fIntpkey_\f[]\f\*[I-Font]key\f[] \f\*[I-Font]_\f[] \f\*[I-Font]name\f[]. \f\*[I-Font]filestamp\f[],
978330106Sdelphijwhere
979330106Sdelphij\f\*[I-Font]key\f[]
980330106Sdelphijis the key or parameter type,
981330106Sdelphij\f\*[I-Font]name\f[]
982330106Sdelphijis the host or group name and
983330106Sdelphij\f\*[I-Font]filestamp\f[]
984330106Sdelphijis the filestamp (NTP seconds) when the file was created.
985330106SdelphijBy convention,
986330106Sdelphij\f\*[I-Font]key\f[]
987330106Sdelphijnames in generated file names include both upper and lower case
988330106Sdelphijcharacters, while
989330106Sdelphij\f\*[I-Font]key\f[]
990330106Sdelphijnames in generated link names include only lower case characters.
991330106SdelphijThe filestamp is not used in generated link names.
992330106SdelphijThe second line contains the datestamp in conventional Unix
993330106Sdelphij\fIdate\f[]
994330106Sdelphijformat.
995330106SdelphijLines beginning with
996330106Sdelphij\[oq]#\[cq]
997330106Sdelphijare considered comments and ignored by the
998275970Scy\f\*[B-Font]ntp-keygen\fP
999275970Scyprogram and
1000285169Scy\fCntpd\f[]\fR(@NTPD_MS@)\f[]
1001275970Scydaemon.
1002275970Scy.sp \n(Ppu
1003275970Scy.ne 2
1004275970Scy
1005330106SdelphijThe remainder of the file contains cryptographic data, encoded first using ASN.1
1006330106Sdelphijrules, then encrypted if necessary, and finally written in PEM-encoded
1007330106Sdelphijprintable ASCII text, preceded and followed by MIME content identifier lines.
1008330106Sdelphij.sp \n(Ppu
1009330106Sdelphij.ne 2
1010330106Sdelphij
1011330106SdelphijThe format of the symmetric keys file, ordinarily named
1012330106Sdelphij\fIntp.keys\f[],
1013330106Sdelphijis somewhat different than the other files in the interest of backward compatibility.
1014330106SdelphijOrdinarily, the file is generated by this program, but it can be constructed
1015330106Sdelphijand edited using an ordinary text editor.
1016330106Sdelphij.br
1017275970Scy.in +4
1018330106Sdelphij.nf
1019330106Sdelphij# ntpkey_MD5key_bk.ntp.org.3595864945
1020330106Sdelphij# Thu Dec 12 19:22:25 2013
1021330106Sdelphij1  MD5 L";Nw<\`.I<f4U0)247"i  # MD5 key
1022330106Sdelphij2  MD5 &>l0%XXK9O'51VwV<xq~  # MD5 key
1023330106Sdelphij3  MD5 lb4zLW~d^!K:]RsD'qb6  # MD5 key
1024330106Sdelphij4  MD5 Yue:tL[+vR)M\`n~bY,'?  # MD5 key
1025330106Sdelphij5  MD5 B;fx'Kgr/&4ZTbL6=RxA  # MD5 key
1026330106Sdelphij6  MD5 4eYwa\`o}3i@@@@V@@..R9!l  # MD5 key
1027330106Sdelphij7  MD5 \`A.([h+;wTQ|xfi%Sn_!  # MD5 key
1028330106Sdelphij8  MD5 45:V,r4]l6y^JH6"Sh?F  # MD5 key
1029330106Sdelphij9  MD5 3-5vcn*6l29DS?Xdsg)*  # MD5 key
1030330106Sdelphij10 MD5 2late4Me              # MD5 key
1031330106Sdelphij11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c  # SHA1 key
1032330106Sdelphij12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74  # SHA1 key
1033330106Sdelphij13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9  # SHA1 key
1034330106Sdelphij14 SHA  a5332809c8878dd3a5b918819108a111509aeceb  # SHA  key
1035330106Sdelphij15 MD2  2fe16c88c760ff2f16d4267e36c1aa6c926e6964  # MD2  key
1036330106Sdelphij16 MD4  b2691811dc19cfc0e2f9bcacd74213f29812183d  # MD4  key
1037330106Sdelphij17 MD5  e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c  # MD5  key
1038330106Sdelphij18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc  # MDC2 key
1039330106Sdelphij19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2  # RIPEMD160 key
1040330106Sdelphij20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878  # AES128CMAC key
1041330106Sdelphij.in -4
1042330106Sdelphij.fi
1043330106Sdelphij.in +4
1044330106SdelphijFigure 1. Typical Symmetric Key File
1045330106Sdelphij.in -4
1046330106Sdelphij.sp \n(Ppu
1047330106Sdelphij.ne 2
1048330106Sdelphij
1049330106SdelphijFigure 1 shows a typical symmetric keys file used by the reference
1050330106Sdelphijimplementation.
1051330106SdelphijFollowing the header the keys are entered one per line in the format
1052330106Sdelphij.in +4
1053275970Scy\f\*[I-Font]keyno\f[] \f\*[I-Font]type\f[] \f\*[I-Font]key\f[]
1054275970Scy.in -4
1055275970Scywhere
1056275970Scy\f\*[I-Font]keyno\f[]
1057338530Sdelphijis a positive integer in the range 1-65535;
1058275970Scy\f\*[I-Font]type\f[]
1059330106Sdelphijis the key type for the message digest algorithm, which in the absence of the
1060330106SdelphijOpenSSL library must be
1061330106Sdelphij\f\*[B-Font]MD5\f[]
1062330106Sdelphijto designate the MD5 message digest algorithm;
1063330106Sdelphijif the OpenSSL library is installed, the key type can be any
1064330106Sdelphijmessage digest algorithm supported by that library;
1065330106Sdelphijhowever, if compatibility with FIPS 140-2 is required,
1066330106Sdelphijthe key type must be either
1067330106Sdelphij\f\*[B-Font]SHA\f[]
1068330106Sdelphijor
1069330106Sdelphij\f\*[B-Font]SHA1\f[];
1070275970Scy\f\*[I-Font]key\f[]
1071275970Scyis the key itself,
1072330106Sdelphijwhich is a printable ASCII string 20 characters or less in length:
1073330106Sdelphijeach character is chosen from the 93 printable characters
1074330106Sdelphijin the range 0x21 through 0x7e (
1075330106Sdelphij\[oq]\[cq]!
1076330106Sdelphijthrough
1077330106Sdelphij\[oq]~\[cq]
1078330106Sdelphij\&) excluding space and the
1079275970Scy\[oq]#\[cq]
1080330106Sdelphijcharacter, and terminated by whitespace or a
1081330106Sdelphij\[oq]#\[cq]
1082275970Scycharacter.
1083330106SdelphijAn OpenSSL key consists of a hex-encoded ASCII string of 40 characters, which
1084330106Sdelphijis truncated as necessary.
1085275970Scy.sp \n(Ppu
1086275970Scy.ne 2
1087275970Scy
1088275970ScyNote that the keys used by the
1089285169Scy\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
1090275970Scyand
1091285169Scy\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
1092275970Scyprograms
1093275970Scyare checked against passwords requested by the programs
1094275970Scyand entered by hand, so it is generally appropriate to specify these keys
1095275970Scyin human readable ASCII format.
1096275970Scy.sp \n(Ppu
1097275970Scy.ne 2
1098275970Scy
1099275970ScyThe
1100275970Scy\f\*[B-Font]ntp-keygen\fP
1101330106Sdelphijprogram generates a symmetric keys file
1102330106Sdelphij\fIntpkey_MD5key_\f[]\f\*[I-Font]hostname\f[]. \f\*[I-Font]filestamp\f[].
1103275970ScySince the file contains private shared keys,
1104275970Scyit should be visible only to root and distributed by secure means
1105275970Scyto other subnet hosts.
1106275970ScyThe NTP daemon loads the file
1107275970Scy\fIntp.keys\f[],
1108275970Scyso
1109275970Scy\f\*[B-Font]ntp-keygen\fP
1110275970Scyinstalls a soft link from this name to the generated file.
1111275970ScySubsequently, similar soft links must be installed by manual
1112275970Scyor automated means on the other subnet hosts.
1113275970ScyWhile this file is not used with the Autokey Version 2 protocol,
1114275970Scyit is needed to authenticate some remote configuration commands
1115275970Scyused by the
1116285169Scy\fCntpq\f[]\fR(@NTPQ_MS@)\f[]
1117275970Scyand
1118285169Scy\fCntpdc\f[]\fR(@NTPDC_MS@)\f[]
1119275970Scyutilities.
1120275970Scy.SH "OPTIONS"
1121275970Scy.TP
1122275970Scy.NOP \f\*[B-Font]\-b\f[] \f\*[I-Font]imbits\f[], \f\*[B-Font]\-\-imbits\f[]=\f\*[I-Font]imbits\f[]
1123275970Scyidentity modulus bits.
1124275970ScyThis option takes an integer number as its argument.
1125275970ScyThe value of
1126275970Scy\f\*[I-Font]imbits\f[]
1127275970Scyis constrained to being:
1128275970Scy.in +4
1129275970Scy.nf
1130275970Scy.na
1131275970Scyin the range  256 through 2048
1132275970Scy.fi
1133275970Scy.in -4
1134275970Scy.sp
1135275970ScyThe number of bits in the identity modulus.  The default is 256.
1136275970Scy.TP
1137275970Scy.NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]scheme\f[], \f\*[B-Font]\-\-certificate\f[]=\f\*[I-Font]scheme\f[]
1138275970Scycertificate scheme.
1139275970Scy.sp
1140275970Scyscheme is one of
1141330106SdelphijRSA-MD2, RSA-MD5, RSA-MDC2, RSA-SHA, RSA-SHA1, RSA-RIPEMD160,
1142275970ScyDSA-SHA, or DSA-SHA1.
1143275970Scy.sp
1144330106SdelphijSelect the certificate signature encryption/message digest scheme.
1145275970ScyNote that RSA schemes must be used with a RSA sign key and DSA
1146275970Scyschemes must be used with a DSA sign key.  The default without
1147275970Scythis option is RSA-MD5.
1148275970Scy.TP
1149275970Scy.NOP \f\*[B-Font]\-C\f[] \f\*[I-Font]cipher\f[], \f\*[B-Font]\-\-cipher\f[]=\f\*[I-Font]cipher\f[]
1150275970Scyprivatekey cipher.
1151275970Scy.sp
1152275970ScySelect the cipher which is used to encrypt the files containing
1153275970Scyprivate keys.  The default is three-key triple DES in CBC mode,
1154330106Sdelphijequivalent to "\fB-C des-ede3-cbc\fP".  The openssl tool lists ciphers
1155275970Scyavailable in "\fBopenssl \-h\fP" output.
1156275970Scy.TP
1157275970Scy.NOP \f\*[B-Font]\-d\f[], \f\*[B-Font]\-\-debug\-level\f[]
1158275970ScyIncrease debug verbosity level.
1159275970ScyThis option may appear an unlimited number of times.
1160275970Scy.sp
1161275970Scy.TP
1162275970Scy.NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-set\-debug\-level\f[]=\f\*[I-Font]number\f[]
1163275970ScySet the debug verbosity level.
1164275970ScyThis option may appear an unlimited number of times.
1165275970ScyThis option takes an integer number as its argument.
1166275970Scy.sp
1167275970Scy.TP
1168275970Scy.NOP \f\*[B-Font]\-e\f[], \f\*[B-Font]\-\-id\-key\f[]
1169275970ScyWrite IFF or GQ identity keys.
1170275970Scy.sp
1171330106SdelphijWrite the public parameters from the IFF or GQ client keys to
1172330106Sdelphijthe standard output.
1173330106SdelphijThis is intended for automatic key distribution by email.
1174275970Scy.TP
1175275970Scy.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-gq\-params\f[]
1176275970ScyGenerate GQ parameters and keys.
1177275970Scy.sp
1178275970ScyGenerate parameters and keys for the GQ identification scheme,
1179275970Scyobsoleting any that may exist.
1180275970Scy.TP
1181275970Scy.NOP \f\*[B-Font]\-H\f[], \f\*[B-Font]\-\-host\-key\f[]
1182275970Scygenerate RSA host key.
1183275970Scy.sp
1184275970ScyGenerate new host keys, obsoleting any that may exist.
1185275970Scy.TP
1186275970Scy.NOP \f\*[B-Font]\-I\f[], \f\*[B-Font]\-\-iffkey\f[]
1187275970Scygenerate IFF parameters.
1188275970Scy.sp
1189275970ScyGenerate parameters for the IFF identification scheme, obsoleting
1190275970Scyany that may exist.
1191275970Scy.TP
1192275970Scy.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]group\f[], \f\*[B-Font]\-\-ident\f[]=\f\*[I-Font]group\f[]
1193275970Scyset Autokey group name.
1194275970Scy.sp
1195275970ScySet the optional Autokey group name to name.  This is used in
1196275970Scythe file name of IFF, GQ, and MV client parameters files.  In
1197275970Scythat role, the default is the host name if this option is not
1198275970Scyprovided.  The group name, if specified using \fB-i/--ident\fP or
1199330106Sdelphijusing \fB-s/--subject-name\fP following an '\fB@@\fP' character,
1200330106Sdelphijis also a part of the self-signed host certificate subject and
1201330106Sdelphijissuer names in the form \fBhost@@group\fP and should match the
1202330106Sdelphij'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in the
1203330106Sdelphij\fBntpd\fP configuration file.
1204275970Scy.TP
1205275970Scy.NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]lifetime\f[], \f\*[B-Font]\-\-lifetime\f[]=\f\*[I-Font]lifetime\f[]
1206275970Scyset certificate lifetime.
1207275970ScyThis option takes an integer number as its argument.
1208275970Scy.sp
1209275970ScySet the certificate expiration to lifetime days from now.
1210275970Scy.TP
1211275970Scy.NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]modulus\f[], \f\*[B-Font]\-\-modulus\f[]=\f\*[I-Font]modulus\f[]
1212330106Sdelphijprime modulus.
1213275970ScyThis option takes an integer number as its argument.
1214275970ScyThe value of
1215275970Scy\f\*[I-Font]modulus\f[]
1216275970Scyis constrained to being:
1217275970Scy.in +4
1218275970Scy.nf
1219275970Scy.na
1220275970Scyin the range  256 through 2048
1221275970Scy.fi
1222275970Scy.in -4
1223275970Scy.sp
1224275970ScyThe number of bits in the prime modulus.  The default is 512.
1225275970Scy.TP
1226330106Sdelphij.NOP \f\*[B-Font]\-M\f[], \f\*[B-Font]\-\-md5key\f[]
1227330106Sdelphijgenerate symmetric keys.
1228330106Sdelphij.sp
1229330106SdelphijGenerate symmetric keys, obsoleting any that may exist.
1230330106Sdelphij.TP
1231275970Scy.NOP \f\*[B-Font]\-P\f[], \f\*[B-Font]\-\-pvt\-cert\f[]
1232275970Scygenerate PC private certificate.
1233275970Scy.sp
1234275970ScyGenerate a private certificate.  By default, the program generates
1235275970Scypublic certificates.
1236275970Scy.TP
1237275970Scy.NOP \f\*[B-Font]\-p\f[] \f\*[I-Font]passwd\f[], \f\*[B-Font]\-\-password\f[]=\f\*[I-Font]passwd\f[]
1238275970Scylocal private password.
1239275970Scy.sp
1240275970ScyLocal files containing private data are encrypted with the
1241275970ScyDES-CBC algorithm and the specified password.  The same password
1242275970Scymust be specified to the local ntpd via the "crypto pw password"
1243275970Scyconfiguration command.  The default password is the local
1244275970Scyhostname.
1245275970Scy.TP
1246275970Scy.NOP \f\*[B-Font]\-q\f[] \f\*[I-Font]passwd\f[], \f\*[B-Font]\-\-export\-passwd\f[]=\f\*[I-Font]passwd\f[]
1247275970Scyexport IFF or GQ group keys with password.
1248275970Scy.sp
1249275970ScyExport IFF or GQ identity group keys to the standard output,
1250275970Scyencrypted with the DES-CBC algorithm and the specified password.
1251275970ScyThe same password must be specified to the remote ntpd via the
1252275970Scy"crypto pw password" configuration command.  See also the option
1253275970Scy--id-key (-e) for unencrypted exports.
1254275970Scy.TP
1255275970Scy.NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]host@group\f[], \f\*[B-Font]\-\-subject\-name\f[]=\f\*[I-Font]host@group\f[]
1256275970Scyset host and optionally group name.
1257275970Scy.sp
1258275970ScySet the Autokey host name, and optionally, group name specified
1259330106Sdelphijfollowing an '\fB@@\fP' character.  The host name is used in the file
1260275970Scyname of generated host and signing certificates, without the
1261275970Scygroup name.  The host name, and if provided, group name are used
1262330106Sdelphijin \fBhost@@group\fP form for the host certificate subject and issuer
1263330106Sdelphijfields.  Specifying '\fB-s @@group\fP' is allowed, and results in
1264330106Sdelphijleaving the host name unchanged while appending \fB@@group\fP to the
1265275970Scysubject and issuer fields, as with \fB-i group\fP.  The group name, or
1266275970Scyif not provided, the host name are also used in the file names
1267275970Scyof IFF, GQ, and MV client parameter files.
1268275970Scy.TP
1269330106Sdelphij.NOP \f\*[B-Font]\-S\f[] \f\*[I-Font]sign\f[], \f\*[B-Font]\-\-sign\-key\f[]=\f\*[I-Font]sign\f[]
1270330106Sdelphijgenerate sign key (RSA or DSA).
1271330106Sdelphij.sp
1272330106SdelphijGenerate a new sign key of the designated type, obsoleting any
1273330106Sdelphijthat may exist.  By default, the program uses the host key as the
1274330106Sdelphijsign key.
1275330106Sdelphij.TP
1276275970Scy.NOP \f\*[B-Font]\-T\f[], \f\*[B-Font]\-\-trusted\-cert\f[]
1277275970Scytrusted certificate (TC scheme).
1278275970Scy.sp
1279275970ScyGenerate a trusted certificate.  By default, the program generates
1280275970Scya non-trusted certificate.
1281275970Scy.TP
1282275970Scy.NOP \f\*[B-Font]\-V\f[] \f\*[I-Font]num\f[], \f\*[B-Font]\-\-mv\-params\f[]=\f\*[I-Font]num\f[]
1283275970Scygenerate <num> MV parameters.
1284275970ScyThis option takes an integer number as its argument.
1285275970Scy.sp
1286275970ScyGenerate parameters and keys for the Mu-Varadharajan (MV)
1287275970Scyidentification scheme.
1288275970Scy.TP
1289275970Scy.NOP \f\*[B-Font]\-v\f[] \f\*[I-Font]num\f[], \f\*[B-Font]\-\-mv\-keys\f[]=\f\*[I-Font]num\f[]
1290275970Scyupdate <num> MV keys.
1291275970ScyThis option takes an integer number as its argument.
1292275970Scy.sp
1293275970ScyThis option has not been fully documented.
1294275970Scy.TP
1295275970Scy.NOP \f\*[B-Font]\-\&?\f[], \f\*[B-Font]\-\-help\f[]
1296275970ScyDisplay usage information and exit.
1297275970Scy.TP
1298275970Scy.NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
1299275970ScyPass the extended usage information through a pager.
1300275970Scy.TP
1301275970Scy.NOP \f\*[B-Font]\->\f[] [\f\*[I-Font]cfgfile\f[]], \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
1302275970ScySave the option state to \fIcfgfile\fP.  The default is the \fIlast\fP
1303275970Scyconfiguration file listed in the \fBOPTION PRESETS\fP section, below.
1304275970ScyThe command will exit after updating the config file.
1305275970Scy.TP
1306275970Scy.NOP \f\*[B-Font]\-<\f[] \f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
1307275970ScyLoad options from \fIcfgfile\fP.
1308275970ScyThe \fIno-load-opts\fP form will disable the loading
1309275970Scyof earlier config/rc/ini files.  \fI\-\-no-load-opts\fP is handled early,
1310275970Scyout of order.
1311275970Scy.TP
1312275970Scy.NOP \f\*[B-Font]\-\-version\f[] [{\f\*[I-Font]v|c|n\f[]}]
1313275970ScyOutput version of program and exit.  The default mode is `v', a simple
1314275970Scyversion.  The `c' mode will print copyright information and `n' will
1315275970Scyprint the full copyright notice.
1316275970Scy.PP
1317275970Scy.SH "OPTION PRESETS"
1318275970ScyAny option that is not marked as \fInot presettable\fP may be preset
1319275970Scyby loading values from configuration ("RC" or ".INI") file(s) and values from
1320275970Scyenvironment variables named:
1321275970Scy.nf
1322275970Scy  \fBNTP_KEYGEN_<option-name>\fP or \fBNTP_KEYGEN\fP
1323275970Scy.fi
1324275970Scy.ad
1325275970ScyThe environmental presets take precedence (are processed later than)
1326275970Scythe configuration files.
1327275970ScyThe \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
1328275970ScyIf any of these are directories, then the file \fI.ntprc\fP
1329275970Scyis searched for within those directories.
1330275970Scy.SH USAGE
1331275970Scy.SH "ENVIRONMENT"
1332275970ScySee \fBOPTION PRESETS\fP for configuration environment variables.
1333275970Scy.SH "FILES"
1334275970ScySee \fBOPTION PRESETS\fP for configuration files.
1335275970Scy.SH "EXIT STATUS"
1336275970ScyOne of the following exit values will be returned:
1337275970Scy.TP
1338275970Scy.NOP 0 " (EXIT_SUCCESS)"
1339275970ScySuccessful program execution.
1340275970Scy.TP
1341275970Scy.NOP 1 " (EXIT_FAILURE)"
1342275970ScyThe operation failed or the command syntax was not valid.
1343275970Scy.TP
1344275970Scy.NOP 66 " (EX_NOINPUT)"
1345275970ScyA specified configuration file could not be loaded.
1346275970Scy.TP
1347275970Scy.NOP 70 " (EX_SOFTWARE)"
1348275970Scylibopts had an internal operational error.  Please report
1349275970Scyit to autogen-users@lists.sourceforge.net.  Thank you.
1350275970Scy.PP
1351275970Scy.SH "AUTHORS"
1352280849ScyThe University of Delaware and Network Time Foundation
1353275970Scy.SH "COPYRIGHT"
1354358659ScyCopyright (C) 1992-2020 The University of Delaware and Network Time Foundation all rights reserved.
1355275970ScyThis program is released under the terms of the NTP license, <http://ntp.org/license>.
1356275970Scy.SH BUGS
1357330106SdelphijIt can take quite a while to generate some cryptographic values.
1358275970Scy.sp \n(Ppu
1359275970Scy.ne 2
1360275970Scy
1361275970ScyPlease report bugs to http://bugs.ntp.org .
1362275970Scy.sp \n(Ppu
1363275970Scy.ne 2
1364275970Scy
1365275970ScyPlease send bug reports to: http://bugs.ntp.org, bugs@ntp.org
1366275970Scy.SH NOTES
1367275970ScyPortions of this document came from FreeBSD.
1368275970Scy.sp \n(Ppu
1369275970Scy.ne 2
1370275970Scy
1371275970ScyThis manual page was \fIAutoGen\fP-erated from the \fBntp-keygen\fP
1372275970Scyoption definitions.
1373