ntp-keygen.mdoc.in revision 316068
1316068Sdelphij.Dd March 21 2017
2275970Scy.Dt NTP_KEYGEN @NTP_KEYGEN_MS@ User Commands
3275970Scy.Os
4275970Scy.\"  EDIT THIS FILE WITH CAUTION  (ntp-keygen-opts.mdoc)
5275970Scy.\"
6316068Sdelphij.\"  It has been AutoGen-ed  March 21, 2017 at 10:45:59 AM by AutoGen 5.18.5
7275970Scy.\"  From the definitions    ntp-keygen-opts.def
8275970Scy.\"  and the template file   agmdoc-cmd.tpl
9275970Scy.Sh NAME
10275970Scy.Nm ntp-keygen
11275970Scy.Nd Create a NTP host key
12275970Scy.Sh SYNOPSIS
13275970Scy.Nm
14275970Scy.\" Mixture of short (flag) options and long options
15275970Scy.Op Fl flags
16275970Scy.Op Fl flag Op Ar value
17275970Scy.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc
18275970Scy.Pp
19275970ScyAll arguments must be options.
20275970Scy.Pp
21275970Scy.Sh DESCRIPTION
22275970ScyThis program generates cryptographic data files used by the NTPv4
23275970Scyauthentication and identification schemes.
24275970ScyIt generates MD5 key files used in symmetric key cryptography.
25275970ScyIn addition, if the OpenSSL software library has been installed,
26275970Scyit generates keys, certificate and identity files used in public key
27275970Scycryptography.
28275970ScyThese files are used for cookie encryption,
29275970Scydigital signature and challenge/response identification algorithms
30275970Scycompatible with the Internet standard security infrastructure.
31275970Scy.Pp
32275970ScyAll files are in PEM\-encoded printable ASCII format,
33275970Scyso they can be embedded as MIME attachments in mail to other sites
34275970Scyand certificate authorities.
35275970ScyBy default, files are not encrypted.
36275970Scy.Pp
37275970ScyWhen used to generate message digest keys, the program produces a file
38275970Scycontaining ten pseudo\-random printable ASCII strings suitable for the
39275970ScyMD5 message digest algorithm included in the distribution.
40275970ScyIf the OpenSSL library is installed, it produces an additional ten
41275970Scyhex\-encoded random bit strings suitable for the SHA1 and other message
42275970Scydigest algorithms.
43275970ScyThe message digest keys file must be distributed and stored
44275970Scyusing secure means beyond the scope of NTP itself.
45275970ScyBesides the keys used for ordinary NTP associations, additional keys
46275970Scycan be defined as passwords for the
47275970Scy.Xr ntpq @NTPQ_MS@
48275970Scyand
49275970Scy.Xr ntpdc @NTPDC_MS@
50275970Scyutility programs.
51275970Scy.Pp
52275970ScyThe remaining generated files are compatible with other OpenSSL
53275970Scyapplications and other Public Key Infrastructure (PKI) resources.
54275970ScyCertificates generated by this program are compatible with extant
55275970Scyindustry practice, although some users might find the interpretation of
56275970ScyX509v3 extension fields somewhat liberal.
57275970ScyHowever, the identity keys are probably not compatible with anything
58275970Scyother than Autokey.
59275970Scy.Pp
60275970ScySome files used by this program are encrypted using a private password.
61275970ScyThe
62275970Scy.Fl p
63275970Scyoption specifies the password for local encrypted files and the
64275970Scy.Fl q
65275970Scyoption the password for encrypted files sent to remote sites.
66275970ScyIf no password is specified, the host name returned by the Unix
67275970Scy.Fn gethostname
68275970Scyfunction, normally the DNS name of the host is used.
69275970Scy.Pp
70275970ScyThe
71275970Scy.Ar pw
72275970Scyoption of the
73275970Scy.Ar crypto
74275970Scyconfiguration command specifies the read
75275970Scypassword for previously encrypted local files.
76275970ScyThis must match the local password used by this program.
77275970ScyIf not specified, the host name is used.
78275970ScyThus, if files are generated by this program without password,
79275970Scythey can be read back by
80275970Scy.Ar ntpd
81275970Scywithout password but only on the same host.
82275970Scy.Pp
83275970ScyNormally, encrypted files for each host are generated by that host and
84275970Scyused only by that host, although exceptions exist as noted later on
85275970Scythis page.
86275970ScyThe symmetric keys file, normally called
87275970Scy.Ar ntp.keys ,
88275970Scyis usually installed in
89275970Scy.Pa /etc .
90275970ScyOther files and links are usually installed in
91275970Scy.Pa /usr/local/etc ,
92275970Scywhich is normally in a shared filesystem in
93275970ScyNFS\-mounted networks and cannot be changed by shared clients.
94275970ScyThe location of the keys directory can be changed by the
95275970Scy.Ar keysdir
96275970Scyconfiguration command in such cases.
97275970ScyNormally, this is in
98275970Scy.Pa /etc .
99275970Scy.Pp
100275970ScyThis program directs commentary and error messages to the standard
101275970Scyerror stream
102275970Scy.Ar stderr
103275970Scyand remote files to the standard output stream
104275970Scy.Ar stdout
105275970Scywhere they can be piped to other applications or redirected to files.
106275970ScyThe names used for generated files and links all begin with the
107275970Scystring
108275970Scy.Ar ntpkey
109275970Scyand include the file type, generating host and filestamp,
110275970Scyas described in the
111275970Scy.Dq Cryptographic Data Files
112275970Scysection below.
113275970Scy.Ss Running the Program
114275970ScyTo test and gain experience with Autokey concepts, log in as root and
115275970Scychange to the keys directory, usually
116275970Scy.Pa /usr/local/etc 
117275970ScyWhen run for the first time, or if all files with names beginning with
118275970Scy.Ar ntpkey
119275970Scyhave been removed, use the
120275970Scy.Nm
121275970Scycommand without arguments to generate a
122275970Scydefault RSA host key and matching RSA\-MD5 certificate with expiration
123275970Scydate one year hence.
124275970ScyIf run again without options, the program uses the
125275970Scyexisting keys and parameters and generates only a new certificate with
126275970Scynew expiration date one year hence.
127275970Scy.Pp
128275970ScyRun the command on as many hosts as necessary.
129275970ScyDesignate one of them as the trusted host (TH) using
130275970Scy.Nm
131275970Scywith the
132275970Scy.Fl T
133275970Scyoption and configure it to synchronize from reliable Internet servers.
134275970ScyThen configure the other hosts to synchronize to the TH directly or
135275970Scyindirectly.
136275970ScyA certificate trail is created when Autokey asks the immediately
137275970Scyascendant host towards the TH to sign its certificate, which is then
138275970Scyprovided to the immediately descendant host on request.
139275970ScyAll group hosts should have acyclic certificate trails ending on the TH.
140275970Scy.Pp
141275970ScyThe host key is used to encrypt the cookie when required and so must be
142275970ScyRSA type.
143275970ScyBy default, the host key is also the sign key used to encrypt
144275970Scysignatures.
145275970ScyA different sign key can be assigned using the
146275970Scy.Fl S
147275970Scyoption and this can be either RSA or DSA type.
148275970ScyBy default, the signature
149275970Scymessage digest type is MD5, but any combination of sign key type and
150275970Scymessage digest type supported by the OpenSSL library can be specified
151275970Scyusing the
152275970Scy.Fl c
153275970Scyoption.
154275970ScyThe rules say cryptographic media should be generated with proventic
155275970Scyfilestamps, which means the host should already be synchronized before
156275970Scythis program is run.
157275970ScyThis of course creates a chicken\-and\-egg problem
158275970Scywhen the host is started for the first time.
159275970ScyAccordingly, the host time
160275970Scyshould be set by some other means, such as eyeball\-and\-wristwatch, at
161275970Scyleast so that the certificate lifetime is within the current year.
162275970ScyAfter that and when the host is synchronized to a proventic source, the
163275970Scycertificate should be re\-generated.
164275970Scy.Pp
165275970ScyAdditional information on trusted groups and identity schemes is on the
166275970Scy.Dq Autokey Public\-Key Authentication
167275970Scypage.
168275970Scy.Pp
169275970ScyThe
170275970Scy.Xr ntpd @NTPD_MS@
171275970Scyconfiguration command
172275970Scy.Ic crypto pw Ar password
173275970Scyspecifies the read password for previously encrypted files.
174275970ScyThe daemon expires on the spot if the password is missing
175275970Scyor incorrect.
176275970ScyFor convenience, if a file has been previously encrypted,
177275970Scythe default read password is the name of the host running
178275970Scythe program.
179275970ScyIf the previous write password is specified as the host name,
180275970Scythese files can be read by that host with no explicit password.
181275970Scy.Pp
182275970ScyFile names begin with the prefix
183275970Scy.Cm ntpkey_
184275970Scyand end with the postfix
185275970Scy.Ar _hostname.filestamp ,
186275970Scywhere
187275970Scy.Ar hostname
188275970Scyis the owner name, usually the string returned
189275970Scyby the Unix gethostname() routine, and
190275970Scy.Ar filestamp
191275970Scyis the NTP seconds when the file was generated, in decimal digits.
192275970ScyThis both guarantees uniqueness and simplifies maintenance
193275970Scyprocedures, since all files can be quickly removed
194275970Scyby a
195275970Scy.Ic rm ntpkey\&*
196275970Scycommand or all files generated
197275970Scyat a specific time can be removed by a
198275970Scy.Ic rm
199275970Scy.Ar \&*filestamp
200275970Scycommand.
201275970ScyTo further reduce the risk of misconfiguration,
202275970Scythe first two lines of a file contain the file name
203275970Scyand generation date and time as comments.
204275970Scy.Pp
205275970ScyAll files are installed by default in the keys directory
206275970Scy.Pa /usr/local/etc ,
207275970Scywhich is normally in a shared filesystem
208275970Scyin NFS\-mounted networks.
209275970ScyThe actual location of the keys directory
210275970Scyand each file can be overridden by configuration commands,
211275970Scybut this is not recommended.
212275970ScyNormally, the files for each host are generated by that host
213275970Scyand used only by that host, although exceptions exist
214275970Scyas noted later on this page.
215275970Scy.Pp
216275970ScyNormally, files containing private values,
217275970Scyincluding the host key, sign key and identification parameters,
218275970Scyare permitted root read/write\-only;
219275970Scywhile others containing public values are permitted world readable.
220275970ScyAlternatively, files containing private values can be encrypted
221275970Scyand these files permitted world readable,
222275970Scywhich simplifies maintenance in shared file systems.
223275970ScySince uniqueness is insured by the hostname and
224275970Scyfile name extensions, the files for a NFS server and
225275970Scydependent clients can all be installed in the same shared directory.
226275970Scy.Pp
227275970ScyThe recommended practice is to keep the file name extensions
228275970Scywhen installing a file and to install a soft link
229275970Scyfrom the generic names specified elsewhere on this page
230275970Scyto the generated files.
231275970ScyThis allows new file generations to be activated simply
232275970Scyby changing the link.
233275970ScyIf a link is present, ntpd follows it to the file name
234275970Scyto extract the filestamp.
235275970ScyIf a link is not present,
236275970Scy.Xr ntpd @NTPD_MS@
237275970Scyextracts the filestamp from the file itself.
238275970ScyThis allows clients to verify that the file and generation times
239275970Scyare always current.
240275970ScyThe
241275970Scy.Nm
242275970Scyprogram uses the same timestamp extension for all files generated
243275970Scyat one time, so each generation is distinct and can be readily
244275970Scyrecognized in monitoring data.
245275970Scy.Ss Running the program
246275970ScyThe safest way to run the
247275970Scy.Nm
248275970Scyprogram is logged in directly as root.
249275970ScyThe recommended procedure is change to the keys directory,
250275970Scyusually
251275970Scy.Pa /usr/local/etc ,
252275970Scythen run the program.
253275970ScyWhen run for the first time,
254275970Scyor if all
255275970Scy.Cm ntpkey
256275970Scyfiles have been removed,
257275970Scythe program generates a RSA host key file and matching RSA\-MD5 certificate file,
258275970Scywhich is all that is necessary in many cases.
259275970ScyThe program also generates soft links from the generic names
260275970Scyto the respective files.
261275970ScyIf run again, the program uses the same host key file,
262275970Scybut generates a new certificate file and link.
263275970Scy.Pp
264275970ScyThe host key is used to encrypt the cookie when required and so must be RSA type.
265275970ScyBy default, the host key is also the sign key used to encrypt signatures.
266275970ScyWhen necessary, a different sign key can be specified and this can be
267275970Scyeither RSA or DSA type.
268275970ScyBy default, the message digest type is MD5, but any combination
269275970Scyof sign key type and message digest type supported by the OpenSSL library
270275970Scycan be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
271275970Scyand RIPE160 message digest algorithms.
272275970ScyHowever, the scheme specified in the certificate must be compatible
273275970Scywith the sign key.
274275970ScyCertificates using any digest algorithm are compatible with RSA sign keys;
275275970Scyhowever, only SHA and SHA1 certificates are compatible with DSA sign keys.
276275970Scy.Pp
277275970ScyPrivate/public key files and certificates are compatible with
278275970Scyother OpenSSL applications and very likely other libraries as well.
279275970ScyCertificates or certificate requests derived from them should be compatible
280275970Scywith extant industry practice, although some users might find
281275970Scythe interpretation of X509v3 extension fields somewhat liberal.
282275970ScyHowever, the identification parameter files, although encoded
283275970Scyas the other files, are probably not compatible with anything other than Autokey.
284275970Scy.Pp
285275970ScyRunning the program as other than root and using the Unix
286275970Scy.Ic su
287275970Scycommand
288275970Scyto assume root may not work properly, since by default the OpenSSL library
289275970Scylooks for the random seed file
290275970Scy.Cm .rnd
291275970Scyin the user home directory.
292275970ScyHowever, there should be only one
293275970Scy.Cm .rnd ,
294275970Scymost conveniently
295275970Scyin the root directory, so it is convenient to define the
296275970Scy.Cm $RANDFILE
297275970Scyenvironment variable used by the OpenSSL library as the path to
298275970Scy.Cm /.rnd .
299275970Scy.Pp
300275970ScyInstalling the keys as root might not work in NFS\-mounted
301275970Scyshared file systems, as NFS clients may not be able to write
302275970Scyto the shared keys directory, even as root.
303275970ScyIn this case, NFS clients can specify the files in another
304275970Scydirectory such as
305275970Scy.Pa /etc
306275970Scyusing the
307275970Scy.Ic keysdir
308275970Scycommand.
309275970ScyThere is no need for one client to read the keys and certificates
310275970Scyof other clients or servers, as these data are obtained automatically
311275970Scyby the Autokey protocol.
312275970Scy.Pp
313275970ScyOrdinarily, cryptographic files are generated by the host that uses them,
314275970Scybut it is possible for a trusted agent (TA) to generate these files
315275970Scyfor other hosts; however, in such cases files should always be encrypted.
316275970ScyThe subject name and trusted name default to the hostname
317275970Scyof the host generating the files, but can be changed by command line options.
318275970ScyIt is convenient to designate the owner name and trusted name
319275970Scyas the subject and issuer fields, respectively, of the certificate.
320275970ScyThe owner name is also used for the host and sign key files,
321275970Scywhile the trusted name is used for the identity files.
322275970Scy.Pp
323275970ScyAll files are installed by default in the keys directory
324275970Scy.Pa /usr/local/etc ,
325275970Scywhich is normally in a shared filesystem
326275970Scyin NFS\-mounted networks.
327275970ScyThe actual location of the keys directory
328275970Scyand each file can be overridden by configuration commands,
329275970Scybut this is not recommended.
330275970ScyNormally, the files for each host are generated by that host
331275970Scyand used only by that host, although exceptions exist
332275970Scyas noted later on this page.
333275970Scy.Pp
334275970ScyNormally, files containing private values,
335275970Scyincluding the host key, sign key and identification parameters,
336275970Scyare permitted root read/write\-only;
337275970Scywhile others containing public values are permitted world readable.
338275970ScyAlternatively, files containing private values can be encrypted
339275970Scyand these files permitted world readable,
340275970Scywhich simplifies maintenance in shared file systems.
341275970ScySince uniqueness is insured by the hostname and
342275970Scyfile name extensions, the files for a NFS server and
343275970Scydependent clients can all be installed in the same shared directory.
344275970Scy.Pp
345275970ScyThe recommended practice is to keep the file name extensions
346275970Scywhen installing a file and to install a soft link
347275970Scyfrom the generic names specified elsewhere on this page
348275970Scyto the generated files.
349275970ScyThis allows new file generations to be activated simply
350275970Scyby changing the link.
351275970ScyIf a link is present, ntpd follows it to the file name
352275970Scyto extract the filestamp.
353275970ScyIf a link is not present,
354275970Scy.Xr ntpd @NTPD_MS@
355275970Scyextracts the filestamp from the file itself.
356275970ScyThis allows clients to verify that the file and generation times
357275970Scyare always current.
358275970ScyThe
359275970Scy.Nm
360275970Scyprogram uses the same timestamp extension for all files generated
361275970Scyat one time, so each generation is distinct and can be readily
362275970Scyrecognized in monitoring data.
363275970Scy.Ss Running the program
364275970ScyThe safest way to run the
365275970Scy.Nm
366275970Scyprogram is logged in directly as root.
367275970ScyThe recommended procedure is change to the keys directory,
368275970Scyusually
369275970Scy.Pa /usr/local/etc ,
370275970Scythen run the program.
371275970ScyWhen run for the first time,
372275970Scyor if all
373275970Scy.Cm ntpkey
374275970Scyfiles have been removed,
375275970Scythe program generates a RSA host key file and matching RSA\-MD5 certificate file,
376275970Scywhich is all that is necessary in many cases.
377275970ScyThe program also generates soft links from the generic names
378275970Scyto the respective files.
379275970ScyIf run again, the program uses the same host key file,
380275970Scybut generates a new certificate file and link.
381275970Scy.Pp
382275970ScyThe host key is used to encrypt the cookie when required and so must be RSA type.
383275970ScyBy default, the host key is also the sign key used to encrypt signatures.
384275970ScyWhen necessary, a different sign key can be specified and this can be
385275970Scyeither RSA or DSA type.
386275970ScyBy default, the message digest type is MD5, but any combination
387275970Scyof sign key type and message digest type supported by the OpenSSL library
388275970Scycan be specified, including those using the MD2, MD5, SHA, SHA1, MDC2
389275970Scyand RIPE160 message digest algorithms.
390275970ScyHowever, the scheme specified in the certificate must be compatible
391275970Scywith the sign key.
392275970ScyCertificates using any digest algorithm are compatible with RSA sign keys;
393275970Scyhowever, only SHA and SHA1 certificates are compatible with DSA sign keys.
394275970Scy.Pp
395275970ScyPrivate/public key files and certificates are compatible with
396275970Scyother OpenSSL applications and very likely other libraries as well.
397275970ScyCertificates or certificate requests derived from them should be compatible
398275970Scywith extant industry practice, although some users might find
399275970Scythe interpretation of X509v3 extension fields somewhat liberal.
400275970ScyHowever, the identification parameter files, although encoded
401275970Scyas the other files, are probably not compatible with anything other than Autokey.
402275970Scy.Pp
403275970ScyRunning the program as other than root and using the Unix
404275970Scy.Ic su
405275970Scycommand
406275970Scyto assume root may not work properly, since by default the OpenSSL library
407275970Scylooks for the random seed file
408275970Scy.Cm .rnd
409275970Scyin the user home directory.
410275970ScyHowever, there should be only one
411275970Scy.Cm .rnd ,
412275970Scymost conveniently
413275970Scyin the root directory, so it is convenient to define the
414275970Scy.Cm $RANDFILE
415275970Scyenvironment variable used by the OpenSSL library as the path to
416275970Scy.Cm /.rnd .
417275970Scy.Pp
418275970ScyInstalling the keys as root might not work in NFS\-mounted
419275970Scyshared file systems, as NFS clients may not be able to write
420275970Scyto the shared keys directory, even as root.
421275970ScyIn this case, NFS clients can specify the files in another
422275970Scydirectory such as
423275970Scy.Pa /etc
424275970Scyusing the
425275970Scy.Ic keysdir
426275970Scycommand.
427275970ScyThere is no need for one client to read the keys and certificates
428275970Scyof other clients or servers, as these data are obtained automatically
429275970Scyby the Autokey protocol.
430275970Scy.Pp
431275970ScyOrdinarily, cryptographic files are generated by the host that uses them,
432275970Scybut it is possible for a trusted agent (TA) to generate these files
433275970Scyfor other hosts; however, in such cases files should always be encrypted.
434275970ScyThe subject name and trusted name default to the hostname
435275970Scyof the host generating the files, but can be changed by command line options.
436275970ScyIt is convenient to designate the owner name and trusted name
437275970Scyas the subject and issuer fields, respectively, of the certificate.
438275970ScyThe owner name is also used for the host and sign key files,
439275970Scywhile the trusted name is used for the identity files.
440275970Scyseconds.
441275970Scyseconds.
442275970Scys Trusted Hosts and Groups
443275970ScyEach cryptographic configuration involves selection of a signature scheme
444275970Scyand identification scheme, called a cryptotype,
445275970Scyas explained in the
446275970Scy.Sx Authentication Options
447275970Scysection of
448275970Scy.Xr ntp.conf 5 .
449275970ScyThe default cryptotype uses RSA encryption, MD5 message digest
450275970Scyand TC identification.
451275970ScyFirst, configure a NTP subnet including one or more low\-stratum
452275970Scytrusted hosts from which all other hosts derive synchronization
453275970Scydirectly or indirectly.
454275970ScyTrusted hosts have trusted certificates;
455275970Scyall other hosts have nontrusted certificates.
456275970ScyThese hosts will automatically and dynamically build authoritative
457275970Scycertificate trails to one or more trusted hosts.
458275970ScyA trusted group is the set of all hosts that have, directly or indirectly,
459275970Scya certificate trail ending at a trusted host.
460275970ScyThe trail is defined by static configuration file entries
461275970Scyor dynamic means described on the
462275970Scy.Sx Automatic NTP Configuration Options
463275970Scysection of
464275970Scy.Xr ntp.conf 5 .
465275970Scy.Pp
466275970ScyOn each trusted host as root, change to the keys directory.
467275970ScyTo insure a fresh fileset, remove all
468275970Scy.Cm ntpkey
469275970Scyfiles.
470275970ScyThen run
471275970Scy.Nm
472275970Scy.Fl T
473275970Scyto generate keys and a trusted certificate.
474275970ScyOn all other hosts do the same, but leave off the
475275970Scy.Fl T
476275970Scyflag to generate keys and nontrusted certificates.
477275970ScyWhen complete, start the NTP daemons beginning at the lowest stratum
478275970Scyand working up the tree.
479275970ScyIt may take some time for Autokey to instantiate the certificate trails
480275970Scythroughout the subnet, but setting up the environment is completely automatic.
481275970Scy.Pp
482275970ScyIf it is necessary to use a different sign key or different digest/signature
483275970Scyscheme than the default, run
484275970Scy.Nm
485275970Scywith the
486275970Scy.Fl S Ar type
487275970Scyoption, where
488275970Scy.Ar type
489275970Scyis either
490275970Scy.Cm RSA
491275970Scyor
492275970Scy.Cm DSA .
493275970ScyThe most often need to do this is when a DSA\-signed certificate is used.
494275970ScyIf it is necessary to use a different certificate scheme than the default,
495275970Scyrun
496275970Scy.Nm
497275970Scywith the
498275970Scy.Fl c Ar scheme
499275970Scyoption and selected
500275970Scy.Ar scheme
501275970Scyas needed.
502275970Scyf
503275970Scy.Nm
504275970Scyis run again without these options, it generates a new certificate
505275970Scyusing the same scheme and sign key.
506275970Scy.Pp
507275970ScyAfter setting up the environment it is advisable to update certificates
508275970Scyfrom time to time, if only to extend the validity interval.
509275970ScySimply run
510275970Scy.Nm
511275970Scywith the same flags as before to generate new certificates
512275970Scyusing existing keys.
513275970ScyHowever, if the host or sign key is changed,
514275970Scy.Xr ntpd @NTPD_MS@
515275970Scyshould be restarted.
516275970ScyWhen
517275970Scy.Xr ntpd @NTPD_MS@
518275970Scyis restarted, it loads any new files and restarts the protocol.
519275970ScyOther dependent hosts will continue as usual until signatures are refreshed,
520275970Scyat which time the protocol is restarted.
521275970Scy.Ss Identity Schemes
522275970ScyAs mentioned on the Autonomous Authentication page,
523275970Scythe default TC identity scheme is vulnerable to a middleman attack.
524275970ScyHowever, there are more secure identity schemes available,
525275970Scyincluding PC, IFF, GQ and MV described on the
526275970Scy.Qq Identification Schemes
527275970Scypage
528275970Scy(maybe available at
529275970Scy.Li http://www.eecis.udel.edu/%7emills/keygen.html ) .
530275970ScyThese schemes are based on a TA, one or more trusted hosts
531275970Scyand some number of nontrusted hosts.
532275970ScyTrusted hosts prove identity using values provided by the TA,
533275970Scywhile the remaining hosts prove identity using values provided
534275970Scyby a trusted host and certificate trails that end on that host.
535275970ScyThe name of a trusted host is also the name of its sugroup
536275970Scyand also the subject and issuer name on its trusted certificate.
537275970ScyThe TA is not necessarily a trusted host in this sense, but often is.
538275970Scy.Pp
539275970ScyIn some schemes there are separate keys for servers and clients.
540275970ScyA server can also be a client of another server,
541275970Scybut a client can never be a server for another client.
542275970ScyIn general, trusted hosts and nontrusted hosts that operate
543275970Scyas both server and client have parameter files that contain
544275970Scyboth server and client keys.
545275970ScyHosts that operate
546275970Scyonly as clients have key files that contain only client keys.
547275970Scy.Pp
548275970ScyThe PC scheme supports only one trusted host in the group.
549275970ScyOn trusted host alice run
550275970Scy.Nm
551275970Scy.Fl P
552275970Scy.Fl p Ar password
553275970Scyto generate the host key file
554275970Scy.Pa ntpkey_RSAkey_ Ns Ar alice.filestamp
555275970Scyand trusted private certificate file
556275970Scy.Pa ntpkey_RSA\-MD5_cert_ Ns Ar alice.filestamp .
557275970ScyCopy both files to all group hosts;
558275970Scythey replace the files which would be generated in other schemes.
559275970ScyOn each host bob install a soft link from the generic name
560275970Scy.Pa ntpkey_host_ Ns Ar bob
561275970Scyto the host key file and soft link
562275970Scy.Pa ntpkey_cert_ Ns Ar bob
563275970Scyto the private certificate file.
564275970ScyNote the generic links are on bob, but point to files generated
565275970Scyby trusted host alice.
566275970ScyIn this scheme it is not possible to refresh
567275970Scyeither the keys or certificates without copying them
568275970Scyto all other hosts in the group.
569275970Scy.Pp
570275970ScyFor the IFF scheme proceed as in the TC scheme to generate keys
571275970Scyand certificates for all group hosts, then for every trusted host in the group,
572275970Scygenerate the IFF parameter file.
573275970ScyOn trusted host alice run
574275970Scy.Nm
575275970Scy.Fl T
576275970Scy.Fl I
577275970Scy.Fl p Ar password
578275970Scyto produce her parameter file
579275970Scy.Pa ntpkey_IFFpar_ Ns Ar alice.filestamp ,
580275970Scywhich includes both server and client keys.
581275970ScyCopy this file to all group hosts that operate as both servers
582275970Scyand clients and install a soft link from the generic
583275970Scy.Pa ntpkey_iff_ Ns Ar alice
584275970Scyto this file.
585275970ScyIf there are no hosts restricted to operate only as clients,
586275970Scythere is nothing further to do.
587275970ScyAs the IFF scheme is independent
588275970Scyof keys and certificates, these files can be refreshed as needed.
589275970Scy.Pp
590275970ScyIf a rogue client has the parameter file, it could masquerade
591275970Scyas a legitimate server and present a middleman threat.
592275970ScyTo eliminate this threat, the client keys can be extracted
593275970Scyfrom the parameter file and distributed to all restricted clients.
594275970ScyAfter generating the parameter file, on alice run
595275970Scy.Nm
596275970Scy.Fl e
597275970Scyand pipe the output to a file or mail program.
598275970ScyCopy or mail this file to all restricted clients.
599275970ScyOn these clients install a soft link from the generic
600275970Scy.Pa ntpkey_iff_ Ns Ar alice
601275970Scyto this file.
602275970ScyTo further protect the integrity of the keys,
603275970Scyeach file can be encrypted with a secret password.
604275970Scy.Pp
605275970ScyFor the GQ scheme proceed as in the TC scheme to generate keys
606275970Scyand certificates for all group hosts, then for every trusted host
607275970Scyin the group, generate the IFF parameter file.
608275970ScyOn trusted host alice run
609275970Scy.Nm
610275970Scy.Fl T
611275970Scy.Fl G
612275970Scy.Fl p Ar password
613275970Scyto produce her parameter file
614275970Scy.Pa ntpkey_GQpar_ Ns Ar alice.filestamp ,
615275970Scywhich includes both server and client keys.
616275970ScyCopy this file to all group hosts and install a soft link
617275970Scyfrom the generic
618275970Scy.Pa ntpkey_gq_ Ns Ar alice
619275970Scyto this file.
620275970ScyIn addition, on each host bob install a soft link
621275970Scyfrom generic
622275970Scy.Pa ntpkey_gq_ Ns Ar bob
623275970Scyto this file.
624275970ScyAs the GQ scheme updates the GQ parameters file and certificate
625275970Scyat the same time, keys and certificates can be regenerated as needed.
626275970Scy.Pp
627275970ScyFor the MV scheme, proceed as in the TC scheme to generate keys
628275970Scyand certificates for all group hosts.
629275970ScyFor illustration assume trish is the TA, alice one of several trusted hosts
630275970Scyand bob one of her clients.
631275970ScyOn TA trish run
632275970Scy.Nm
633275970Scy.Fl V Ar n
634275970Scy.Fl p Ar password ,
635275970Scywhere
636275970Scy.Ar n
637275970Scyis the number of revokable keys (typically 5) to produce
638275970Scythe parameter file
639275970Scy.Pa ntpkeys_MVpar_ Ns Ar trish.filestamp
640275970Scyand client key files
641275970Scy.Pa ntpkeys_MVkeyd_ Ns Ar trish.filestamp
642275970Scywhere
643275970Scy.Ar d
644275970Scyis the key number (0 \&<
645275970Scy.Ar d
646275970Scy\&<
647275970Scy.Ar n ) .
648275970ScyCopy the parameter file to alice and install a soft link
649275970Scyfrom the generic
650275970Scy.Pa ntpkey_mv_ Ns Ar alice
651275970Scyto this file.
652275970ScyCopy one of the client key files to alice for later distribution
653275970Scyto her clients.
654275970ScyIt doesn't matter which client key file goes to alice,
655275970Scysince they all work the same way.
656275970ScyAlice copies the client key file to all of her cliens.
657275970ScyOn client bob install a soft link from generic
658275970Scy.Pa ntpkey_mvkey_ Ns Ar bob
659275970Scyto the client key file.
660275970ScyAs the MV scheme is independent of keys and certificates,
661275970Scythese files can be refreshed as needed.
662275970Scy.Ss Command Line Options
663275970Scy.Bl -tag -width indent
664275970Scy.It Fl c Ar scheme
665275970ScySelect certificate message digest/signature encryption scheme.
666275970ScyThe
667275970Scy.Ar scheme
668275970Scycan be one of the following:
669275970Scy. Cm RSA\-MD2 , RSA\-MD5 , RSA\-SHA , RSA\-SHA1 , RSA\-MDC2 , RSA\-RIPEMD160 , DSA\-SHA ,
670275970Scyor
671275970Scy.Cm DSA\-SHA1 .
672275970ScyNote that RSA schemes must be used with a RSA sign key and DSA
673275970Scyschemes must be used with a DSA sign key.
674275970ScyThe default without this option is
675275970Scy.Cm RSA\-MD5 .
676275970Scy.It Fl d
677275970ScyEnable debugging.
678275970ScyThis option displays the cryptographic data produced in eye\-friendly billboards.
679275970Scy.It Fl e
680275970ScyWrite the IFF client keys to the standard output.
681275970ScyThis is intended for automatic key distribution by mail.
682275970Scy.It Fl G
683275970ScyGenerate parameters and keys for the GQ identification scheme,
684275970Scyobsoleting any that may exist.
685275970Scy.It Fl g
686275970ScyGenerate keys for the GQ identification scheme
687275970Scyusing the existing GQ parameters.
688275970ScyIf the GQ parameters do not yet exist, create them first.
689275970Scy.It Fl H
690275970ScyGenerate new host keys, obsoleting any that may exist.
691275970Scy.It Fl I
692275970ScyGenerate parameters for the IFF identification scheme,
693275970Scyobsoleting any that may exist.
694275970Scy.It Fl i Ar name
695275970ScySet the suject name to
696275970Scy.Ar name .
697275970ScyThis is used as the subject field in certificates
698275970Scyand in the file name for host and sign keys.
699275970Scy.It Fl M
700275970ScyGenerate MD5 keys, obsoleting any that may exist.
701275970Scy.It Fl P
702275970ScyGenerate a private certificate.
703275970ScyBy default, the program generates public certificates.
704275970Scy.It Fl p Ar password
705275970ScyEncrypt generated files containing private data with
706275970Scy.Ar password
707275970Scyand the DES\-CBC algorithm.
708275970Scy.It Fl q
709275970ScySet the password for reading files to password.
710275970Scy.It Fl S Oo Cm RSA | DSA Oc
711275970ScyGenerate a new sign key of the designated type,
712275970Scyobsoleting any that may exist.
713275970ScyBy default, the program uses the host key as the sign key.
714275970Scy.It Fl s Ar name
715275970ScySet the issuer name to
716275970Scy.Ar name .
717275970ScyThis is used for the issuer field in certificates
718275970Scyand in the file name for identity files.
719275970Scy.It Fl T
720275970ScyGenerate a trusted certificate.
721275970ScyBy default, the program generates a non\-trusted certificate.
722275970Scy.It Fl V Ar nkeys
723275970ScyGenerate parameters and keys for the Mu\-Varadharajan (MV) identification scheme.
724275970Scy.El
725275970Scy.Ss Random Seed File
726275970ScyAll cryptographically sound key generation schemes must have means
727275970Scyto randomize the entropy seed used to initialize
728275970Scythe internal pseudo\-random number generator used
729275970Scyby the library routines.
730275970ScyThe OpenSSL library uses a designated random seed file for this purpose.
731275970ScyThe file must be available when starting the NTP daemon and
732275970Scy.Nm
733275970Scyprogram.
734275970ScyIf a site supports OpenSSL or its companion OpenSSH,
735275970Scyit is very likely that means to do this are already available.
736275970Scy.Pp
737275970ScyIt is important to understand that entropy must be evolved
738275970Scyfor each generation, for otherwise the random number sequence
739275970Scywould be predictable.
740275970ScyVarious means dependent on external events, such as keystroke intervals,
741275970Scycan be used to do this and some systems have built\-in entropy sources.
742275970ScySuitable means are described in the OpenSSL software documentation,
743275970Scybut are outside the scope of this page.
744275970Scy.Pp
745275970ScyThe entropy seed used by the OpenSSL library is contained in a file,
746275970Scyusually called
747275970Scy.Cm .rnd ,
748275970Scywhich must be available when starting the NTP daemon
749275970Scyor the
750275970Scy.Nm
751275970Scyprogram.
752275970ScyThe NTP daemon will first look for the file
753275970Scyusing the path specified by the
754275970Scy.Ic randfile
755275970Scysubcommand of the
756275970Scy.Ic crypto
757275970Scyconfiguration command.
758275970ScyIf not specified in this way, or when starting the
759275970Scy.Nm
760275970Scyprogram,
761275970Scythe OpenSSL library will look for the file using the path specified
762275970Scyby the
763275970Scy.Ev RANDFILE
764275970Scyenvironment variable in the user home directory,
765275970Scywhether root or some other user.
766275970ScyIf the
767275970Scy.Ev RANDFILE
768275970Scyenvironment variable is not present,
769275970Scythe library will look for the
770275970Scy.Cm .rnd
771275970Scyfile in the user home directory.
772275970ScyIf the file is not available or cannot be written,
773275970Scythe daemon exits with a message to the system log and the program
774275970Scyexits with a suitable error message.
775275970Scy.Ss Cryptographic Data Files
776275970ScyAll other file formats begin with two lines.
777275970ScyThe first contains the file name, including the generated host name
778275970Scyand filestamp.
779275970ScyThe second contains the datestamp in conventional Unix date format.
780275970ScyLines beginning with # are considered comments and ignored by the
781275970Scy.Nm
782275970Scyprogram and
783275970Scy.Xr ntpd @NTPD_MS@
784275970Scydaemon.
785275970ScyCryptographic values are encoded first using ASN.1 rules,
786275970Scythen encrypted if necessary, and finally written PEM\-encoded
787275970Scyprintable ASCII format preceded and followed by MIME content identifier lines.
788275970Scy.Pp
789275970ScyThe format of the symmetric keys file is somewhat different
790275970Scythan the other files in the interest of backward compatibility.
791275970ScySince DES\-CBC is deprecated in NTPv4, the only key format of interest
792275970Scyis MD5 alphanumeric strings.
793275970ScyFollowing hte heard the keys are
794275970Scyentered one per line in the format
795275970Scy.D1 Ar keyno type key
796275970Scywhere
797275970Scy.Ar keyno
798275970Scyis a positive integer in the range 1\-65,535,
799275970Scy.Ar type
800275970Scyis the string MD5 defining the key format and
801275970Scy.Ar key
802275970Scyis the key itself,
803275970Scywhich is a printable ASCII string 16 characters or less in length.
804275970ScyEach character is chosen from the 93 printable characters
805275970Scyin the range 0x21 through 0x7f excluding space and the
806275970Scy.Ql #
807275970Scycharacter.
808275970Scy.Pp
809275970ScyNote that the keys used by the
810275970Scy.Xr ntpq @NTPQ_MS@
811275970Scyand
812275970Scy.Xr ntpdc @NTPDC_MS@
813275970Scyprograms
814275970Scyare checked against passwords requested by the programs
815275970Scyand entered by hand, so it is generally appropriate to specify these keys
816275970Scyin human readable ASCII format.
817275970Scy.Pp
818275970ScyThe
819275970Scy.Nm
820275970Scyprogram generates a MD5 symmetric keys file
821275970Scy.Pa ntpkey_MD5key_ Ns Ar hostname.filestamp .
822275970ScySince the file contains private shared keys,
823275970Scyit should be visible only to root and distributed by secure means
824275970Scyto other subnet hosts.
825275970ScyThe NTP daemon loads the file
826275970Scy.Pa ntp.keys ,
827275970Scyso
828275970Scy.Nm
829275970Scyinstalls a soft link from this name to the generated file.
830275970ScySubsequently, similar soft links must be installed by manual
831275970Scyor automated means on the other subnet hosts.
832275970ScyWhile this file is not used with the Autokey Version 2 protocol,
833275970Scyit is needed to authenticate some remote configuration commands
834275970Scyused by the
835275970Scy.Xr ntpq @NTPQ_MS@
836275970Scyand
837275970Scy.Xr ntpdc @NTPDC_MS@
838275970Scyutilities.
839275970Scy.Sh "OPTIONS"
840275970Scy.Bl -tag
841275970Scy.It  Fl b Ar imbits , Fl \-imbits Ns = Ns Ar imbits 
842275970Scyidentity modulus bits.
843275970ScyThis option takes an integer number as its argument.
844275970ScyThe value of
845275970Scy.Ar imbits
846275970Scyis constrained to being:
847275970Scy.in +4
848275970Scy.nf
849275970Scy.na
850275970Scyin the range  256 through 2048
851275970Scy.fi
852275970Scy.in -4
853275970Scy.sp
854275970ScyThe number of bits in the identity modulus.  The default is 256.
855275970Scy.It  Fl c Ar scheme , Fl \-certificate Ns = Ns Ar scheme 
856275970Scycertificate scheme.
857275970Scy.sp
858275970Scyscheme is one of
859275970ScyRSA\-MD2, RSA\-MD5, RSA\-SHA, RSA\-SHA1, RSA\-MDC2, RSA\-RIPEMD160,
860275970ScyDSA\-SHA, or DSA\-SHA1.
861275970Scy.sp
862275970ScySelect the certificate message digest/signature encryption scheme.
863275970ScyNote that RSA schemes must be used with a RSA sign key and DSA
864275970Scyschemes must be used with a DSA sign key.  The default without
865275970Scythis option is RSA\-MD5.
866275970Scy.It  Fl C Ar cipher , Fl \-cipher Ns = Ns Ar cipher 
867275970Scyprivatekey cipher.
868275970Scy.sp
869275970ScySelect the cipher which is used to encrypt the files containing
870275970Scyprivate keys.  The default is three\-key triple DES in CBC mode,
871275970Scyequivalent to "@code{\-C des\-ede3\-cbc".  The openssl tool lists ciphers
872275970Scyavailable in "\fBopenssl \-h\fP" output.
873275970Scy.It  Fl d , Fl \-debug\-level 
874275970ScyIncrease debug verbosity level.
875275970ScyThis option may appear an unlimited number of times.
876275970Scy.sp
877275970Scy.It  Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number 
878275970ScySet the debug verbosity level.
879275970ScyThis option may appear an unlimited number of times.
880275970ScyThis option takes an integer number as its argument.
881275970Scy.sp
882275970Scy.It  Fl e , Fl \-id\-key 
883275970ScyWrite IFF or GQ identity keys.
884275970Scy.sp
885275970ScyWrite the IFF or GQ client keys to the standard output.  This is
886275970Scyintended for automatic key distribution by mail.
887275970Scy.It  Fl G , Fl \-gq\-params 
888275970ScyGenerate GQ parameters and keys.
889275970Scy.sp
890275970ScyGenerate parameters and keys for the GQ identification scheme,
891275970Scyobsoleting any that may exist.
892275970Scy.It  Fl H , Fl \-host\-key 
893275970Scygenerate RSA host key.
894275970Scy.sp
895275970ScyGenerate new host keys, obsoleting any that may exist.
896275970Scy.It  Fl I , Fl \-iffkey 
897275970Scygenerate IFF parameters.
898275970Scy.sp
899275970ScyGenerate parameters for the IFF identification scheme, obsoleting
900275970Scyany that may exist.
901275970Scy.It  Fl i Ar group , Fl \-ident Ns = Ns Ar group 
902275970Scyset Autokey group name.
903275970Scy.sp
904275970ScySet the optional Autokey group name to name.  This is used in
905275970Scythe file name of IFF, GQ, and MV client parameters files.  In
906275970Scythat role, the default is the host name if this option is not
907275970Scyprovided.  The group name, if specified using \fB\-i/\-\-ident\fP or
908275970Scyusing \fB\-s/\-\-subject\-name\fP following an '\fB@\fP' character,
909275970Scyis also a part of the self\-signed host certificate's subject and
910275970Scyissuer names in the form \fBhost@group\fP and should match the
911275970Scy\'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in
912275970Scy\fBntpd\fP's configuration file. 
913275970Scy.It  Fl l Ar lifetime , Fl \-lifetime Ns = Ns Ar lifetime 
914275970Scyset certificate lifetime.
915275970ScyThis option takes an integer number as its argument.
916275970Scy.sp
917275970ScySet the certificate expiration to lifetime days from now.
918275970Scy.It  Fl M , Fl \-md5key 
919275970Scygenerate MD5 keys.
920275970Scy.sp
921275970ScyGenerate MD5 keys, obsoleting any that may exist.
922275970Scy.It  Fl m Ar modulus , Fl \-modulus Ns = Ns Ar modulus 
923275970Scymodulus.
924275970ScyThis option takes an integer number as its argument.
925275970ScyThe value of
926275970Scy.Ar modulus
927275970Scyis constrained to being:
928275970Scy.in +4
929275970Scy.nf
930275970Scy.na
931275970Scyin the range  256 through 2048
932275970Scy.fi
933275970Scy.in -4
934275970Scy.sp
935275970ScyThe number of bits in the prime modulus.  The default is 512.
936275970Scy.It  Fl P , Fl \-pvt\-cert 
937275970Scygenerate PC private certificate.
938275970Scy.sp
939275970ScyGenerate a private certificate.  By default, the program generates
940275970Scypublic certificates.
941275970Scy.It  Fl p Ar passwd , Fl \-password Ns = Ns Ar passwd 
942275970Scylocal private password.
943275970Scy.sp
944275970ScyLocal files containing private data are encrypted with the
945275970ScyDES\-CBC algorithm and the specified password.  The same password
946275970Scymust be specified to the local ntpd via the "crypto pw password"
947275970Scyconfiguration command.  The default password is the local
948275970Scyhostname.
949275970Scy.It  Fl q Ar passwd , Fl \-export\-passwd Ns = Ns Ar passwd 
950275970Scyexport IFF or GQ group keys with password.
951275970Scy.sp
952275970ScyExport IFF or GQ identity group keys to the standard output,
953275970Scyencrypted with the DES\-CBC algorithm and the specified password.
954275970ScyThe same password must be specified to the remote ntpd via the
955275970Scy"crypto pw password" configuration command.  See also the option
956275970Scy-\-id\-key (\-e) for unencrypted exports.
957275970Scy.It  Fl S Ar sign , Fl \-sign\-key Ns = Ns Ar sign 
958275970Scygenerate sign key (RSA or DSA).
959275970Scy.sp
960275970ScyGenerate a new sign key of the designated type, obsoleting any
961275970Scythat may exist.  By default, the program uses the host key as the
962275970Scysign key.
963275970Scy.It  Fl s Ar host@group , Fl \-subject\-name Ns = Ns Ar host@group 
964275970Scyset host and optionally group name.
965275970Scy.sp
966275970ScySet the Autokey host name, and optionally, group name specified
967275970Scyfollowing an '\fB@\fP' character.  The host name is used in the file
968275970Scyname of generated host and signing certificates, without the
969275970Scygroup name.  The host name, and if provided, group name are used
970275970Scyin \fBhost@group\fP form for the host certificate's subject and issuer
971275970Scyfields.  Specifying '\fB\-s @group\fP' is allowed, and results in
972275970Scyleaving the host name unchanged while appending \fB@group\fP to the
973275970Scysubject and issuer fields, as with \fB\-i group\fP.  The group name, or
974275970Scyif not provided, the host name are also used in the file names
975275970Scyof IFF, GQ, and MV client parameter files.
976275970Scy.It  Fl T , Fl \-trusted\-cert 
977275970Scytrusted certificate (TC scheme).
978275970Scy.sp
979275970ScyGenerate a trusted certificate.  By default, the program generates
980275970Scya non\-trusted certificate.
981275970Scy.It  Fl V Ar num , Fl \-mv\-params Ns = Ns Ar num 
982275970Scygenerate <num> MV parameters.
983275970ScyThis option takes an integer number as its argument.
984275970Scy.sp
985275970ScyGenerate parameters and keys for the Mu\-Varadharajan (MV)
986275970Scyidentification scheme.
987275970Scy.It  Fl v Ar num , Fl \-mv\-keys Ns = Ns Ar num 
988275970Scyupdate <num> MV keys.
989275970ScyThis option takes an integer number as its argument.
990275970Scy.sp
991275970ScyThis option has not been fully documented.
992275970Scy.It Fl \&? , Fl \-help
993275970ScyDisplay usage information and exit.
994275970Scy.It Fl \&! , Fl \-more\-help
995275970ScyPass the extended usage information through a pager.
996275970Scy.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc
997275970ScySave the option state to \fIcfgfile\fP.  The default is the \fIlast\fP
998275970Scyconfiguration file listed in the \fBOPTION PRESETS\fP section, below.
999275970ScyThe command will exit after updating the config file.
1000275970Scy.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts
1001275970ScyLoad options from \fIcfgfile\fP.
1002275970ScyThe \fIno\-load\-opts\fP form will disable the loading
1003275970Scyof earlier config/rc/ini files.  \fI\-\-no\-load\-opts\fP is handled early,
1004275970Scyout of order.
1005275970Scy.It Fl \-version Op Brq Ar v|c|n
1006275970ScyOutput version of program and exit.  The default mode is `v', a simple
1007275970Scyversion.  The `c' mode will print copyright information and `n' will
1008275970Scyprint the full copyright notice.
1009275970Scy.El
1010275970Scy.Sh "OPTION PRESETS"
1011275970ScyAny option that is not marked as \fInot presettable\fP may be preset
1012275970Scyby loading values from configuration ("RC" or ".INI") file(s) and values from
1013275970Scyenvironment variables named:
1014275970Scy.nf
1015275970Scy  \fBNTP_KEYGEN_<option\-name>\fP or \fBNTP_KEYGEN\fP
1016275970Scy.fi
1017275970Scy.ad
1018275970ScyThe environmental presets take precedence (are processed later than)
1019275970Scythe configuration files.
1020275970ScyThe \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
1021275970ScyIf any of these are directories, then the file \fI.ntprc\fP
1022275970Scyis searched for within those directories.
1023275970Scy.Sh USAGE
1024275970ScyThe
1025275970Scy.Fl p Ar password
1026275970Scyoption specifies the write password and
1027275970Scy.Fl q Ar password
1028275970Scyoption the read password for previously encrypted files.
1029275970ScyThe
1030275970Scy.Nm
1031275970Scyprogram prompts for the password if it reads an encrypted file
1032275970Scyand the password is missing or incorrect.
1033275970ScyIf an encrypted file is read successfully and
1034275970Scyno write password is specified, the read password is used
1035275970Scyas the write password by default.
1036275970Scy.Sh "ENVIRONMENT"
1037275970ScySee \fBOPTION PRESETS\fP for configuration environment variables.
1038275970Scy.Sh "FILES"
1039275970ScySee \fBOPTION PRESETS\fP for configuration files.
1040275970Scy.Sh "EXIT STATUS"
1041275970ScyOne of the following exit values will be returned:
1042275970Scy.Bl -tag
1043275970Scy.It 0 " (EXIT_SUCCESS)"
1044275970ScySuccessful program execution.
1045275970Scy.It 1 " (EXIT_FAILURE)"
1046275970ScyThe operation failed or the command syntax was not valid.
1047275970Scy.It 66 " (EX_NOINPUT)"
1048275970ScyA specified configuration file could not be loaded.
1049275970Scy.It 70 " (EX_SOFTWARE)"
1050275970Scylibopts had an internal operational error.  Please report
1051275970Scyit to autogen\-users@lists.sourceforge.net.  Thank you.
1052275970Scy.El
1053275970Scy.Sh "AUTHORS"
1054280849ScyThe University of Delaware and Network Time Foundation
1055275970Scy.Sh "COPYRIGHT"
1056316068SdelphijCopyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved.
1057275970ScyThis program is released under the terms of the NTP license, <http://ntp.org/license>.
1058275970Scy.Sh BUGS
1059275970ScyIt can take quite a while to generate some cryptographic values,
1060275970Scyfrom one to several minutes with modern architectures
1061275970Scysuch as UltraSPARC and up to tens of minutes to an hour
1062275970Scywith older architectures such as SPARC IPC.
1063275970Scy.Pp
1064275970ScyPlease report bugs to http://bugs.ntp.org .
1065275970Scy.Pp
1066275970ScyPlease send bug reports to: http://bugs.ntp.org, bugs@ntp.org
1067275970Scy.Sh NOTES
1068275970ScyPortions of this document came from FreeBSD.
1069275970Scy.Pp
1070275970ScyThis manual page was \fIAutoGen\fP\-erated from the \fBntp\-keygen\fP
1071275970Scyoption definitions.
1072