1*2b15cb3dSCy Schubert.Dd February 4 2015 2*2b15cb3dSCy Schubert.Dt NTP_KEYGEN 1ntp-keygenmdoc User Commands 3*2b15cb3dSCy Schubert.Os 4*2b15cb3dSCy Schubert.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc) 5*2b15cb3dSCy Schubert.\" 6*2b15cb3dSCy Schubert.\" It has been AutoGen-ed February 4, 2015 at 02:44:02 AM by AutoGen 5.18.5pre4 7*2b15cb3dSCy Schubert.\" From the definitions ntp-keygen-opts.def 8*2b15cb3dSCy Schubert.\" and the template file agmdoc-cmd.tpl 9*2b15cb3dSCy Schubert.Sh NAME 10*2b15cb3dSCy Schubert.Nm ntp-keygen 11*2b15cb3dSCy Schubert.Nd Create a NTP host key 12*2b15cb3dSCy Schubert.Sh SYNOPSIS 13*2b15cb3dSCy Schubert.Nm 14*2b15cb3dSCy Schubert.\" Mixture of short (flag) options and long options 15*2b15cb3dSCy Schubert.Op Fl flags 16*2b15cb3dSCy Schubert.Op Fl flag Op Ar value 17*2b15cb3dSCy Schubert.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc 18*2b15cb3dSCy Schubert.Pp 19*2b15cb3dSCy SchubertAll arguments must be options. 20*2b15cb3dSCy Schubert.Pp 21*2b15cb3dSCy Schubert.Sh DESCRIPTION 22*2b15cb3dSCy SchubertThis program generates cryptographic data files used by the NTPv4 23*2b15cb3dSCy Schubertauthentication and identification schemes. 24*2b15cb3dSCy SchubertIt generates MD5 key files used in symmetric key cryptography. 25*2b15cb3dSCy SchubertIn addition, if the OpenSSL software library has been installed, 26*2b15cb3dSCy Schubertit generates keys, certificate and identity files used in public key 27*2b15cb3dSCy Schubertcryptography. 28*2b15cb3dSCy SchubertThese files are used for cookie encryption, 29*2b15cb3dSCy Schubertdigital signature and challenge/response identification algorithms 30*2b15cb3dSCy Schubertcompatible with the Internet standard security infrastructure. 31*2b15cb3dSCy Schubert.Pp 32*2b15cb3dSCy SchubertAll files are in PEM\-encoded printable ASCII format, 33*2b15cb3dSCy Schubertso they can be embedded as MIME attachments in mail to other sites 34*2b15cb3dSCy Schubertand certificate authorities. 35*2b15cb3dSCy SchubertBy default, files are not encrypted. 36*2b15cb3dSCy Schubert.Pp 37*2b15cb3dSCy SchubertWhen used to generate message digest keys, the program produces a file 38*2b15cb3dSCy Schubertcontaining ten pseudo\-random printable ASCII strings suitable for the 39*2b15cb3dSCy SchubertMD5 message digest algorithm included in the distribution. 40*2b15cb3dSCy SchubertIf the OpenSSL library is installed, it produces an additional ten 41*2b15cb3dSCy Schuberthex\-encoded random bit strings suitable for the SHA1 and other message 42*2b15cb3dSCy Schubertdigest algorithms. 43*2b15cb3dSCy SchubertThe message digest keys file must be distributed and stored 44*2b15cb3dSCy Schubertusing secure means beyond the scope of NTP itself. 45*2b15cb3dSCy SchubertBesides the keys used for ordinary NTP associations, additional keys 46*2b15cb3dSCy Schubertcan be defined as passwords for the 47*2b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc 48*2b15cb3dSCy Schubertand 49*2b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc 50*2b15cb3dSCy Schubertutility programs. 51*2b15cb3dSCy Schubert.Pp 52*2b15cb3dSCy SchubertThe remaining generated files are compatible with other OpenSSL 53*2b15cb3dSCy Schubertapplications and other Public Key Infrastructure (PKI) resources. 54*2b15cb3dSCy SchubertCertificates generated by this program are compatible with extant 55*2b15cb3dSCy Schubertindustry practice, although some users might find the interpretation of 56*2b15cb3dSCy SchubertX509v3 extension fields somewhat liberal. 57*2b15cb3dSCy SchubertHowever, the identity keys are probably not compatible with anything 58*2b15cb3dSCy Schubertother than Autokey. 59*2b15cb3dSCy Schubert.Pp 60*2b15cb3dSCy SchubertSome files used by this program are encrypted using a private password. 61*2b15cb3dSCy SchubertThe 62*2b15cb3dSCy Schubert.Fl p 63*2b15cb3dSCy Schubertoption specifies the password for local encrypted files and the 64*2b15cb3dSCy Schubert.Fl q 65*2b15cb3dSCy Schubertoption the password for encrypted files sent to remote sites. 66*2b15cb3dSCy SchubertIf no password is specified, the host name returned by the Unix 67*2b15cb3dSCy Schubert.Fn gethostname 68*2b15cb3dSCy Schubertfunction, normally the DNS name of the host is used. 69*2b15cb3dSCy Schubert.Pp 70*2b15cb3dSCy SchubertThe 71*2b15cb3dSCy Schubert.Ar pw 72*2b15cb3dSCy Schubertoption of the 73*2b15cb3dSCy Schubert.Ar crypto 74*2b15cb3dSCy Schubertconfiguration command specifies the read 75*2b15cb3dSCy Schubertpassword for previously encrypted local files. 76*2b15cb3dSCy SchubertThis must match the local password used by this program. 77*2b15cb3dSCy SchubertIf not specified, the host name is used. 78*2b15cb3dSCy SchubertThus, if files are generated by this program without password, 79*2b15cb3dSCy Schubertthey can be read back by 80*2b15cb3dSCy Schubert.Ar ntpd 81*2b15cb3dSCy Schubertwithout password but only on the same host. 82*2b15cb3dSCy Schubert.Pp 83*2b15cb3dSCy SchubertNormally, encrypted files for each host are generated by that host and 84*2b15cb3dSCy Schubertused only by that host, although exceptions exist as noted later on 85*2b15cb3dSCy Schubertthis page. 86*2b15cb3dSCy SchubertThe symmetric keys file, normally called 87*2b15cb3dSCy Schubert.Ar ntp.keys , 88*2b15cb3dSCy Schubertis usually installed in 89*2b15cb3dSCy Schubert.Pa /etc . 90*2b15cb3dSCy SchubertOther files and links are usually installed in 91*2b15cb3dSCy Schubert.Pa /usr/local/etc , 92*2b15cb3dSCy Schubertwhich is normally in a shared filesystem in 93*2b15cb3dSCy SchubertNFS\-mounted networks and cannot be changed by shared clients. 94*2b15cb3dSCy SchubertThe location of the keys directory can be changed by the 95*2b15cb3dSCy Schubert.Ar keysdir 96*2b15cb3dSCy Schubertconfiguration command in such cases. 97*2b15cb3dSCy SchubertNormally, this is in 98*2b15cb3dSCy Schubert.Pa /etc . 99*2b15cb3dSCy Schubert.Pp 100*2b15cb3dSCy SchubertThis program directs commentary and error messages to the standard 101*2b15cb3dSCy Schuberterror stream 102*2b15cb3dSCy Schubert.Ar stderr 103*2b15cb3dSCy Schubertand remote files to the standard output stream 104*2b15cb3dSCy Schubert.Ar stdout 105*2b15cb3dSCy Schubertwhere they can be piped to other applications or redirected to files. 106*2b15cb3dSCy SchubertThe names used for generated files and links all begin with the 107*2b15cb3dSCy Schubertstring 108*2b15cb3dSCy Schubert.Ar ntpkey 109*2b15cb3dSCy Schubertand include the file type, generating host and filestamp, 110*2b15cb3dSCy Schubertas described in the 111*2b15cb3dSCy Schubert.Dq Cryptographic Data Files 112*2b15cb3dSCy Schubertsection below. 113*2b15cb3dSCy Schubert.Ss Running the Program 114*2b15cb3dSCy SchubertTo test and gain experience with Autokey concepts, log in as root and 115*2b15cb3dSCy Schubertchange to the keys directory, usually 116*2b15cb3dSCy Schubert.Pa /usr/local/etc 117*2b15cb3dSCy SchubertWhen run for the first time, or if all files with names beginning with 118*2b15cb3dSCy Schubert.Ar ntpkey 119*2b15cb3dSCy Schuberthave been removed, use the 120*2b15cb3dSCy Schubert.Nm 121*2b15cb3dSCy Schubertcommand without arguments to generate a 122*2b15cb3dSCy Schubertdefault RSA host key and matching RSA\-MD5 certificate with expiration 123*2b15cb3dSCy Schubertdate one year hence. 124*2b15cb3dSCy SchubertIf run again without options, the program uses the 125*2b15cb3dSCy Schubertexisting keys and parameters and generates only a new certificate with 126*2b15cb3dSCy Schubertnew expiration date one year hence. 127*2b15cb3dSCy Schubert.Pp 128*2b15cb3dSCy SchubertRun the command on as many hosts as necessary. 129*2b15cb3dSCy SchubertDesignate one of them as the trusted host (TH) using 130*2b15cb3dSCy Schubert.Nm 131*2b15cb3dSCy Schubertwith the 132*2b15cb3dSCy Schubert.Fl T 133*2b15cb3dSCy Schubertoption and configure it to synchronize from reliable Internet servers. 134*2b15cb3dSCy SchubertThen configure the other hosts to synchronize to the TH directly or 135*2b15cb3dSCy Schubertindirectly. 136*2b15cb3dSCy SchubertA certificate trail is created when Autokey asks the immediately 137*2b15cb3dSCy Schubertascendant host towards the TH to sign its certificate, which is then 138*2b15cb3dSCy Schubertprovided to the immediately descendant host on request. 139*2b15cb3dSCy SchubertAll group hosts should have acyclic certificate trails ending on the TH. 140*2b15cb3dSCy Schubert.Pp 141*2b15cb3dSCy SchubertThe host key is used to encrypt the cookie when required and so must be 142*2b15cb3dSCy SchubertRSA type. 143*2b15cb3dSCy SchubertBy default, the host key is also the sign key used to encrypt 144*2b15cb3dSCy Schubertsignatures. 145*2b15cb3dSCy SchubertA different sign key can be assigned using the 146*2b15cb3dSCy Schubert.Fl S 147*2b15cb3dSCy Schubertoption and this can be either RSA or DSA type. 148*2b15cb3dSCy SchubertBy default, the signature 149*2b15cb3dSCy Schubertmessage digest type is MD5, but any combination of sign key type and 150*2b15cb3dSCy Schubertmessage digest type supported by the OpenSSL library can be specified 151*2b15cb3dSCy Schubertusing the 152*2b15cb3dSCy Schubert.Fl c 153*2b15cb3dSCy Schubertoption. 154*2b15cb3dSCy SchubertThe rules say cryptographic media should be generated with proventic 155*2b15cb3dSCy Schubertfilestamps, which means the host should already be synchronized before 156*2b15cb3dSCy Schubertthis program is run. 157*2b15cb3dSCy SchubertThis of course creates a chicken\-and\-egg problem 158*2b15cb3dSCy Schubertwhen the host is started for the first time. 159*2b15cb3dSCy SchubertAccordingly, the host time 160*2b15cb3dSCy Schubertshould be set by some other means, such as eyeball\-and\-wristwatch, at 161*2b15cb3dSCy Schubertleast so that the certificate lifetime is within the current year. 162*2b15cb3dSCy SchubertAfter that and when the host is synchronized to a proventic source, the 163*2b15cb3dSCy Schubertcertificate should be re\-generated. 164*2b15cb3dSCy Schubert.Pp 165*2b15cb3dSCy SchubertAdditional information on trusted groups and identity schemes is on the 166*2b15cb3dSCy Schubert.Dq Autokey Public\-Key Authentication 167*2b15cb3dSCy Schubertpage. 168*2b15cb3dSCy Schubert.Pp 169*2b15cb3dSCy SchubertThe 170*2b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc 171*2b15cb3dSCy Schubertconfiguration command 172*2b15cb3dSCy Schubert.Ic crypto pw Ar password 173*2b15cb3dSCy Schubertspecifies the read password for previously encrypted files. 174*2b15cb3dSCy SchubertThe daemon expires on the spot if the password is missing 175*2b15cb3dSCy Schubertor incorrect. 176*2b15cb3dSCy SchubertFor convenience, if a file has been previously encrypted, 177*2b15cb3dSCy Schubertthe default read password is the name of the host running 178*2b15cb3dSCy Schubertthe program. 179*2b15cb3dSCy SchubertIf the previous write password is specified as the host name, 180*2b15cb3dSCy Schubertthese files can be read by that host with no explicit password. 181*2b15cb3dSCy Schubert.Pp 182*2b15cb3dSCy SchubertFile names begin with the prefix 183*2b15cb3dSCy Schubert.Cm ntpkey_ 184*2b15cb3dSCy Schubertand end with the postfix 185*2b15cb3dSCy Schubert.Ar _hostname.filestamp , 186*2b15cb3dSCy Schubertwhere 187*2b15cb3dSCy Schubert.Ar hostname 188*2b15cb3dSCy Schubertis the owner name, usually the string returned 189*2b15cb3dSCy Schubertby the Unix gethostname() routine, and 190*2b15cb3dSCy Schubert.Ar filestamp 191*2b15cb3dSCy Schubertis the NTP seconds when the file was generated, in decimal digits. 192*2b15cb3dSCy SchubertThis both guarantees uniqueness and simplifies maintenance 193*2b15cb3dSCy Schubertprocedures, since all files can be quickly removed 194*2b15cb3dSCy Schubertby a 195*2b15cb3dSCy Schubert.Ic rm ntpkey\&* 196*2b15cb3dSCy Schubertcommand or all files generated 197*2b15cb3dSCy Schubertat a specific time can be removed by a 198*2b15cb3dSCy Schubert.Ic rm 199*2b15cb3dSCy Schubert.Ar \&*filestamp 200*2b15cb3dSCy Schubertcommand. 201*2b15cb3dSCy SchubertTo further reduce the risk of misconfiguration, 202*2b15cb3dSCy Schubertthe first two lines of a file contain the file name 203*2b15cb3dSCy Schubertand generation date and time as comments. 204*2b15cb3dSCy Schubert.Pp 205*2b15cb3dSCy SchubertAll files are installed by default in the keys directory 206*2b15cb3dSCy Schubert.Pa /usr/local/etc , 207*2b15cb3dSCy Schubertwhich is normally in a shared filesystem 208*2b15cb3dSCy Schubertin NFS\-mounted networks. 209*2b15cb3dSCy SchubertThe actual location of the keys directory 210*2b15cb3dSCy Schubertand each file can be overridden by configuration commands, 211*2b15cb3dSCy Schubertbut this is not recommended. 212*2b15cb3dSCy SchubertNormally, the files for each host are generated by that host 213*2b15cb3dSCy Schubertand used only by that host, although exceptions exist 214*2b15cb3dSCy Schubertas noted later on this page. 215*2b15cb3dSCy Schubert.Pp 216*2b15cb3dSCy SchubertNormally, files containing private values, 217*2b15cb3dSCy Schubertincluding the host key, sign key and identification parameters, 218*2b15cb3dSCy Schubertare permitted root read/write\-only; 219*2b15cb3dSCy Schubertwhile others containing public values are permitted world readable. 220*2b15cb3dSCy SchubertAlternatively, files containing private values can be encrypted 221*2b15cb3dSCy Schubertand these files permitted world readable, 222*2b15cb3dSCy Schubertwhich simplifies maintenance in shared file systems. 223*2b15cb3dSCy SchubertSince uniqueness is insured by the hostname and 224*2b15cb3dSCy Schubertfile name extensions, the files for a NFS server and 225*2b15cb3dSCy Schubertdependent clients can all be installed in the same shared directory. 226*2b15cb3dSCy Schubert.Pp 227*2b15cb3dSCy SchubertThe recommended practice is to keep the file name extensions 228*2b15cb3dSCy Schubertwhen installing a file and to install a soft link 229*2b15cb3dSCy Schubertfrom the generic names specified elsewhere on this page 230*2b15cb3dSCy Schubertto the generated files. 231*2b15cb3dSCy SchubertThis allows new file generations to be activated simply 232*2b15cb3dSCy Schubertby changing the link. 233*2b15cb3dSCy SchubertIf a link is present, ntpd follows it to the file name 234*2b15cb3dSCy Schubertto extract the filestamp. 235*2b15cb3dSCy SchubertIf a link is not present, 236*2b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc 237*2b15cb3dSCy Schubertextracts the filestamp from the file itself. 238*2b15cb3dSCy SchubertThis allows clients to verify that the file and generation times 239*2b15cb3dSCy Schubertare always current. 240*2b15cb3dSCy SchubertThe 241*2b15cb3dSCy Schubert.Nm 242*2b15cb3dSCy Schubertprogram uses the same timestamp extension for all files generated 243*2b15cb3dSCy Schubertat one time, so each generation is distinct and can be readily 244*2b15cb3dSCy Schubertrecognized in monitoring data. 245*2b15cb3dSCy Schubert.Ss Running the program 246*2b15cb3dSCy SchubertThe safest way to run the 247*2b15cb3dSCy Schubert.Nm 248*2b15cb3dSCy Schubertprogram is logged in directly as root. 249*2b15cb3dSCy SchubertThe recommended procedure is change to the keys directory, 250*2b15cb3dSCy Schubertusually 251*2b15cb3dSCy Schubert.Pa /usr/local/etc , 252*2b15cb3dSCy Schubertthen run the program. 253*2b15cb3dSCy SchubertWhen run for the first time, 254*2b15cb3dSCy Schubertor if all 255*2b15cb3dSCy Schubert.Cm ntpkey 256*2b15cb3dSCy Schubertfiles have been removed, 257*2b15cb3dSCy Schubertthe program generates a RSA host key file and matching RSA\-MD5 certificate file, 258*2b15cb3dSCy Schubertwhich is all that is necessary in many cases. 259*2b15cb3dSCy SchubertThe program also generates soft links from the generic names 260*2b15cb3dSCy Schubertto the respective files. 261*2b15cb3dSCy SchubertIf run again, the program uses the same host key file, 262*2b15cb3dSCy Schubertbut generates a new certificate file and link. 263*2b15cb3dSCy Schubert.Pp 264*2b15cb3dSCy SchubertThe host key is used to encrypt the cookie when required and so must be RSA type. 265*2b15cb3dSCy SchubertBy default, the host key is also the sign key used to encrypt signatures. 266*2b15cb3dSCy SchubertWhen necessary, a different sign key can be specified and this can be 267*2b15cb3dSCy Schuberteither RSA or DSA type. 268*2b15cb3dSCy SchubertBy default, the message digest type is MD5, but any combination 269*2b15cb3dSCy Schubertof sign key type and message digest type supported by the OpenSSL library 270*2b15cb3dSCy Schubertcan be specified, including those using the MD2, MD5, SHA, SHA1, MDC2 271*2b15cb3dSCy Schubertand RIPE160 message digest algorithms. 272*2b15cb3dSCy SchubertHowever, the scheme specified in the certificate must be compatible 273*2b15cb3dSCy Schubertwith the sign key. 274*2b15cb3dSCy SchubertCertificates using any digest algorithm are compatible with RSA sign keys; 275*2b15cb3dSCy Schuberthowever, only SHA and SHA1 certificates are compatible with DSA sign keys. 276*2b15cb3dSCy Schubert.Pp 277*2b15cb3dSCy SchubertPrivate/public key files and certificates are compatible with 278*2b15cb3dSCy Schubertother OpenSSL applications and very likely other libraries as well. 279*2b15cb3dSCy SchubertCertificates or certificate requests derived from them should be compatible 280*2b15cb3dSCy Schubertwith extant industry practice, although some users might find 281*2b15cb3dSCy Schubertthe interpretation of X509v3 extension fields somewhat liberal. 282*2b15cb3dSCy SchubertHowever, the identification parameter files, although encoded 283*2b15cb3dSCy Schubertas the other files, are probably not compatible with anything other than Autokey. 284*2b15cb3dSCy Schubert.Pp 285*2b15cb3dSCy SchubertRunning the program as other than root and using the Unix 286*2b15cb3dSCy Schubert.Ic su 287*2b15cb3dSCy Schubertcommand 288*2b15cb3dSCy Schubertto assume root may not work properly, since by default the OpenSSL library 289*2b15cb3dSCy Schubertlooks for the random seed file 290*2b15cb3dSCy Schubert.Cm .rnd 291*2b15cb3dSCy Schubertin the user home directory. 292*2b15cb3dSCy SchubertHowever, there should be only one 293*2b15cb3dSCy Schubert.Cm .rnd , 294*2b15cb3dSCy Schubertmost conveniently 295*2b15cb3dSCy Schubertin the root directory, so it is convenient to define the 296*2b15cb3dSCy Schubert.Cm $RANDFILE 297*2b15cb3dSCy Schubertenvironment variable used by the OpenSSL library as the path to 298*2b15cb3dSCy Schubert.Cm /.rnd . 299*2b15cb3dSCy Schubert.Pp 300*2b15cb3dSCy SchubertInstalling the keys as root might not work in NFS\-mounted 301*2b15cb3dSCy Schubertshared file systems, as NFS clients may not be able to write 302*2b15cb3dSCy Schubertto the shared keys directory, even as root. 303*2b15cb3dSCy SchubertIn this case, NFS clients can specify the files in another 304*2b15cb3dSCy Schubertdirectory such as 305*2b15cb3dSCy Schubert.Pa /etc 306*2b15cb3dSCy Schubertusing the 307*2b15cb3dSCy Schubert.Ic keysdir 308*2b15cb3dSCy Schubertcommand. 309*2b15cb3dSCy SchubertThere is no need for one client to read the keys and certificates 310*2b15cb3dSCy Schubertof other clients or servers, as these data are obtained automatically 311*2b15cb3dSCy Schubertby the Autokey protocol. 312*2b15cb3dSCy Schubert.Pp 313*2b15cb3dSCy SchubertOrdinarily, cryptographic files are generated by the host that uses them, 314*2b15cb3dSCy Schubertbut it is possible for a trusted agent (TA) to generate these files 315*2b15cb3dSCy Schubertfor other hosts; however, in such cases files should always be encrypted. 316*2b15cb3dSCy SchubertThe subject name and trusted name default to the hostname 317*2b15cb3dSCy Schubertof the host generating the files, but can be changed by command line options. 318*2b15cb3dSCy SchubertIt is convenient to designate the owner name and trusted name 319*2b15cb3dSCy Schubertas the subject and issuer fields, respectively, of the certificate. 320*2b15cb3dSCy SchubertThe owner name is also used for the host and sign key files, 321*2b15cb3dSCy Schubertwhile the trusted name is used for the identity files. 322*2b15cb3dSCy Schubert.Pp 323*2b15cb3dSCy SchubertAll files are installed by default in the keys directory 324*2b15cb3dSCy Schubert.Pa /usr/local/etc , 325*2b15cb3dSCy Schubertwhich is normally in a shared filesystem 326*2b15cb3dSCy Schubertin NFS\-mounted networks. 327*2b15cb3dSCy SchubertThe actual location of the keys directory 328*2b15cb3dSCy Schubertand each file can be overridden by configuration commands, 329*2b15cb3dSCy Schubertbut this is not recommended. 330*2b15cb3dSCy SchubertNormally, the files for each host are generated by that host 331*2b15cb3dSCy Schubertand used only by that host, although exceptions exist 332*2b15cb3dSCy Schubertas noted later on this page. 333*2b15cb3dSCy Schubert.Pp 334*2b15cb3dSCy SchubertNormally, files containing private values, 335*2b15cb3dSCy Schubertincluding the host key, sign key and identification parameters, 336*2b15cb3dSCy Schubertare permitted root read/write\-only; 337*2b15cb3dSCy Schubertwhile others containing public values are permitted world readable. 338*2b15cb3dSCy SchubertAlternatively, files containing private values can be encrypted 339*2b15cb3dSCy Schubertand these files permitted world readable, 340*2b15cb3dSCy Schubertwhich simplifies maintenance in shared file systems. 341*2b15cb3dSCy SchubertSince uniqueness is insured by the hostname and 342*2b15cb3dSCy Schubertfile name extensions, the files for a NFS server and 343*2b15cb3dSCy Schubertdependent clients can all be installed in the same shared directory. 344*2b15cb3dSCy Schubert.Pp 345*2b15cb3dSCy SchubertThe recommended practice is to keep the file name extensions 346*2b15cb3dSCy Schubertwhen installing a file and to install a soft link 347*2b15cb3dSCy Schubertfrom the generic names specified elsewhere on this page 348*2b15cb3dSCy Schubertto the generated files. 349*2b15cb3dSCy SchubertThis allows new file generations to be activated simply 350*2b15cb3dSCy Schubertby changing the link. 351*2b15cb3dSCy SchubertIf a link is present, ntpd follows it to the file name 352*2b15cb3dSCy Schubertto extract the filestamp. 353*2b15cb3dSCy SchubertIf a link is not present, 354*2b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc 355*2b15cb3dSCy Schubertextracts the filestamp from the file itself. 356*2b15cb3dSCy SchubertThis allows clients to verify that the file and generation times 357*2b15cb3dSCy Schubertare always current. 358*2b15cb3dSCy SchubertThe 359*2b15cb3dSCy Schubert.Nm 360*2b15cb3dSCy Schubertprogram uses the same timestamp extension for all files generated 361*2b15cb3dSCy Schubertat one time, so each generation is distinct and can be readily 362*2b15cb3dSCy Schubertrecognized in monitoring data. 363*2b15cb3dSCy Schubert.Ss Running the program 364*2b15cb3dSCy SchubertThe safest way to run the 365*2b15cb3dSCy Schubert.Nm 366*2b15cb3dSCy Schubertprogram is logged in directly as root. 367*2b15cb3dSCy SchubertThe recommended procedure is change to the keys directory, 368*2b15cb3dSCy Schubertusually 369*2b15cb3dSCy Schubert.Pa /usr/local/etc , 370*2b15cb3dSCy Schubertthen run the program. 371*2b15cb3dSCy SchubertWhen run for the first time, 372*2b15cb3dSCy Schubertor if all 373*2b15cb3dSCy Schubert.Cm ntpkey 374*2b15cb3dSCy Schubertfiles have been removed, 375*2b15cb3dSCy Schubertthe program generates a RSA host key file and matching RSA\-MD5 certificate file, 376*2b15cb3dSCy Schubertwhich is all that is necessary in many cases. 377*2b15cb3dSCy SchubertThe program also generates soft links from the generic names 378*2b15cb3dSCy Schubertto the respective files. 379*2b15cb3dSCy SchubertIf run again, the program uses the same host key file, 380*2b15cb3dSCy Schubertbut generates a new certificate file and link. 381*2b15cb3dSCy Schubert.Pp 382*2b15cb3dSCy SchubertThe host key is used to encrypt the cookie when required and so must be RSA type. 383*2b15cb3dSCy SchubertBy default, the host key is also the sign key used to encrypt signatures. 384*2b15cb3dSCy SchubertWhen necessary, a different sign key can be specified and this can be 385*2b15cb3dSCy Schuberteither RSA or DSA type. 386*2b15cb3dSCy SchubertBy default, the message digest type is MD5, but any combination 387*2b15cb3dSCy Schubertof sign key type and message digest type supported by the OpenSSL library 388*2b15cb3dSCy Schubertcan be specified, including those using the MD2, MD5, SHA, SHA1, MDC2 389*2b15cb3dSCy Schubertand RIPE160 message digest algorithms. 390*2b15cb3dSCy SchubertHowever, the scheme specified in the certificate must be compatible 391*2b15cb3dSCy Schubertwith the sign key. 392*2b15cb3dSCy SchubertCertificates using any digest algorithm are compatible with RSA sign keys; 393*2b15cb3dSCy Schuberthowever, only SHA and SHA1 certificates are compatible with DSA sign keys. 394*2b15cb3dSCy Schubert.Pp 395*2b15cb3dSCy SchubertPrivate/public key files and certificates are compatible with 396*2b15cb3dSCy Schubertother OpenSSL applications and very likely other libraries as well. 397*2b15cb3dSCy SchubertCertificates or certificate requests derived from them should be compatible 398*2b15cb3dSCy Schubertwith extant industry practice, although some users might find 399*2b15cb3dSCy Schubertthe interpretation of X509v3 extension fields somewhat liberal. 400*2b15cb3dSCy SchubertHowever, the identification parameter files, although encoded 401*2b15cb3dSCy Schubertas the other files, are probably not compatible with anything other than Autokey. 402*2b15cb3dSCy Schubert.Pp 403*2b15cb3dSCy SchubertRunning the program as other than root and using the Unix 404*2b15cb3dSCy Schubert.Ic su 405*2b15cb3dSCy Schubertcommand 406*2b15cb3dSCy Schubertto assume root may not work properly, since by default the OpenSSL library 407*2b15cb3dSCy Schubertlooks for the random seed file 408*2b15cb3dSCy Schubert.Cm .rnd 409*2b15cb3dSCy Schubertin the user home directory. 410*2b15cb3dSCy SchubertHowever, there should be only one 411*2b15cb3dSCy Schubert.Cm .rnd , 412*2b15cb3dSCy Schubertmost conveniently 413*2b15cb3dSCy Schubertin the root directory, so it is convenient to define the 414*2b15cb3dSCy Schubert.Cm $RANDFILE 415*2b15cb3dSCy Schubertenvironment variable used by the OpenSSL library as the path to 416*2b15cb3dSCy Schubert.Cm /.rnd . 417*2b15cb3dSCy Schubert.Pp 418*2b15cb3dSCy SchubertInstalling the keys as root might not work in NFS\-mounted 419*2b15cb3dSCy Schubertshared file systems, as NFS clients may not be able to write 420*2b15cb3dSCy Schubertto the shared keys directory, even as root. 421*2b15cb3dSCy SchubertIn this case, NFS clients can specify the files in another 422*2b15cb3dSCy Schubertdirectory such as 423*2b15cb3dSCy Schubert.Pa /etc 424*2b15cb3dSCy Schubertusing the 425*2b15cb3dSCy Schubert.Ic keysdir 426*2b15cb3dSCy Schubertcommand. 427*2b15cb3dSCy SchubertThere is no need for one client to read the keys and certificates 428*2b15cb3dSCy Schubertof other clients or servers, as these data are obtained automatically 429*2b15cb3dSCy Schubertby the Autokey protocol. 430*2b15cb3dSCy Schubert.Pp 431*2b15cb3dSCy SchubertOrdinarily, cryptographic files are generated by the host that uses them, 432*2b15cb3dSCy Schubertbut it is possible for a trusted agent (TA) to generate these files 433*2b15cb3dSCy Schubertfor other hosts; however, in such cases files should always be encrypted. 434*2b15cb3dSCy SchubertThe subject name and trusted name default to the hostname 435*2b15cb3dSCy Schubertof the host generating the files, but can be changed by command line options. 436*2b15cb3dSCy SchubertIt is convenient to designate the owner name and trusted name 437*2b15cb3dSCy Schubertas the subject and issuer fields, respectively, of the certificate. 438*2b15cb3dSCy SchubertThe owner name is also used for the host and sign key files, 439*2b15cb3dSCy Schubertwhile the trusted name is used for the identity files. 440*2b15cb3dSCy Schubertseconds. 441*2b15cb3dSCy Schubertseconds. 442*2b15cb3dSCy Schuberts Trusted Hosts and Groups 443*2b15cb3dSCy SchubertEach cryptographic configuration involves selection of a signature scheme 444*2b15cb3dSCy Schubertand identification scheme, called a cryptotype, 445*2b15cb3dSCy Schubertas explained in the 446*2b15cb3dSCy Schubert.Sx Authentication Options 447*2b15cb3dSCy Schubertsection of 448*2b15cb3dSCy Schubert.Xr ntp.conf 5 . 449*2b15cb3dSCy SchubertThe default cryptotype uses RSA encryption, MD5 message digest 450*2b15cb3dSCy Schubertand TC identification. 451*2b15cb3dSCy SchubertFirst, configure a NTP subnet including one or more low\-stratum 452*2b15cb3dSCy Schuberttrusted hosts from which all other hosts derive synchronization 453*2b15cb3dSCy Schubertdirectly or indirectly. 454*2b15cb3dSCy SchubertTrusted hosts have trusted certificates; 455*2b15cb3dSCy Schubertall other hosts have nontrusted certificates. 456*2b15cb3dSCy SchubertThese hosts will automatically and dynamically build authoritative 457*2b15cb3dSCy Schubertcertificate trails to one or more trusted hosts. 458*2b15cb3dSCy SchubertA trusted group is the set of all hosts that have, directly or indirectly, 459*2b15cb3dSCy Schuberta certificate trail ending at a trusted host. 460*2b15cb3dSCy SchubertThe trail is defined by static configuration file entries 461*2b15cb3dSCy Schubertor dynamic means described on the 462*2b15cb3dSCy Schubert.Sx Automatic NTP Configuration Options 463*2b15cb3dSCy Schubertsection of 464*2b15cb3dSCy Schubert.Xr ntp.conf 5 . 465*2b15cb3dSCy Schubert.Pp 466*2b15cb3dSCy SchubertOn each trusted host as root, change to the keys directory. 467*2b15cb3dSCy SchubertTo insure a fresh fileset, remove all 468*2b15cb3dSCy Schubert.Cm ntpkey 469*2b15cb3dSCy Schubertfiles. 470*2b15cb3dSCy SchubertThen run 471*2b15cb3dSCy Schubert.Nm 472*2b15cb3dSCy Schubert.Fl T 473*2b15cb3dSCy Schubertto generate keys and a trusted certificate. 474*2b15cb3dSCy SchubertOn all other hosts do the same, but leave off the 475*2b15cb3dSCy Schubert.Fl T 476*2b15cb3dSCy Schubertflag to generate keys and nontrusted certificates. 477*2b15cb3dSCy SchubertWhen complete, start the NTP daemons beginning at the lowest stratum 478*2b15cb3dSCy Schubertand working up the tree. 479*2b15cb3dSCy SchubertIt may take some time for Autokey to instantiate the certificate trails 480*2b15cb3dSCy Schubertthroughout the subnet, but setting up the environment is completely automatic. 481*2b15cb3dSCy Schubert.Pp 482*2b15cb3dSCy SchubertIf it is necessary to use a different sign key or different digest/signature 483*2b15cb3dSCy Schubertscheme than the default, run 484*2b15cb3dSCy Schubert.Nm 485*2b15cb3dSCy Schubertwith the 486*2b15cb3dSCy Schubert.Fl S Ar type 487*2b15cb3dSCy Schubertoption, where 488*2b15cb3dSCy Schubert.Ar type 489*2b15cb3dSCy Schubertis either 490*2b15cb3dSCy Schubert.Cm RSA 491*2b15cb3dSCy Schubertor 492*2b15cb3dSCy Schubert.Cm DSA . 493*2b15cb3dSCy SchubertThe most often need to do this is when a DSA\-signed certificate is used. 494*2b15cb3dSCy SchubertIf it is necessary to use a different certificate scheme than the default, 495*2b15cb3dSCy Schubertrun 496*2b15cb3dSCy Schubert.Nm 497*2b15cb3dSCy Schubertwith the 498*2b15cb3dSCy Schubert.Fl c Ar scheme 499*2b15cb3dSCy Schubertoption and selected 500*2b15cb3dSCy Schubert.Ar scheme 501*2b15cb3dSCy Schubertas needed. 502*2b15cb3dSCy Schubertf 503*2b15cb3dSCy Schubert.Nm 504*2b15cb3dSCy Schubertis run again without these options, it generates a new certificate 505*2b15cb3dSCy Schubertusing the same scheme and sign key. 506*2b15cb3dSCy Schubert.Pp 507*2b15cb3dSCy SchubertAfter setting up the environment it is advisable to update certificates 508*2b15cb3dSCy Schubertfrom time to time, if only to extend the validity interval. 509*2b15cb3dSCy SchubertSimply run 510*2b15cb3dSCy Schubert.Nm 511*2b15cb3dSCy Schubertwith the same flags as before to generate new certificates 512*2b15cb3dSCy Schubertusing existing keys. 513*2b15cb3dSCy SchubertHowever, if the host or sign key is changed, 514*2b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc 515*2b15cb3dSCy Schubertshould be restarted. 516*2b15cb3dSCy SchubertWhen 517*2b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc 518*2b15cb3dSCy Schubertis restarted, it loads any new files and restarts the protocol. 519*2b15cb3dSCy SchubertOther dependent hosts will continue as usual until signatures are refreshed, 520*2b15cb3dSCy Schubertat which time the protocol is restarted. 521*2b15cb3dSCy Schubert.Ss Identity Schemes 522*2b15cb3dSCy SchubertAs mentioned on the Autonomous Authentication page, 523*2b15cb3dSCy Schubertthe default TC identity scheme is vulnerable to a middleman attack. 524*2b15cb3dSCy SchubertHowever, there are more secure identity schemes available, 525*2b15cb3dSCy Schubertincluding PC, IFF, GQ and MV described on the 526*2b15cb3dSCy Schubert.Qq Identification Schemes 527*2b15cb3dSCy Schubertpage 528*2b15cb3dSCy Schubert(maybe available at 529*2b15cb3dSCy Schubert.Li http://www.eecis.udel.edu/%7emills/keygen.html ) . 530*2b15cb3dSCy SchubertThese schemes are based on a TA, one or more trusted hosts 531*2b15cb3dSCy Schubertand some number of nontrusted hosts. 532*2b15cb3dSCy SchubertTrusted hosts prove identity using values provided by the TA, 533*2b15cb3dSCy Schubertwhile the remaining hosts prove identity using values provided 534*2b15cb3dSCy Schubertby a trusted host and certificate trails that end on that host. 535*2b15cb3dSCy SchubertThe name of a trusted host is also the name of its sugroup 536*2b15cb3dSCy Schubertand also the subject and issuer name on its trusted certificate. 537*2b15cb3dSCy SchubertThe TA is not necessarily a trusted host in this sense, but often is. 538*2b15cb3dSCy Schubert.Pp 539*2b15cb3dSCy SchubertIn some schemes there are separate keys for servers and clients. 540*2b15cb3dSCy SchubertA server can also be a client of another server, 541*2b15cb3dSCy Schubertbut a client can never be a server for another client. 542*2b15cb3dSCy SchubertIn general, trusted hosts and nontrusted hosts that operate 543*2b15cb3dSCy Schubertas both server and client have parameter files that contain 544*2b15cb3dSCy Schubertboth server and client keys. 545*2b15cb3dSCy SchubertHosts that operate 546*2b15cb3dSCy Schubertonly as clients have key files that contain only client keys. 547*2b15cb3dSCy Schubert.Pp 548*2b15cb3dSCy SchubertThe PC scheme supports only one trusted host in the group. 549*2b15cb3dSCy SchubertOn trusted host alice run 550*2b15cb3dSCy Schubert.Nm 551*2b15cb3dSCy Schubert.Fl P 552*2b15cb3dSCy Schubert.Fl p Ar password 553*2b15cb3dSCy Schubertto generate the host key file 554*2b15cb3dSCy Schubert.Pa ntpkey_RSAkey_ Ns Ar alice.filestamp 555*2b15cb3dSCy Schubertand trusted private certificate file 556*2b15cb3dSCy Schubert.Pa ntpkey_RSA\-MD5_cert_ Ns Ar alice.filestamp . 557*2b15cb3dSCy SchubertCopy both files to all group hosts; 558*2b15cb3dSCy Schubertthey replace the files which would be generated in other schemes. 559*2b15cb3dSCy SchubertOn each host bob install a soft link from the generic name 560*2b15cb3dSCy Schubert.Pa ntpkey_host_ Ns Ar bob 561*2b15cb3dSCy Schubertto the host key file and soft link 562*2b15cb3dSCy Schubert.Pa ntpkey_cert_ Ns Ar bob 563*2b15cb3dSCy Schubertto the private certificate file. 564*2b15cb3dSCy SchubertNote the generic links are on bob, but point to files generated 565*2b15cb3dSCy Schubertby trusted host alice. 566*2b15cb3dSCy SchubertIn this scheme it is not possible to refresh 567*2b15cb3dSCy Schuberteither the keys or certificates without copying them 568*2b15cb3dSCy Schubertto all other hosts in the group. 569*2b15cb3dSCy Schubert.Pp 570*2b15cb3dSCy SchubertFor the IFF scheme proceed as in the TC scheme to generate keys 571*2b15cb3dSCy Schubertand certificates for all group hosts, then for every trusted host in the group, 572*2b15cb3dSCy Schubertgenerate the IFF parameter file. 573*2b15cb3dSCy SchubertOn trusted host alice run 574*2b15cb3dSCy Schubert.Nm 575*2b15cb3dSCy Schubert.Fl T 576*2b15cb3dSCy Schubert.Fl I 577*2b15cb3dSCy Schubert.Fl p Ar password 578*2b15cb3dSCy Schubertto produce her parameter file 579*2b15cb3dSCy Schubert.Pa ntpkey_IFFpar_ Ns Ar alice.filestamp , 580*2b15cb3dSCy Schubertwhich includes both server and client keys. 581*2b15cb3dSCy SchubertCopy this file to all group hosts that operate as both servers 582*2b15cb3dSCy Schubertand clients and install a soft link from the generic 583*2b15cb3dSCy Schubert.Pa ntpkey_iff_ Ns Ar alice 584*2b15cb3dSCy Schubertto this file. 585*2b15cb3dSCy SchubertIf there are no hosts restricted to operate only as clients, 586*2b15cb3dSCy Schubertthere is nothing further to do. 587*2b15cb3dSCy SchubertAs the IFF scheme is independent 588*2b15cb3dSCy Schubertof keys and certificates, these files can be refreshed as needed. 589*2b15cb3dSCy Schubert.Pp 590*2b15cb3dSCy SchubertIf a rogue client has the parameter file, it could masquerade 591*2b15cb3dSCy Schubertas a legitimate server and present a middleman threat. 592*2b15cb3dSCy SchubertTo eliminate this threat, the client keys can be extracted 593*2b15cb3dSCy Schubertfrom the parameter file and distributed to all restricted clients. 594*2b15cb3dSCy SchubertAfter generating the parameter file, on alice run 595*2b15cb3dSCy Schubert.Nm 596*2b15cb3dSCy Schubert.Fl e 597*2b15cb3dSCy Schubertand pipe the output to a file or mail program. 598*2b15cb3dSCy SchubertCopy or mail this file to all restricted clients. 599*2b15cb3dSCy SchubertOn these clients install a soft link from the generic 600*2b15cb3dSCy Schubert.Pa ntpkey_iff_ Ns Ar alice 601*2b15cb3dSCy Schubertto this file. 602*2b15cb3dSCy SchubertTo further protect the integrity of the keys, 603*2b15cb3dSCy Schuberteach file can be encrypted with a secret password. 604*2b15cb3dSCy Schubert.Pp 605*2b15cb3dSCy SchubertFor the GQ scheme proceed as in the TC scheme to generate keys 606*2b15cb3dSCy Schubertand certificates for all group hosts, then for every trusted host 607*2b15cb3dSCy Schubertin the group, generate the IFF parameter file. 608*2b15cb3dSCy SchubertOn trusted host alice run 609*2b15cb3dSCy Schubert.Nm 610*2b15cb3dSCy Schubert.Fl T 611*2b15cb3dSCy Schubert.Fl G 612*2b15cb3dSCy Schubert.Fl p Ar password 613*2b15cb3dSCy Schubertto produce her parameter file 614*2b15cb3dSCy Schubert.Pa ntpkey_GQpar_ Ns Ar alice.filestamp , 615*2b15cb3dSCy Schubertwhich includes both server and client keys. 616*2b15cb3dSCy SchubertCopy this file to all group hosts and install a soft link 617*2b15cb3dSCy Schubertfrom the generic 618*2b15cb3dSCy Schubert.Pa ntpkey_gq_ Ns Ar alice 619*2b15cb3dSCy Schubertto this file. 620*2b15cb3dSCy SchubertIn addition, on each host bob install a soft link 621*2b15cb3dSCy Schubertfrom generic 622*2b15cb3dSCy Schubert.Pa ntpkey_gq_ Ns Ar bob 623*2b15cb3dSCy Schubertto this file. 624*2b15cb3dSCy SchubertAs the GQ scheme updates the GQ parameters file and certificate 625*2b15cb3dSCy Schubertat the same time, keys and certificates can be regenerated as needed. 626*2b15cb3dSCy Schubert.Pp 627*2b15cb3dSCy SchubertFor the MV scheme, proceed as in the TC scheme to generate keys 628*2b15cb3dSCy Schubertand certificates for all group hosts. 629*2b15cb3dSCy SchubertFor illustration assume trish is the TA, alice one of several trusted hosts 630*2b15cb3dSCy Schubertand bob one of her clients. 631*2b15cb3dSCy SchubertOn TA trish run 632*2b15cb3dSCy Schubert.Nm 633*2b15cb3dSCy Schubert.Fl V Ar n 634*2b15cb3dSCy Schubert.Fl p Ar password , 635*2b15cb3dSCy Schubertwhere 636*2b15cb3dSCy Schubert.Ar n 637*2b15cb3dSCy Schubertis the number of revokable keys (typically 5) to produce 638*2b15cb3dSCy Schubertthe parameter file 639*2b15cb3dSCy Schubert.Pa ntpkeys_MVpar_ Ns Ar trish.filestamp 640*2b15cb3dSCy Schubertand client key files 641*2b15cb3dSCy Schubert.Pa ntpkeys_MVkeyd_ Ns Ar trish.filestamp 642*2b15cb3dSCy Schubertwhere 643*2b15cb3dSCy Schubert.Ar d 644*2b15cb3dSCy Schubertis the key number (0 \&< 645*2b15cb3dSCy Schubert.Ar d 646*2b15cb3dSCy Schubert\&< 647*2b15cb3dSCy Schubert.Ar n ) . 648*2b15cb3dSCy SchubertCopy the parameter file to alice and install a soft link 649*2b15cb3dSCy Schubertfrom the generic 650*2b15cb3dSCy Schubert.Pa ntpkey_mv_ Ns Ar alice 651*2b15cb3dSCy Schubertto this file. 652*2b15cb3dSCy SchubertCopy one of the client key files to alice for later distribution 653*2b15cb3dSCy Schubertto her clients. 654*2b15cb3dSCy SchubertIt doesn't matter which client key file goes to alice, 655*2b15cb3dSCy Schubertsince they all work the same way. 656*2b15cb3dSCy SchubertAlice copies the client key file to all of her cliens. 657*2b15cb3dSCy SchubertOn client bob install a soft link from generic 658*2b15cb3dSCy Schubert.Pa ntpkey_mvkey_ Ns Ar bob 659*2b15cb3dSCy Schubertto the client key file. 660*2b15cb3dSCy SchubertAs the MV scheme is independent of keys and certificates, 661*2b15cb3dSCy Schubertthese files can be refreshed as needed. 662*2b15cb3dSCy Schubert.Ss Command Line Options 663*2b15cb3dSCy Schubert.Bl -tag -width indent 664*2b15cb3dSCy Schubert.It Fl c Ar scheme 665*2b15cb3dSCy SchubertSelect certificate message digest/signature encryption scheme. 666*2b15cb3dSCy SchubertThe 667*2b15cb3dSCy Schubert.Ar scheme 668*2b15cb3dSCy Schubertcan be one of the following: 669*2b15cb3dSCy Schubert. Cm RSA\-MD2 , RSA\-MD5 , RSA\-SHA , RSA\-SHA1 , RSA\-MDC2 , RSA\-RIPEMD160 , DSA\-SHA , 670*2b15cb3dSCy Schubertor 671*2b15cb3dSCy Schubert.Cm DSA\-SHA1 . 672*2b15cb3dSCy SchubertNote that RSA schemes must be used with a RSA sign key and DSA 673*2b15cb3dSCy Schubertschemes must be used with a DSA sign key. 674*2b15cb3dSCy SchubertThe default without this option is 675*2b15cb3dSCy Schubert.Cm RSA\-MD5 . 676*2b15cb3dSCy Schubert.It Fl d 677*2b15cb3dSCy SchubertEnable debugging. 678*2b15cb3dSCy SchubertThis option displays the cryptographic data produced in eye\-friendly billboards. 679*2b15cb3dSCy Schubert.It Fl e 680*2b15cb3dSCy SchubertWrite the IFF client keys to the standard output. 681*2b15cb3dSCy SchubertThis is intended for automatic key distribution by mail. 682*2b15cb3dSCy Schubert.It Fl G 683*2b15cb3dSCy SchubertGenerate parameters and keys for the GQ identification scheme, 684*2b15cb3dSCy Schubertobsoleting any that may exist. 685*2b15cb3dSCy Schubert.It Fl g 686*2b15cb3dSCy SchubertGenerate keys for the GQ identification scheme 687*2b15cb3dSCy Schubertusing the existing GQ parameters. 688*2b15cb3dSCy SchubertIf the GQ parameters do not yet exist, create them first. 689*2b15cb3dSCy Schubert.It Fl H 690*2b15cb3dSCy SchubertGenerate new host keys, obsoleting any that may exist. 691*2b15cb3dSCy Schubert.It Fl I 692*2b15cb3dSCy SchubertGenerate parameters for the IFF identification scheme, 693*2b15cb3dSCy Schubertobsoleting any that may exist. 694*2b15cb3dSCy Schubert.It Fl i Ar name 695*2b15cb3dSCy SchubertSet the suject name to 696*2b15cb3dSCy Schubert.Ar name . 697*2b15cb3dSCy SchubertThis is used as the subject field in certificates 698*2b15cb3dSCy Schubertand in the file name for host and sign keys. 699*2b15cb3dSCy Schubert.It Fl M 700*2b15cb3dSCy SchubertGenerate MD5 keys, obsoleting any that may exist. 701*2b15cb3dSCy Schubert.It Fl P 702*2b15cb3dSCy SchubertGenerate a private certificate. 703*2b15cb3dSCy SchubertBy default, the program generates public certificates. 704*2b15cb3dSCy Schubert.It Fl p Ar password 705*2b15cb3dSCy SchubertEncrypt generated files containing private data with 706*2b15cb3dSCy Schubert.Ar password 707*2b15cb3dSCy Schubertand the DES\-CBC algorithm. 708*2b15cb3dSCy Schubert.It Fl q 709*2b15cb3dSCy SchubertSet the password for reading files to password. 710*2b15cb3dSCy Schubert.It Fl S Oo Cm RSA | DSA Oc 711*2b15cb3dSCy SchubertGenerate a new sign key of the designated type, 712*2b15cb3dSCy Schubertobsoleting any that may exist. 713*2b15cb3dSCy SchubertBy default, the program uses the host key as the sign key. 714*2b15cb3dSCy Schubert.It Fl s Ar name 715*2b15cb3dSCy SchubertSet the issuer name to 716*2b15cb3dSCy Schubert.Ar name . 717*2b15cb3dSCy SchubertThis is used for the issuer field in certificates 718*2b15cb3dSCy Schubertand in the file name for identity files. 719*2b15cb3dSCy Schubert.It Fl T 720*2b15cb3dSCy SchubertGenerate a trusted certificate. 721*2b15cb3dSCy SchubertBy default, the program generates a non\-trusted certificate. 722*2b15cb3dSCy Schubert.It Fl V Ar nkeys 723*2b15cb3dSCy SchubertGenerate parameters and keys for the Mu\-Varadharajan (MV) identification scheme. 724*2b15cb3dSCy Schubert.El 725*2b15cb3dSCy Schubert.Ss Random Seed File 726*2b15cb3dSCy SchubertAll cryptographically sound key generation schemes must have means 727*2b15cb3dSCy Schubertto randomize the entropy seed used to initialize 728*2b15cb3dSCy Schubertthe internal pseudo\-random number generator used 729*2b15cb3dSCy Schubertby the library routines. 730*2b15cb3dSCy SchubertThe OpenSSL library uses a designated random seed file for this purpose. 731*2b15cb3dSCy SchubertThe file must be available when starting the NTP daemon and 732*2b15cb3dSCy Schubert.Nm 733*2b15cb3dSCy Schubertprogram. 734*2b15cb3dSCy SchubertIf a site supports OpenSSL or its companion OpenSSH, 735*2b15cb3dSCy Schubertit is very likely that means to do this are already available. 736*2b15cb3dSCy Schubert.Pp 737*2b15cb3dSCy SchubertIt is important to understand that entropy must be evolved 738*2b15cb3dSCy Schubertfor each generation, for otherwise the random number sequence 739*2b15cb3dSCy Schubertwould be predictable. 740*2b15cb3dSCy SchubertVarious means dependent on external events, such as keystroke intervals, 741*2b15cb3dSCy Schubertcan be used to do this and some systems have built\-in entropy sources. 742*2b15cb3dSCy SchubertSuitable means are described in the OpenSSL software documentation, 743*2b15cb3dSCy Schubertbut are outside the scope of this page. 744*2b15cb3dSCy Schubert.Pp 745*2b15cb3dSCy SchubertThe entropy seed used by the OpenSSL library is contained in a file, 746*2b15cb3dSCy Schubertusually called 747*2b15cb3dSCy Schubert.Cm .rnd , 748*2b15cb3dSCy Schubertwhich must be available when starting the NTP daemon 749*2b15cb3dSCy Schubertor the 750*2b15cb3dSCy Schubert.Nm 751*2b15cb3dSCy Schubertprogram. 752*2b15cb3dSCy SchubertThe NTP daemon will first look for the file 753*2b15cb3dSCy Schubertusing the path specified by the 754*2b15cb3dSCy Schubert.Ic randfile 755*2b15cb3dSCy Schubertsubcommand of the 756*2b15cb3dSCy Schubert.Ic crypto 757*2b15cb3dSCy Schubertconfiguration command. 758*2b15cb3dSCy SchubertIf not specified in this way, or when starting the 759*2b15cb3dSCy Schubert.Nm 760*2b15cb3dSCy Schubertprogram, 761*2b15cb3dSCy Schubertthe OpenSSL library will look for the file using the path specified 762*2b15cb3dSCy Schubertby the 763*2b15cb3dSCy Schubert.Ev RANDFILE 764*2b15cb3dSCy Schubertenvironment variable in the user home directory, 765*2b15cb3dSCy Schubertwhether root or some other user. 766*2b15cb3dSCy SchubertIf the 767*2b15cb3dSCy Schubert.Ev RANDFILE 768*2b15cb3dSCy Schubertenvironment variable is not present, 769*2b15cb3dSCy Schubertthe library will look for the 770*2b15cb3dSCy Schubert.Cm .rnd 771*2b15cb3dSCy Schubertfile in the user home directory. 772*2b15cb3dSCy SchubertIf the file is not available or cannot be written, 773*2b15cb3dSCy Schubertthe daemon exits with a message to the system log and the program 774*2b15cb3dSCy Schubertexits with a suitable error message. 775*2b15cb3dSCy Schubert.Ss Cryptographic Data Files 776*2b15cb3dSCy SchubertAll other file formats begin with two lines. 777*2b15cb3dSCy SchubertThe first contains the file name, including the generated host name 778*2b15cb3dSCy Schubertand filestamp. 779*2b15cb3dSCy SchubertThe second contains the datestamp in conventional Unix date format. 780*2b15cb3dSCy SchubertLines beginning with # are considered comments and ignored by the 781*2b15cb3dSCy Schubert.Nm 782*2b15cb3dSCy Schubertprogram and 783*2b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc 784*2b15cb3dSCy Schubertdaemon. 785*2b15cb3dSCy SchubertCryptographic values are encoded first using ASN.1 rules, 786*2b15cb3dSCy Schubertthen encrypted if necessary, and finally written PEM\-encoded 787*2b15cb3dSCy Schubertprintable ASCII format preceded and followed by MIME content identifier lines. 788*2b15cb3dSCy Schubert.Pp 789*2b15cb3dSCy SchubertThe format of the symmetric keys file is somewhat different 790*2b15cb3dSCy Schubertthan the other files in the interest of backward compatibility. 791*2b15cb3dSCy SchubertSince DES\-CBC is deprecated in NTPv4, the only key format of interest 792*2b15cb3dSCy Schubertis MD5 alphanumeric strings. 793*2b15cb3dSCy SchubertFollowing hte heard the keys are 794*2b15cb3dSCy Schubertentered one per line in the format 795*2b15cb3dSCy Schubert.D1 Ar keyno type key 796*2b15cb3dSCy Schubertwhere 797*2b15cb3dSCy Schubert.Ar keyno 798*2b15cb3dSCy Schubertis a positive integer in the range 1\-65,535, 799*2b15cb3dSCy Schubert.Ar type 800*2b15cb3dSCy Schubertis the string MD5 defining the key format and 801*2b15cb3dSCy Schubert.Ar key 802*2b15cb3dSCy Schubertis the key itself, 803*2b15cb3dSCy Schubertwhich is a printable ASCII string 16 characters or less in length. 804*2b15cb3dSCy SchubertEach character is chosen from the 93 printable characters 805*2b15cb3dSCy Schubertin the range 0x21 through 0x7f excluding space and the 806*2b15cb3dSCy Schubert.Ql # 807*2b15cb3dSCy Schubertcharacter. 808*2b15cb3dSCy Schubert.Pp 809*2b15cb3dSCy SchubertNote that the keys used by the 810*2b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc 811*2b15cb3dSCy Schubertand 812*2b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc 813*2b15cb3dSCy Schubertprograms 814*2b15cb3dSCy Schubertare checked against passwords requested by the programs 815*2b15cb3dSCy Schubertand entered by hand, so it is generally appropriate to specify these keys 816*2b15cb3dSCy Schubertin human readable ASCII format. 817*2b15cb3dSCy Schubert.Pp 818*2b15cb3dSCy SchubertThe 819*2b15cb3dSCy Schubert.Nm 820*2b15cb3dSCy Schubertprogram generates a MD5 symmetric keys file 821*2b15cb3dSCy Schubert.Pa ntpkey_MD5key_ Ns Ar hostname.filestamp . 822*2b15cb3dSCy SchubertSince the file contains private shared keys, 823*2b15cb3dSCy Schubertit should be visible only to root and distributed by secure means 824*2b15cb3dSCy Schubertto other subnet hosts. 825*2b15cb3dSCy SchubertThe NTP daemon loads the file 826*2b15cb3dSCy Schubert.Pa ntp.keys , 827*2b15cb3dSCy Schubertso 828*2b15cb3dSCy Schubert.Nm 829*2b15cb3dSCy Schubertinstalls a soft link from this name to the generated file. 830*2b15cb3dSCy SchubertSubsequently, similar soft links must be installed by manual 831*2b15cb3dSCy Schubertor automated means on the other subnet hosts. 832*2b15cb3dSCy SchubertWhile this file is not used with the Autokey Version 2 protocol, 833*2b15cb3dSCy Schubertit is needed to authenticate some remote configuration commands 834*2b15cb3dSCy Schubertused by the 835*2b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc 836*2b15cb3dSCy Schubertand 837*2b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc 838*2b15cb3dSCy Schubertutilities. 839*2b15cb3dSCy Schubert.Sh "OPTIONS" 840*2b15cb3dSCy Schubert.Bl -tag 841*2b15cb3dSCy Schubert.It Fl b Ar imbits , Fl \-imbits Ns = Ns Ar imbits 842*2b15cb3dSCy Schubertidentity modulus bits. 843*2b15cb3dSCy SchubertThis option takes an integer number as its argument. 844*2b15cb3dSCy SchubertThe value of 845*2b15cb3dSCy Schubert.Ar imbits 846*2b15cb3dSCy Schubertis constrained to being: 847*2b15cb3dSCy Schubert.in +4 848*2b15cb3dSCy Schubert.nf 849*2b15cb3dSCy Schubert.na 850*2b15cb3dSCy Schubertin the range 256 through 2048 851*2b15cb3dSCy Schubert.fi 852*2b15cb3dSCy Schubert.in -4 853*2b15cb3dSCy Schubert.sp 854*2b15cb3dSCy SchubertThe number of bits in the identity modulus. The default is 256. 855*2b15cb3dSCy Schubert.It Fl c Ar scheme , Fl \-certificate Ns = Ns Ar scheme 856*2b15cb3dSCy Schubertcertificate scheme. 857*2b15cb3dSCy Schubert.sp 858*2b15cb3dSCy Schubertscheme is one of 859*2b15cb3dSCy SchubertRSA\-MD2, RSA\-MD5, RSA\-SHA, RSA\-SHA1, RSA\-MDC2, RSA\-RIPEMD160, 860*2b15cb3dSCy SchubertDSA\-SHA, or DSA\-SHA1. 861*2b15cb3dSCy Schubert.sp 862*2b15cb3dSCy SchubertSelect the certificate message digest/signature encryption scheme. 863*2b15cb3dSCy SchubertNote that RSA schemes must be used with a RSA sign key and DSA 864*2b15cb3dSCy Schubertschemes must be used with a DSA sign key. The default without 865*2b15cb3dSCy Schubertthis option is RSA\-MD5. 866*2b15cb3dSCy Schubert.It Fl C Ar cipher , Fl \-cipher Ns = Ns Ar cipher 867*2b15cb3dSCy Schubertprivatekey cipher. 868*2b15cb3dSCy Schubert.sp 869*2b15cb3dSCy SchubertSelect the cipher which is used to encrypt the files containing 870*2b15cb3dSCy Schubertprivate keys. The default is three\-key triple DES in CBC mode, 871*2b15cb3dSCy Schubertequivalent to "@code{\-C des\-ede3\-cbc". The openssl tool lists ciphers 872*2b15cb3dSCy Schubertavailable in "\fBopenssl \-h\fP" output. 873*2b15cb3dSCy Schubert.It Fl d , Fl \-debug\-level 874*2b15cb3dSCy SchubertIncrease debug verbosity level. 875*2b15cb3dSCy SchubertThis option may appear an unlimited number of times. 876*2b15cb3dSCy Schubert.sp 877*2b15cb3dSCy Schubert.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number 878*2b15cb3dSCy SchubertSet the debug verbosity level. 879*2b15cb3dSCy SchubertThis option may appear an unlimited number of times. 880*2b15cb3dSCy SchubertThis option takes an integer number as its argument. 881*2b15cb3dSCy Schubert.sp 882*2b15cb3dSCy Schubert.It Fl e , Fl \-id\-key 883*2b15cb3dSCy SchubertWrite IFF or GQ identity keys. 884*2b15cb3dSCy Schubert.sp 885*2b15cb3dSCy SchubertWrite the IFF or GQ client keys to the standard output. This is 886*2b15cb3dSCy Schubertintended for automatic key distribution by mail. 887*2b15cb3dSCy Schubert.It Fl G , Fl \-gq\-params 888*2b15cb3dSCy SchubertGenerate GQ parameters and keys. 889*2b15cb3dSCy Schubert.sp 890*2b15cb3dSCy SchubertGenerate parameters and keys for the GQ identification scheme, 891*2b15cb3dSCy Schubertobsoleting any that may exist. 892*2b15cb3dSCy Schubert.It Fl H , Fl \-host\-key 893*2b15cb3dSCy Schubertgenerate RSA host key. 894*2b15cb3dSCy Schubert.sp 895*2b15cb3dSCy SchubertGenerate new host keys, obsoleting any that may exist. 896*2b15cb3dSCy Schubert.It Fl I , Fl \-iffkey 897*2b15cb3dSCy Schubertgenerate IFF parameters. 898*2b15cb3dSCy Schubert.sp 899*2b15cb3dSCy SchubertGenerate parameters for the IFF identification scheme, obsoleting 900*2b15cb3dSCy Schubertany that may exist. 901*2b15cb3dSCy Schubert.It Fl i Ar group , Fl \-ident Ns = Ns Ar group 902*2b15cb3dSCy Schubertset Autokey group name. 903*2b15cb3dSCy Schubert.sp 904*2b15cb3dSCy SchubertSet the optional Autokey group name to name. This is used in 905*2b15cb3dSCy Schubertthe file name of IFF, GQ, and MV client parameters files. In 906*2b15cb3dSCy Schubertthat role, the default is the host name if this option is not 907*2b15cb3dSCy Schubertprovided. The group name, if specified using \fB\-i/\-\-ident\fP or 908*2b15cb3dSCy Schubertusing \fB\-s/\-\-subject\-name\fP following an '\fB@\fP' character, 909*2b15cb3dSCy Schubertis also a part of the self\-signed host certificate's subject and 910*2b15cb3dSCy Schubertissuer names in the form \fBhost@group\fP and should match the 911*2b15cb3dSCy Schubert\'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in 912*2b15cb3dSCy Schubert\fBntpd\fP's configuration file. 913*2b15cb3dSCy Schubert.It Fl l Ar lifetime , Fl \-lifetime Ns = Ns Ar lifetime 914*2b15cb3dSCy Schubertset certificate lifetime. 915*2b15cb3dSCy SchubertThis option takes an integer number as its argument. 916*2b15cb3dSCy Schubert.sp 917*2b15cb3dSCy SchubertSet the certificate expiration to lifetime days from now. 918*2b15cb3dSCy Schubert.It Fl M , Fl \-md5key 919*2b15cb3dSCy Schubertgenerate MD5 keys. 920*2b15cb3dSCy Schubert.sp 921*2b15cb3dSCy SchubertGenerate MD5 keys, obsoleting any that may exist. 922*2b15cb3dSCy Schubert.It Fl m Ar modulus , Fl \-modulus Ns = Ns Ar modulus 923*2b15cb3dSCy Schubertmodulus. 924*2b15cb3dSCy SchubertThis option takes an integer number as its argument. 925*2b15cb3dSCy SchubertThe value of 926*2b15cb3dSCy Schubert.Ar modulus 927*2b15cb3dSCy Schubertis constrained to being: 928*2b15cb3dSCy Schubert.in +4 929*2b15cb3dSCy Schubert.nf 930*2b15cb3dSCy Schubert.na 931*2b15cb3dSCy Schubertin the range 256 through 2048 932*2b15cb3dSCy Schubert.fi 933*2b15cb3dSCy Schubert.in -4 934*2b15cb3dSCy Schubert.sp 935*2b15cb3dSCy SchubertThe number of bits in the prime modulus. The default is 512. 936*2b15cb3dSCy Schubert.It Fl P , Fl \-pvt\-cert 937*2b15cb3dSCy Schubertgenerate PC private certificate. 938*2b15cb3dSCy Schubert.sp 939*2b15cb3dSCy SchubertGenerate a private certificate. By default, the program generates 940*2b15cb3dSCy Schubertpublic certificates. 941*2b15cb3dSCy Schubert.It Fl p Ar passwd , Fl \-password Ns = Ns Ar passwd 942*2b15cb3dSCy Schubertlocal private password. 943*2b15cb3dSCy Schubert.sp 944*2b15cb3dSCy SchubertLocal files containing private data are encrypted with the 945*2b15cb3dSCy SchubertDES\-CBC algorithm and the specified password. The same password 946*2b15cb3dSCy Schubertmust be specified to the local ntpd via the "crypto pw password" 947*2b15cb3dSCy Schubertconfiguration command. The default password is the local 948*2b15cb3dSCy Schuberthostname. 949*2b15cb3dSCy Schubert.It Fl q Ar passwd , Fl \-export\-passwd Ns = Ns Ar passwd 950*2b15cb3dSCy Schubertexport IFF or GQ group keys with password. 951*2b15cb3dSCy Schubert.sp 952*2b15cb3dSCy SchubertExport IFF or GQ identity group keys to the standard output, 953*2b15cb3dSCy Schubertencrypted with the DES\-CBC algorithm and the specified password. 954*2b15cb3dSCy SchubertThe same password must be specified to the remote ntpd via the 955*2b15cb3dSCy Schubert"crypto pw password" configuration command. See also the option 956*2b15cb3dSCy Schubert-\-id\-key (\-e) for unencrypted exports. 957*2b15cb3dSCy Schubert.It Fl S Ar sign , Fl \-sign\-key Ns = Ns Ar sign 958*2b15cb3dSCy Schubertgenerate sign key (RSA or DSA). 959*2b15cb3dSCy Schubert.sp 960*2b15cb3dSCy SchubertGenerate a new sign key of the designated type, obsoleting any 961*2b15cb3dSCy Schubertthat may exist. By default, the program uses the host key as the 962*2b15cb3dSCy Schubertsign key. 963*2b15cb3dSCy Schubert.It Fl s Ar host@group , Fl \-subject\-name Ns = Ns Ar host@group 964*2b15cb3dSCy Schubertset host and optionally group name. 965*2b15cb3dSCy Schubert.sp 966*2b15cb3dSCy SchubertSet the Autokey host name, and optionally, group name specified 967*2b15cb3dSCy Schubertfollowing an '\fB@\fP' character. The host name is used in the file 968*2b15cb3dSCy Schubertname of generated host and signing certificates, without the 969*2b15cb3dSCy Schubertgroup name. The host name, and if provided, group name are used 970*2b15cb3dSCy Schubertin \fBhost@group\fP form for the host certificate's subject and issuer 971*2b15cb3dSCy Schubertfields. Specifying '\fB\-s @group\fP' is allowed, and results in 972*2b15cb3dSCy Schubertleaving the host name unchanged while appending \fB@group\fP to the 973*2b15cb3dSCy Schubertsubject and issuer fields, as with \fB\-i group\fP. The group name, or 974*2b15cb3dSCy Schubertif not provided, the host name are also used in the file names 975*2b15cb3dSCy Schubertof IFF, GQ, and MV client parameter files. 976*2b15cb3dSCy Schubert.It Fl T , Fl \-trusted\-cert 977*2b15cb3dSCy Schuberttrusted certificate (TC scheme). 978*2b15cb3dSCy Schubert.sp 979*2b15cb3dSCy SchubertGenerate a trusted certificate. By default, the program generates 980*2b15cb3dSCy Schuberta non\-trusted certificate. 981*2b15cb3dSCy Schubert.It Fl V Ar num , Fl \-mv\-params Ns = Ns Ar num 982*2b15cb3dSCy Schubertgenerate <num> MV parameters. 983*2b15cb3dSCy SchubertThis option takes an integer number as its argument. 984*2b15cb3dSCy Schubert.sp 985*2b15cb3dSCy SchubertGenerate parameters and keys for the Mu\-Varadharajan (MV) 986*2b15cb3dSCy Schubertidentification scheme. 987*2b15cb3dSCy Schubert.It Fl v Ar num , Fl \-mv\-keys Ns = Ns Ar num 988*2b15cb3dSCy Schubertupdate <num> MV keys. 989*2b15cb3dSCy SchubertThis option takes an integer number as its argument. 990*2b15cb3dSCy Schubert.sp 991*2b15cb3dSCy SchubertThis option has not been fully documented. 992*2b15cb3dSCy Schubert.It Fl \&? , Fl \-help 993*2b15cb3dSCy SchubertDisplay usage information and exit. 994*2b15cb3dSCy Schubert.It Fl \&! , Fl \-more\-help 995*2b15cb3dSCy SchubertPass the extended usage information through a pager. 996*2b15cb3dSCy Schubert.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc 997*2b15cb3dSCy SchubertSave the option state to \fIcfgfile\fP. The default is the \fIlast\fP 998*2b15cb3dSCy Schubertconfiguration file listed in the \fBOPTION PRESETS\fP section, below. 999*2b15cb3dSCy SchubertThe command will exit after updating the config file. 1000*2b15cb3dSCy Schubert.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts 1001*2b15cb3dSCy SchubertLoad options from \fIcfgfile\fP. 1002*2b15cb3dSCy SchubertThe \fIno\-load\-opts\fP form will disable the loading 1003*2b15cb3dSCy Schubertof earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early, 1004*2b15cb3dSCy Schubertout of order. 1005*2b15cb3dSCy Schubert.It Fl \-version Op Brq Ar v|c|n 1006*2b15cb3dSCy SchubertOutput version of program and exit. The default mode is `v', a simple 1007*2b15cb3dSCy Schubertversion. The `c' mode will print copyright information and `n' will 1008*2b15cb3dSCy Schubertprint the full copyright notice. 1009*2b15cb3dSCy Schubert.El 1010*2b15cb3dSCy Schubert.Sh "OPTION PRESETS" 1011*2b15cb3dSCy SchubertAny option that is not marked as \fInot presettable\fP may be preset 1012*2b15cb3dSCy Schubertby loading values from configuration ("RC" or ".INI") file(s) and values from 1013*2b15cb3dSCy Schubertenvironment variables named: 1014*2b15cb3dSCy Schubert.nf 1015*2b15cb3dSCy Schubert \fBNTP_KEYGEN_<option\-name>\fP or \fBNTP_KEYGEN\fP 1016*2b15cb3dSCy Schubert.fi 1017*2b15cb3dSCy Schubert.ad 1018*2b15cb3dSCy SchubertThe environmental presets take precedence (are processed later than) 1019*2b15cb3dSCy Schubertthe configuration files. 1020*2b15cb3dSCy SchubertThe \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP". 1021*2b15cb3dSCy SchubertIf any of these are directories, then the file \fI.ntprc\fP 1022*2b15cb3dSCy Schubertis searched for within those directories. 1023*2b15cb3dSCy Schubert.Sh USAGE 1024*2b15cb3dSCy SchubertThe 1025*2b15cb3dSCy Schubert.Fl p Ar password 1026*2b15cb3dSCy Schubertoption specifies the write password and 1027*2b15cb3dSCy Schubert.Fl q Ar password 1028*2b15cb3dSCy Schubertoption the read password for previously encrypted files. 1029*2b15cb3dSCy SchubertThe 1030*2b15cb3dSCy Schubert.Nm 1031*2b15cb3dSCy Schubertprogram prompts for the password if it reads an encrypted file 1032*2b15cb3dSCy Schubertand the password is missing or incorrect. 1033*2b15cb3dSCy SchubertIf an encrypted file is read successfully and 1034*2b15cb3dSCy Schubertno write password is specified, the read password is used 1035*2b15cb3dSCy Schubertas the write password by default. 1036*2b15cb3dSCy Schubert.Sh "ENVIRONMENT" 1037*2b15cb3dSCy SchubertSee \fBOPTION PRESETS\fP for configuration environment variables. 1038*2b15cb3dSCy Schubert.Sh "FILES" 1039*2b15cb3dSCy SchubertSee \fBOPTION PRESETS\fP for configuration files. 1040*2b15cb3dSCy Schubert.Sh "EXIT STATUS" 1041*2b15cb3dSCy SchubertOne of the following exit values will be returned: 1042*2b15cb3dSCy Schubert.Bl -tag 1043*2b15cb3dSCy Schubert.It 0 " (EXIT_SUCCESS)" 1044*2b15cb3dSCy SchubertSuccessful program execution. 1045*2b15cb3dSCy Schubert.It 1 " (EXIT_FAILURE)" 1046*2b15cb3dSCy SchubertThe operation failed or the command syntax was not valid. 1047*2b15cb3dSCy Schubert.It 66 " (EX_NOINPUT)" 1048*2b15cb3dSCy SchubertA specified configuration file could not be loaded. 1049*2b15cb3dSCy Schubert.It 70 " (EX_SOFTWARE)" 1050*2b15cb3dSCy Schubertlibopts had an internal operational error. Please report 1051*2b15cb3dSCy Schubertit to autogen\-users@lists.sourceforge.net. Thank you. 1052*2b15cb3dSCy Schubert.El 1053*2b15cb3dSCy Schubert.Sh "AUTHORS" 1054*2b15cb3dSCy SchubertThe University of Delaware and Network Time Foundation 1055*2b15cb3dSCy Schubert.Sh "COPYRIGHT" 1056*2b15cb3dSCy SchubertCopyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved. 1057*2b15cb3dSCy SchubertThis program is released under the terms of the NTP license, <http://ntp.org/license>. 1058*2b15cb3dSCy Schubert.Sh BUGS 1059*2b15cb3dSCy SchubertIt can take quite a while to generate some cryptographic values, 1060*2b15cb3dSCy Schubertfrom one to several minutes with modern architectures 1061*2b15cb3dSCy Schubertsuch as UltraSPARC and up to tens of minutes to an hour 1062*2b15cb3dSCy Schubertwith older architectures such as SPARC IPC. 1063*2b15cb3dSCy Schubert.Pp 1064*2b15cb3dSCy SchubertPlease report bugs to http://bugs.ntp.org . 1065*2b15cb3dSCy Schubert.Pp 1066*2b15cb3dSCy SchubertPlease send bug reports to: http://bugs.ntp.org, bugs@ntp.org 1067*2b15cb3dSCy Schubert.Sh NOTES 1068*2b15cb3dSCy SchubertPortions of this document came from FreeBSD. 1069*2b15cb3dSCy Schubert.Pp 1070*2b15cb3dSCy SchubertThis manual page was \fIAutoGen\fP\-erated from the \fBntp\-keygen\fP 1071*2b15cb3dSCy Schubertoption definitions. 1072