1*09100258SXin LI.Dd February 27 2018 22b15cb3dSCy Schubert.Dt NTP_KEYGEN 1ntp-keygenmdoc User Commands 32b15cb3dSCy Schubert.Os 42b15cb3dSCy Schubert.\" EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.mdoc) 52b15cb3dSCy Schubert.\" 6*09100258SXin LI.\" It has been AutoGen-ed February 27, 2018 at 05:16:00 PM by AutoGen 5.18.5 72b15cb3dSCy Schubert.\" From the definitions ntp-keygen-opts.def 82b15cb3dSCy Schubert.\" and the template file agmdoc-cmd.tpl 92b15cb3dSCy Schubert.Sh NAME 102b15cb3dSCy Schubert.Nm ntp-keygen 112b15cb3dSCy Schubert.Nd Create a NTP host key 122b15cb3dSCy Schubert.Sh SYNOPSIS 132b15cb3dSCy Schubert.Nm 142b15cb3dSCy Schubert.\" Mixture of short (flag) options and long options 152b15cb3dSCy Schubert.Op Fl flags 162b15cb3dSCy Schubert.Op Fl flag Op Ar value 172b15cb3dSCy Schubert.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc 182b15cb3dSCy Schubert.Pp 192b15cb3dSCy SchubertAll arguments must be options. 202b15cb3dSCy Schubert.Pp 212b15cb3dSCy Schubert.Sh DESCRIPTION 222b15cb3dSCy SchubertThis program generates cryptographic data files used by the NTPv4 232b15cb3dSCy Schubertauthentication and identification schemes. 24*09100258SXin LIIt can generate message digest keys used in symmetric key cryptography and, 25*09100258SXin LIif the OpenSSL software library has been installed, it can generate host keys, 26*09100258SXin LIsigning keys, certificates, and identity keys and parameters used in Autokey 27*09100258SXin LIpublic key cryptography. 282b15cb3dSCy SchubertThese files are used for cookie encryption, 29*09100258SXin LIdigital signature, and challenge/response identification algorithms 302b15cb3dSCy Schubertcompatible with the Internet standard security infrastructure. 312b15cb3dSCy Schubert.Pp 32*09100258SXin LIThe message digest symmetric keys file is generated in a format 33*09100258SXin LIcompatible with NTPv3. 34*09100258SXin LIAll other files are in PEM\-encoded printable ASCII format, 35*09100258SXin LIso they can be embedded as MIME attachments in email to other sites 362b15cb3dSCy Schubertand certificate authorities. 372b15cb3dSCy SchubertBy default, files are not encrypted. 382b15cb3dSCy Schubert.Pp 39*09100258SXin LIWhen used to generate message digest symmetric keys, the program 40*09100258SXin LIproduces a file containing ten pseudo\-random printable ASCII strings 41*09100258SXin LIsuitable for the MD5 message digest algorithm included in the 42*09100258SXin LIdistribution. 432b15cb3dSCy SchubertIf the OpenSSL library is installed, it produces an additional ten 44*09100258SXin LIhex\-encoded random bit strings suitable for SHA1, AES\-128\-CMAC, and 45*09100258SXin LIother message digest algorithms. 46*09100258SXin LIThe message digest symmetric keys file must be distributed and stored 472b15cb3dSCy Schubertusing secure means beyond the scope of NTP itself. 482b15cb3dSCy SchubertBesides the keys used for ordinary NTP associations, additional keys 492b15cb3dSCy Schubertcan be defined as passwords for the 502b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc 512b15cb3dSCy Schubertand 522b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc 532b15cb3dSCy Schubertutility programs. 542b15cb3dSCy Schubert.Pp 552b15cb3dSCy SchubertThe remaining generated files are compatible with other OpenSSL 562b15cb3dSCy Schubertapplications and other Public Key Infrastructure (PKI) resources. 572b15cb3dSCy SchubertCertificates generated by this program are compatible with extant 582b15cb3dSCy Schubertindustry practice, although some users might find the interpretation of 592b15cb3dSCy SchubertX509v3 extension fields somewhat liberal. 602b15cb3dSCy SchubertHowever, the identity keys are probably not compatible with anything 612b15cb3dSCy Schubertother than Autokey. 622b15cb3dSCy Schubert.Pp 632b15cb3dSCy SchubertSome files used by this program are encrypted using a private password. 642b15cb3dSCy SchubertThe 652b15cb3dSCy Schubert.Fl p 66*09100258SXin LIoption specifies the read password for local encrypted files and the 672b15cb3dSCy Schubert.Fl q 68*09100258SXin LIoption the write password for encrypted files sent to remote sites. 692b15cb3dSCy SchubertIf no password is specified, the host name returned by the Unix 70*09100258SXin LI.Xr hostname 1 71*09100258SXin LIcommand, normally the DNS name of the host, is used as the the default read 72*09100258SXin LIpassword, for convenience. 73*09100258SXin LIThe 74*09100258SXin LI.Nm 75*09100258SXin LIprogram prompts for the password if it reads an encrypted file 76*09100258SXin LIand the password is missing or incorrect. 77*09100258SXin LIIf an encrypted file is read successfully and 78*09100258SXin LIno write password is specified, the read password is used 79*09100258SXin LIas the write password by default. 802b15cb3dSCy Schubert.Pp 812b15cb3dSCy SchubertThe 82*09100258SXin LI.Cm pw 832b15cb3dSCy Schubertoption of the 84*09100258SXin LI.Ic crypto 85*09100258SXin LI.Xr ntpd 1ntpdmdoc 862b15cb3dSCy Schubertconfiguration command specifies the read 872b15cb3dSCy Schubertpassword for previously encrypted local files. 88*09100258SXin LIThis must match the local read password used by this program. 892b15cb3dSCy SchubertIf not specified, the host name is used. 90*09100258SXin LIThus, if files are generated by this program without an explicit password, 912b15cb3dSCy Schubertthey can be read back by 92*09100258SXin LI.Xr ntpd 1ntpdmdoc 93*09100258SXin LIwithout specifying an explicit password but only on the same host. 94*09100258SXin LIIf the write password used for encryption is specified as the host name, 95*09100258SXin LIthese files can be read by that host with no explicit password. 962b15cb3dSCy Schubert.Pp 972b15cb3dSCy SchubertNormally, encrypted files for each host are generated by that host and 982b15cb3dSCy Schubertused only by that host, although exceptions exist as noted later on 992b15cb3dSCy Schubertthis page. 1002b15cb3dSCy SchubertThe symmetric keys file, normally called 101*09100258SXin LI.Pa ntp.keys , 1022b15cb3dSCy Schubertis usually installed in 1032b15cb3dSCy Schubert.Pa /etc . 1042b15cb3dSCy SchubertOther files and links are usually installed in 1052b15cb3dSCy Schubert.Pa /usr/local/etc , 1062b15cb3dSCy Schubertwhich is normally in a shared filesystem in 1072b15cb3dSCy SchubertNFS\-mounted networks and cannot be changed by shared clients. 108*09100258SXin LIIn these cases, NFS clients can specify the files in another 109*09100258SXin LIdirectory such as 110*09100258SXin LI.Pa /etc 111*09100258SXin LIusing the 112*09100258SXin LI.Ic keysdir 113*09100258SXin LI.Xr ntpd 1ntpdmdoc 114*09100258SXin LIconfiguration file command. 1152b15cb3dSCy Schubert.Pp 1162b15cb3dSCy SchubertThis program directs commentary and error messages to the standard 1172b15cb3dSCy Schuberterror stream 118*09100258SXin LI.Pa stderr 1192b15cb3dSCy Schubertand remote files to the standard output stream 120*09100258SXin LI.Pa stdout 1212b15cb3dSCy Schubertwhere they can be piped to other applications or redirected to files. 1222b15cb3dSCy SchubertThe names used for generated files and links all begin with the 1232b15cb3dSCy Schubertstring 124*09100258SXin LI.Pa ntpkey\&* 1252b15cb3dSCy Schubertand include the file type, generating host and filestamp, 1262b15cb3dSCy Schubertas described in the 127*09100258SXin LI.Sx "Cryptographic Data Files" 1282b15cb3dSCy Schubertsection below. 1292b15cb3dSCy Schubert.Ss Running the Program 130*09100258SXin LIThe safest way to run the 131*09100258SXin LI.Nm 132*09100258SXin LIprogram is logged in directly as root. 133*09100258SXin LIThe recommended procedure is change to the 134*09100258SXin LI.Ar keys 135*09100258SXin LIdirectory, usually 136*09100258SXin LI.Pa /usr/local/etc , 137*09100258SXin LIthen run the program. 138*09100258SXin LI.Pp 1392b15cb3dSCy SchubertTo test and gain experience with Autokey concepts, log in as root and 140*09100258SXin LIchange to the 141*09100258SXin LI.Ar keys 142*09100258SXin LIdirectory, usually 143*09100258SXin LI.Pa /usr/local/etc . 1442b15cb3dSCy SchubertWhen run for the first time, or if all files with names beginning with 145*09100258SXin LI.Pa ntpkey\&* 1462b15cb3dSCy Schuberthave been removed, use the 1472b15cb3dSCy Schubert.Nm 148*09100258SXin LIcommand without arguments to generate a default 149*09100258SXin LI.Cm RSA 150*09100258SXin LIhost key and matching 151*09100258SXin LI.Cm RSA\-MD5 152*09100258SXin LIcertificate file with expiration date one year hence, 153*09100258SXin LIwhich is all that is necessary in many cases. 154*09100258SXin LIThe program also generates soft links from the generic names 155*09100258SXin LIto the respective files. 1562b15cb3dSCy SchubertIf run again without options, the program uses the 157*09100258SXin LIexisting keys and parameters and generates a new certificate file with 158*09100258SXin LInew expiration date one year hence, and soft link. 159*09100258SXin LI.Pp 160*09100258SXin LIThe host key is used to encrypt the cookie when required and so must be 161*09100258SXin LI.Cm RSA 162*09100258SXin LItype. 163*09100258SXin LIBy default, the host key is also the sign key used to encrypt signatures. 164*09100258SXin LIWhen necessary, a different sign key can be specified and this can be 165*09100258SXin LIeither 166*09100258SXin LI.Cm RSA 167*09100258SXin LIor 168*09100258SXin LI.Cm DSA 169*09100258SXin LItype. 170*09100258SXin LIBy default, the message digest type is 171*09100258SXin LI.Cm MD5 , 172*09100258SXin LIbut any combination 173*09100258SXin LIof sign key type and message digest type supported by the OpenSSL library 174*09100258SXin LIcan be specified, including those using the 175*09100258SXin LI.Cm AES128CMAC , MD2 , MD5 , MDC2 , SHA , SHA1 176*09100258SXin LIand 177*09100258SXin LI.Cm RIPE160 178*09100258SXin LImessage digest algorithms. 179*09100258SXin LIHowever, the scheme specified in the certificate must be compatible 180*09100258SXin LIwith the sign key. 181*09100258SXin LICertificates using any digest algorithm are compatible with 182*09100258SXin LI.Cm RSA 183*09100258SXin LIsign keys; 184*09100258SXin LIhowever, only 185*09100258SXin LI.Cm SHA 186*09100258SXin LIand 187*09100258SXin LI.Cm SHA1 188*09100258SXin LIcertificates are compatible with 189*09100258SXin LI.Cm DSA 190*09100258SXin LIsign keys. 191*09100258SXin LI.Pp 192*09100258SXin LIPrivate/public key files and certificates are compatible with 193*09100258SXin LIother OpenSSL applications and very likely other libraries as well. 194*09100258SXin LICertificates or certificate requests derived from them should be compatible 195*09100258SXin LIwith extant industry practice, although some users might find 196*09100258SXin LIthe interpretation of X509v3 extension fields somewhat liberal. 197*09100258SXin LIHowever, the identification parameter files, although encoded 198*09100258SXin LIas the other files, are probably not compatible with anything other than Autokey. 199*09100258SXin LI.Pp 200*09100258SXin LIRunning the program as other than root and using the Unix 201*09100258SXin LI.Xr su 1 202*09100258SXin LIcommand 203*09100258SXin LIto assume root may not work properly, since by default the OpenSSL library 204*09100258SXin LIlooks for the random seed file 205*09100258SXin LI.Pa .rnd 206*09100258SXin LIin the user home directory. 207*09100258SXin LIHowever, there should be only one 208*09100258SXin LI.Pa .rnd , 209*09100258SXin LImost conveniently 210*09100258SXin LIin the root directory, so it is convenient to define the 211*09100258SXin LI.Ev RANDFILE 212*09100258SXin LIenvironment variable used by the OpenSSL library as the path to 213*09100258SXin LI.Pa .rnd . 214*09100258SXin LI.Pp 215*09100258SXin LIInstalling the keys as root might not work in NFS\-mounted 216*09100258SXin LIshared file systems, as NFS clients may not be able to write 217*09100258SXin LIto the shared keys directory, even as root. 218*09100258SXin LIIn this case, NFS clients can specify the files in another 219*09100258SXin LIdirectory such as 220*09100258SXin LI.Pa /etc 221*09100258SXin LIusing the 222*09100258SXin LI.Ic keysdir 223*09100258SXin LI.Xr ntpd 1ntpdmdoc 224*09100258SXin LIconfiguration file command. 225*09100258SXin LIThere is no need for one client to read the keys and certificates 226*09100258SXin LIof other clients or servers, as these data are obtained automatically 227*09100258SXin LIby the Autokey protocol. 228*09100258SXin LI.Pp 229*09100258SXin LIOrdinarily, cryptographic files are generated by the host that uses them, 230*09100258SXin LIbut it is possible for a trusted agent (TA) to generate these files 231*09100258SXin LIfor other hosts; however, in such cases files should always be encrypted. 232*09100258SXin LIThe subject name and trusted name default to the hostname 233*09100258SXin LIof the host generating the files, but can be changed by command line options. 234*09100258SXin LIIt is convenient to designate the owner name and trusted name 235*09100258SXin LIas the subject and issuer fields, respectively, of the certificate. 236*09100258SXin LIThe owner name is also used for the host and sign key files, 237*09100258SXin LIwhile the trusted name is used for the identity files. 238*09100258SXin LI.Pp 239*09100258SXin LIAll files are installed by default in the keys directory 240*09100258SXin LI.Pa /usr/local/etc , 241*09100258SXin LIwhich is normally in a shared filesystem 242*09100258SXin LIin NFS\-mounted networks. 243*09100258SXin LIThe actual location of the keys directory 244*09100258SXin LIand each file can be overridden by configuration commands, 245*09100258SXin LIbut this is not recommended. 246*09100258SXin LINormally, the files for each host are generated by that host 247*09100258SXin LIand used only by that host, although exceptions exist 248*09100258SXin LIas noted later on this page. 249*09100258SXin LI.Pp 250*09100258SXin LINormally, files containing private values, 251*09100258SXin LIincluding the host key, sign key and identification parameters, 252*09100258SXin LIare permitted root read/write\-only; 253*09100258SXin LIwhile others containing public values are permitted world readable. 254*09100258SXin LIAlternatively, files containing private values can be encrypted 255*09100258SXin LIand these files permitted world readable, 256*09100258SXin LIwhich simplifies maintenance in shared file systems. 257*09100258SXin LISince uniqueness is insured by the 258*09100258SXin LI.Ar hostname 259*09100258SXin LIand 260*09100258SXin LI.Ar filestamp 261*09100258SXin LIfile name extensions, the files for an NTP server and 262*09100258SXin LIdependent clients can all be installed in the same shared directory. 263*09100258SXin LI.Pp 264*09100258SXin LIThe recommended practice is to keep the file name extensions 265*09100258SXin LIwhen installing a file and to install a soft link 266*09100258SXin LIfrom the generic names specified elsewhere on this page 267*09100258SXin LIto the generated files. 268*09100258SXin LIThis allows new file generations to be activated simply 269*09100258SXin LIby changing the link. 270*09100258SXin LIIf a link is present, 271*09100258SXin LI.Xr ntpd 1ntpdmdoc 272*09100258SXin LIfollows it to the file name to extract the 273*09100258SXin LI.Ar filestamp . 274*09100258SXin LIIf a link is not present, 275*09100258SXin LI.Xr ntpd 1ntpdmdoc 276*09100258SXin LIextracts the 277*09100258SXin LI.Ar filestamp 278*09100258SXin LIfrom the file itself. 279*09100258SXin LIThis allows clients to verify that the file and generation times 280*09100258SXin LIare always current. 281*09100258SXin LIThe 282*09100258SXin LI.Nm 283*09100258SXin LIprogram uses the same 284*09100258SXin LI.Ar filestamp 285*09100258SXin LIextension for all files generated 286*09100258SXin LIat one time, so each generation is distinct and can be readily 287*09100258SXin LIrecognized in monitoring data. 2882b15cb3dSCy Schubert.Pp 2892b15cb3dSCy SchubertRun the command on as many hosts as necessary. 2902b15cb3dSCy SchubertDesignate one of them as the trusted host (TH) using 2912b15cb3dSCy Schubert.Nm 2922b15cb3dSCy Schubertwith the 2932b15cb3dSCy Schubert.Fl T 2942b15cb3dSCy Schubertoption and configure it to synchronize from reliable Internet servers. 2952b15cb3dSCy SchubertThen configure the other hosts to synchronize to the TH directly or 2962b15cb3dSCy Schubertindirectly. 2972b15cb3dSCy SchubertA certificate trail is created when Autokey asks the immediately 2982b15cb3dSCy Schubertascendant host towards the TH to sign its certificate, which is then 2992b15cb3dSCy Schubertprovided to the immediately descendant host on request. 3002b15cb3dSCy SchubertAll group hosts should have acyclic certificate trails ending on the TH. 3012b15cb3dSCy Schubert.Pp 3022b15cb3dSCy SchubertThe host key is used to encrypt the cookie when required and so must be 3032b15cb3dSCy SchubertRSA type. 3042b15cb3dSCy SchubertBy default, the host key is also the sign key used to encrypt 3052b15cb3dSCy Schubertsignatures. 3062b15cb3dSCy SchubertA different sign key can be assigned using the 3072b15cb3dSCy Schubert.Fl S 308*09100258SXin LIoption and this can be either 309*09100258SXin LI.Cm RSA 310*09100258SXin LIor 311*09100258SXin LI.Cm DSA 312*09100258SXin LItype. 3132b15cb3dSCy SchubertBy default, the signature 314*09100258SXin LImessage digest type is 315*09100258SXin LI.Cm MD5 , 316*09100258SXin LIbut any combination of sign key type and 3172b15cb3dSCy Schubertmessage digest type supported by the OpenSSL library can be specified 3182b15cb3dSCy Schubertusing the 3192b15cb3dSCy Schubert.Fl c 3202b15cb3dSCy Schubertoption. 321*09100258SXin LI.Pp 3222b15cb3dSCy SchubertThe rules say cryptographic media should be generated with proventic 3232b15cb3dSCy Schubertfilestamps, which means the host should already be synchronized before 3242b15cb3dSCy Schubertthis program is run. 3252b15cb3dSCy SchubertThis of course creates a chicken\-and\-egg problem 3262b15cb3dSCy Schubertwhen the host is started for the first time. 3272b15cb3dSCy SchubertAccordingly, the host time 3282b15cb3dSCy Schubertshould be set by some other means, such as eyeball\-and\-wristwatch, at 3292b15cb3dSCy Schubertleast so that the certificate lifetime is within the current year. 3302b15cb3dSCy SchubertAfter that and when the host is synchronized to a proventic source, the 3312b15cb3dSCy Schubertcertificate should be re\-generated. 3322b15cb3dSCy Schubert.Pp 3332b15cb3dSCy SchubertAdditional information on trusted groups and identity schemes is on the 3342b15cb3dSCy Schubert.Dq Autokey Public\-Key Authentication 3352b15cb3dSCy Schubertpage. 3362b15cb3dSCy Schubert.Pp 3372b15cb3dSCy SchubertFile names begin with the prefix 338*09100258SXin LI.Pa ntpkey Ns _ 339*09100258SXin LIand end with the suffix 340*09100258SXin LI.Pa _ Ns Ar hostname . Ar filestamp , 3412b15cb3dSCy Schubertwhere 3422b15cb3dSCy Schubert.Ar hostname 3432b15cb3dSCy Schubertis the owner name, usually the string returned 344*09100258SXin LIby the Unix 345*09100258SXin LI.Xr hostname 1 346*09100258SXin LIcommand, and 3472b15cb3dSCy Schubert.Ar filestamp 3482b15cb3dSCy Schubertis the NTP seconds when the file was generated, in decimal digits. 3492b15cb3dSCy SchubertThis both guarantees uniqueness and simplifies maintenance 3502b15cb3dSCy Schubertprocedures, since all files can be quickly removed 3512b15cb3dSCy Schubertby a 352*09100258SXin LI.Ic rm Pa ntpkey\&* 3532b15cb3dSCy Schubertcommand or all files generated 3542b15cb3dSCy Schubertat a specific time can be removed by a 355*09100258SXin LI.Ic rm Pa \&* Ns Ar filestamp 3562b15cb3dSCy Schubertcommand. 3572b15cb3dSCy SchubertTo further reduce the risk of misconfiguration, 3582b15cb3dSCy Schubertthe first two lines of a file contain the file name 3592b15cb3dSCy Schubertand generation date and time as comments. 360*09100258SXin LI.Ss Trusted Hosts and Groups 3612b15cb3dSCy SchubertEach cryptographic configuration involves selection of a signature scheme 3622b15cb3dSCy Schubertand identification scheme, called a cryptotype, 3632b15cb3dSCy Schubertas explained in the 3642b15cb3dSCy Schubert.Sx Authentication Options 3652b15cb3dSCy Schubertsection of 3662b15cb3dSCy Schubert.Xr ntp.conf 5 . 367*09100258SXin LIThe default cryptotype uses 368*09100258SXin LI.Cm RSA 369*09100258SXin LIencryption, 370*09100258SXin LI.Cm MD5 371*09100258SXin LImessage digest 372*09100258SXin LIand 373*09100258SXin LI.Cm TC 374*09100258SXin LIidentification. 3752b15cb3dSCy SchubertFirst, configure a NTP subnet including one or more low\-stratum 3762b15cb3dSCy Schuberttrusted hosts from which all other hosts derive synchronization 3772b15cb3dSCy Schubertdirectly or indirectly. 3782b15cb3dSCy SchubertTrusted hosts have trusted certificates; 3792b15cb3dSCy Schubertall other hosts have nontrusted certificates. 3802b15cb3dSCy SchubertThese hosts will automatically and dynamically build authoritative 3812b15cb3dSCy Schubertcertificate trails to one or more trusted hosts. 3822b15cb3dSCy SchubertA trusted group is the set of all hosts that have, directly or indirectly, 3832b15cb3dSCy Schuberta certificate trail ending at a trusted host. 3842b15cb3dSCy SchubertThe trail is defined by static configuration file entries 3852b15cb3dSCy Schubertor dynamic means described on the 3862b15cb3dSCy Schubert.Sx Automatic NTP Configuration Options 3872b15cb3dSCy Schubertsection of 3882b15cb3dSCy Schubert.Xr ntp.conf 5 . 3892b15cb3dSCy Schubert.Pp 3902b15cb3dSCy SchubertOn each trusted host as root, change to the keys directory. 3912b15cb3dSCy SchubertTo insure a fresh fileset, remove all 392*09100258SXin LI.Pa ntpkey 3932b15cb3dSCy Schubertfiles. 3942b15cb3dSCy SchubertThen run 3952b15cb3dSCy Schubert.Nm 3962b15cb3dSCy Schubert.Fl T 3972b15cb3dSCy Schubertto generate keys and a trusted certificate. 3982b15cb3dSCy SchubertOn all other hosts do the same, but leave off the 3992b15cb3dSCy Schubert.Fl T 4002b15cb3dSCy Schubertflag to generate keys and nontrusted certificates. 4012b15cb3dSCy SchubertWhen complete, start the NTP daemons beginning at the lowest stratum 4022b15cb3dSCy Schubertand working up the tree. 4032b15cb3dSCy SchubertIt may take some time for Autokey to instantiate the certificate trails 4042b15cb3dSCy Schubertthroughout the subnet, but setting up the environment is completely automatic. 4052b15cb3dSCy Schubert.Pp 4062b15cb3dSCy SchubertIf it is necessary to use a different sign key or different digest/signature 4072b15cb3dSCy Schubertscheme than the default, run 4082b15cb3dSCy Schubert.Nm 4092b15cb3dSCy Schubertwith the 4102b15cb3dSCy Schubert.Fl S Ar type 4112b15cb3dSCy Schubertoption, where 4122b15cb3dSCy Schubert.Ar type 4132b15cb3dSCy Schubertis either 4142b15cb3dSCy Schubert.Cm RSA 4152b15cb3dSCy Schubertor 4162b15cb3dSCy Schubert.Cm DSA . 417*09100258SXin LIThe most frequent need to do this is when a 418*09100258SXin LI.Cm DSA Ns \-signed 419*09100258SXin LIcertificate is used. 4202b15cb3dSCy SchubertIf it is necessary to use a different certificate scheme than the default, 4212b15cb3dSCy Schubertrun 4222b15cb3dSCy Schubert.Nm 4232b15cb3dSCy Schubertwith the 4242b15cb3dSCy Schubert.Fl c Ar scheme 4252b15cb3dSCy Schubertoption and selected 4262b15cb3dSCy Schubert.Ar scheme 4272b15cb3dSCy Schubertas needed. 428*09100258SXin LIIf 4292b15cb3dSCy Schubert.Nm 4302b15cb3dSCy Schubertis run again without these options, it generates a new certificate 431*09100258SXin LIusing the same scheme and sign key, and soft link. 4322b15cb3dSCy Schubert.Pp 4332b15cb3dSCy SchubertAfter setting up the environment it is advisable to update certificates 4342b15cb3dSCy Schubertfrom time to time, if only to extend the validity interval. 4352b15cb3dSCy SchubertSimply run 4362b15cb3dSCy Schubert.Nm 4372b15cb3dSCy Schubertwith the same flags as before to generate new certificates 438*09100258SXin LIusing existing keys, and soft links. 4392b15cb3dSCy SchubertHowever, if the host or sign key is changed, 4402b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc 4412b15cb3dSCy Schubertshould be restarted. 4422b15cb3dSCy SchubertWhen 4432b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc 4442b15cb3dSCy Schubertis restarted, it loads any new files and restarts the protocol. 4452b15cb3dSCy SchubertOther dependent hosts will continue as usual until signatures are refreshed, 4462b15cb3dSCy Schubertat which time the protocol is restarted. 4472b15cb3dSCy Schubert.Ss Identity Schemes 4482b15cb3dSCy SchubertAs mentioned on the Autonomous Authentication page, 449*09100258SXin LIthe default 450*09100258SXin LI.Cm TC 451*09100258SXin LIidentity scheme is vulnerable to a middleman attack. 4522b15cb3dSCy SchubertHowever, there are more secure identity schemes available, 453*09100258SXin LIincluding 454*09100258SXin LI.Cm PC , IFF , GQ 455*09100258SXin LIand 456*09100258SXin LI.Cm MV 457*09100258SXin LIschemes described below. 4582b15cb3dSCy SchubertThese schemes are based on a TA, one or more trusted hosts 4592b15cb3dSCy Schubertand some number of nontrusted hosts. 4602b15cb3dSCy SchubertTrusted hosts prove identity using values provided by the TA, 4612b15cb3dSCy Schubertwhile the remaining hosts prove identity using values provided 4622b15cb3dSCy Schubertby a trusted host and certificate trails that end on that host. 4632b15cb3dSCy SchubertThe name of a trusted host is also the name of its sugroup 4642b15cb3dSCy Schubertand also the subject and issuer name on its trusted certificate. 4652b15cb3dSCy SchubertThe TA is not necessarily a trusted host in this sense, but often is. 4662b15cb3dSCy Schubert.Pp 4672b15cb3dSCy SchubertIn some schemes there are separate keys for servers and clients. 4682b15cb3dSCy SchubertA server can also be a client of another server, 4692b15cb3dSCy Schubertbut a client can never be a server for another client. 4702b15cb3dSCy SchubertIn general, trusted hosts and nontrusted hosts that operate 4712b15cb3dSCy Schubertas both server and client have parameter files that contain 4722b15cb3dSCy Schubertboth server and client keys. 4732b15cb3dSCy SchubertHosts that operate 4742b15cb3dSCy Schubertonly as clients have key files that contain only client keys. 4752b15cb3dSCy Schubert.Pp 4762b15cb3dSCy SchubertThe PC scheme supports only one trusted host in the group. 4772b15cb3dSCy SchubertOn trusted host alice run 4782b15cb3dSCy Schubert.Nm 4792b15cb3dSCy Schubert.Fl P 4802b15cb3dSCy Schubert.Fl p Ar password 4812b15cb3dSCy Schubertto generate the host key file 482*09100258SXin LI.Pa ntpkey Ns _ Cm RSA Pa key_alice. Ar filestamp 4832b15cb3dSCy Schubertand trusted private certificate file 484*09100258SXin LI.Pa ntpkey Ns _ Cm RSA\-MD5 _ Pa cert_alice. Ar filestamp , 485*09100258SXin LIand soft links. 4862b15cb3dSCy SchubertCopy both files to all group hosts; 4872b15cb3dSCy Schubertthey replace the files which would be generated in other schemes. 488*09100258SXin LIOn each host 489*09100258SXin LI.Ar bob 490*09100258SXin LIinstall a soft link from the generic name 4912b15cb3dSCy Schubert.Pa ntpkey_host_ Ns Ar bob 4922b15cb3dSCy Schubertto the host key file and soft link 4932b15cb3dSCy Schubert.Pa ntpkey_cert_ Ns Ar bob 4942b15cb3dSCy Schubertto the private certificate file. 4952b15cb3dSCy SchubertNote the generic links are on bob, but point to files generated 4962b15cb3dSCy Schubertby trusted host alice. 4972b15cb3dSCy SchubertIn this scheme it is not possible to refresh 4982b15cb3dSCy Schuberteither the keys or certificates without copying them 499*09100258SXin LIto all other hosts in the group, and recreating the soft links. 5002b15cb3dSCy Schubert.Pp 501*09100258SXin LIFor the 502*09100258SXin LI.Cm IFF 503*09100258SXin LIscheme proceed as in the 504*09100258SXin LI.Cm TC 505*09100258SXin LIscheme to generate keys 5062b15cb3dSCy Schubertand certificates for all group hosts, then for every trusted host in the group, 507*09100258SXin LIgenerate the 508*09100258SXin LI.Cm IFF 509*09100258SXin LIparameter file. 5102b15cb3dSCy SchubertOn trusted host alice run 5112b15cb3dSCy Schubert.Nm 5122b15cb3dSCy Schubert.Fl T 5132b15cb3dSCy Schubert.Fl I 5142b15cb3dSCy Schubert.Fl p Ar password 5152b15cb3dSCy Schubertto produce her parameter file 516*09100258SXin LI.Pa ntpkey_IFFpar_alice. Ns Ar filestamp , 5172b15cb3dSCy Schubertwhich includes both server and client keys. 5182b15cb3dSCy SchubertCopy this file to all group hosts that operate as both servers 5192b15cb3dSCy Schubertand clients and install a soft link from the generic 520*09100258SXin LI.Pa ntpkey_iff_alice 5212b15cb3dSCy Schubertto this file. 5222b15cb3dSCy SchubertIf there are no hosts restricted to operate only as clients, 5232b15cb3dSCy Schubertthere is nothing further to do. 524*09100258SXin LIAs the 525*09100258SXin LI.Cm IFF 526*09100258SXin LIscheme is independent 5272b15cb3dSCy Schubertof keys and certificates, these files can be refreshed as needed. 5282b15cb3dSCy Schubert.Pp 5292b15cb3dSCy SchubertIf a rogue client has the parameter file, it could masquerade 5302b15cb3dSCy Schubertas a legitimate server and present a middleman threat. 5312b15cb3dSCy SchubertTo eliminate this threat, the client keys can be extracted 5322b15cb3dSCy Schubertfrom the parameter file and distributed to all restricted clients. 5332b15cb3dSCy SchubertAfter generating the parameter file, on alice run 5342b15cb3dSCy Schubert.Nm 5352b15cb3dSCy Schubert.Fl e 536*09100258SXin LIand pipe the output to a file or email program. 537*09100258SXin LICopy or email this file to all restricted clients. 5382b15cb3dSCy SchubertOn these clients install a soft link from the generic 539*09100258SXin LI.Pa ntpkey_iff_alice 5402b15cb3dSCy Schubertto this file. 5412b15cb3dSCy SchubertTo further protect the integrity of the keys, 5422b15cb3dSCy Schuberteach file can be encrypted with a secret password. 5432b15cb3dSCy Schubert.Pp 544*09100258SXin LIFor the 545*09100258SXin LI.Cm GQ 546*09100258SXin LIscheme proceed as in the 547*09100258SXin LI.Cm TC 548*09100258SXin LIscheme to generate keys 5492b15cb3dSCy Schubertand certificates for all group hosts, then for every trusted host 550*09100258SXin LIin the group, generate the 551*09100258SXin LI.Cm IFF 552*09100258SXin LIparameter file. 5532b15cb3dSCy SchubertOn trusted host alice run 5542b15cb3dSCy Schubert.Nm 5552b15cb3dSCy Schubert.Fl T 5562b15cb3dSCy Schubert.Fl G 5572b15cb3dSCy Schubert.Fl p Ar password 5582b15cb3dSCy Schubertto produce her parameter file 559*09100258SXin LI.Pa ntpkey_GQpar_alice. Ns Ar filestamp , 5602b15cb3dSCy Schubertwhich includes both server and client keys. 5612b15cb3dSCy SchubertCopy this file to all group hosts and install a soft link 5622b15cb3dSCy Schubertfrom the generic 563*09100258SXin LI.Pa ntpkey_gq_alice 5642b15cb3dSCy Schubertto this file. 565*09100258SXin LIIn addition, on each host 566*09100258SXin LI.Ar bob 567*09100258SXin LIinstall a soft link 5682b15cb3dSCy Schubertfrom generic 5692b15cb3dSCy Schubert.Pa ntpkey_gq_ Ns Ar bob 5702b15cb3dSCy Schubertto this file. 571*09100258SXin LIAs the 572*09100258SXin LI.Cm GQ 573*09100258SXin LIscheme updates the 574*09100258SXin LI.Cm GQ 575*09100258SXin LIparameters file and certificate 5762b15cb3dSCy Schubertat the same time, keys and certificates can be regenerated as needed. 5772b15cb3dSCy Schubert.Pp 578*09100258SXin LIFor the 579*09100258SXin LI.Cm MV 580*09100258SXin LIscheme, proceed as in the 581*09100258SXin LI.Cm TC 582*09100258SXin LIscheme to generate keys 5832b15cb3dSCy Schubertand certificates for all group hosts. 5842b15cb3dSCy SchubertFor illustration assume trish is the TA, alice one of several trusted hosts 5852b15cb3dSCy Schubertand bob one of her clients. 5862b15cb3dSCy SchubertOn TA trish run 5872b15cb3dSCy Schubert.Nm 5882b15cb3dSCy Schubert.Fl V Ar n 5892b15cb3dSCy Schubert.Fl p Ar password , 5902b15cb3dSCy Schubertwhere 5912b15cb3dSCy Schubert.Ar n 5922b15cb3dSCy Schubertis the number of revokable keys (typically 5) to produce 5932b15cb3dSCy Schubertthe parameter file 594*09100258SXin LI.Pa ntpkeys_MVpar_trish. Ns Ar filestamp 5952b15cb3dSCy Schubertand client key files 596*09100258SXin LI.Pa ntpkeys_MVkey Ns Ar d _ Pa trish. Ar filestamp 5972b15cb3dSCy Schubertwhere 5982b15cb3dSCy Schubert.Ar d 5992b15cb3dSCy Schubertis the key number (0 \&< 6002b15cb3dSCy Schubert.Ar d 6012b15cb3dSCy Schubert\&< 6022b15cb3dSCy Schubert.Ar n ) . 6032b15cb3dSCy SchubertCopy the parameter file to alice and install a soft link 6042b15cb3dSCy Schubertfrom the generic 605*09100258SXin LI.Pa ntpkey_mv_alice 6062b15cb3dSCy Schubertto this file. 6072b15cb3dSCy SchubertCopy one of the client key files to alice for later distribution 6082b15cb3dSCy Schubertto her clients. 609*09100258SXin LIIt does not matter which client key file goes to alice, 6102b15cb3dSCy Schubertsince they all work the same way. 611*09100258SXin LIAlice copies the client key file to all of her clients. 6122b15cb3dSCy SchubertOn client bob install a soft link from generic 613*09100258SXin LI.Pa ntpkey_mvkey_bob 6142b15cb3dSCy Schubertto the client key file. 615*09100258SXin LIAs the 616*09100258SXin LI.Cm MV 617*09100258SXin LIscheme is independent of keys and certificates, 6182b15cb3dSCy Schubertthese files can be refreshed as needed. 6192b15cb3dSCy Schubert.Ss Command Line Options 6202b15cb3dSCy Schubert.Bl -tag -width indent 621*09100258SXin LI.It Fl b Fl \-imbits Ns = Ar modulus 622*09100258SXin LISet the number of bits in the identity modulus for generating identity keys to 623*09100258SXin LI.Ar modulus 624*09100258SXin LIbits. 625*09100258SXin LIThe number of bits in the identity modulus defaults to 256, but can be set to 626*09100258SXin LIvalues from 256 to 2048 (32 to 256 octets). 627*09100258SXin LIUse the larger moduli with caution, as this can consume considerable computing 628*09100258SXin LIresources and increases the size of authenticated packets. 629*09100258SXin LI.It Fl c Fl \-certificate Ns = Ar scheme 630*09100258SXin LISelect certificate signature encryption/message digest scheme. 6312b15cb3dSCy SchubertThe 6322b15cb3dSCy Schubert.Ar scheme 6332b15cb3dSCy Schubertcan be one of the following: 634*09100258SXin LI.Cm RSA\-MD2 , RSA\-MD5 , RSA\-MDC2 , RSA\-SHA , RSA\-SHA1 , RSA\-RIPEMD160 , DSA\-SHA , 6352b15cb3dSCy Schubertor 6362b15cb3dSCy Schubert.Cm DSA\-SHA1 . 637*09100258SXin LINote that 638*09100258SXin LI.Cm RSA 639*09100258SXin LIschemes must be used with an 640*09100258SXin LI.Cm RSA 641*09100258SXin LIsign key and 642*09100258SXin LI.Cm DSA 643*09100258SXin LIschemes must be used with a 644*09100258SXin LI.Cm DSA 645*09100258SXin LIsign key. 6462b15cb3dSCy SchubertThe default without this option is 6472b15cb3dSCy Schubert.Cm RSA\-MD5 . 648*09100258SXin LIIf compatibility with FIPS 140\-2 is required, either the 649*09100258SXin LI.Cm DSA\-SHA 650*09100258SXin LIor 651*09100258SXin LI.Cm DSA\-SHA1 652*09100258SXin LIscheme must be used. 653*09100258SXin LI.It Fl C Fl \-cipher Ns = Ar cipher 654*09100258SXin LISelect the OpenSSL cipher to encrypt the files containing private keys. 655*09100258SXin LIThe default without this option is three\-key triple DES in CBC mode, 656*09100258SXin LI.Cm des\-ede3\-cbc . 657*09100258SXin LIThe 658*09100258SXin LI.Ic openssl Fl h 659*09100258SXin LIcommand provided with OpenSSL displays available ciphers. 660*09100258SXin LI.It Fl d Fl \-debug\-level 661*09100258SXin LIIncrease debugging verbosity level. 6622b15cb3dSCy SchubertThis option displays the cryptographic data produced in eye\-friendly billboards. 663*09100258SXin LI.It Fl D Fl \-set\-debug\-level Ns = Ar level 664*09100258SXin LISet the debugging verbosity to 665*09100258SXin LI.Ar level . 666*09100258SXin LIThis option displays the cryptographic data produced in eye\-friendly billboards. 667*09100258SXin LI.It Fl e Fl \-id\-key 668*09100258SXin LIWrite the 669*09100258SXin LI.Cm IFF 670*09100258SXin LIor 671*09100258SXin LI.Cm GQ 672*09100258SXin LIpublic parameters from the 673*09100258SXin LI.Ar IFFkey or GQkey 674*09100258SXin LIclient keys file previously specified 675*09100258SXin LIas unencrypted data to the standard output stream 676*09100258SXin LI.Pa stdout . 677*09100258SXin LIThis is intended for automatic key distribution by email. 678*09100258SXin LI.It Fl G Fl \-gq\-params 679*09100258SXin LIGenerate a new encrypted 680*09100258SXin LI.Cm GQ 681*09100258SXin LIparameters and key file for the Guillou\-Quisquater (GQ) identity scheme. 682*09100258SXin LIThis option is mutually exclusive with the 683*09100258SXin LI.Fl I 684*09100258SXin LIand 685*09100258SXin LI.Fl V 686*09100258SXin LIoptions. 687*09100258SXin LI.It Fl H Fl \-host\-key 688*09100258SXin LIGenerate a new encrypted 689*09100258SXin LI.Cm RSA 690*09100258SXin LIpublic/private host key file. 691*09100258SXin LI.It Fl I Fl \-iffkey 692*09100258SXin LIGenerate a new encrypted 693*09100258SXin LI.Cm IFF 694*09100258SXin LIkey file for the Schnorr (IFF) identity scheme. 695*09100258SXin LIThis option is mutually exclusive with the 696*09100258SXin LI.Fl G 697*09100258SXin LIand 698*09100258SXin LIFl V 699*09100258SXin LIoptions. 700*09100258SXin LI.It Fl i Fl \-ident Ns = Ar group 701*09100258SXin LISet the optional Autokey group name to 702*09100258SXin LI.Ar group . 703*09100258SXin LIThis is used in the identity scheme parameter file names of 704*09100258SXin LI.Cm IFF , GQ , 705*09100258SXin LIand 706*09100258SXin LI.Cm MV 707*09100258SXin LIclient parameters files. 708*09100258SXin LIIn that role, the default is the host name if no group is provided. 709*09100258SXin LIThe group name, if specified using 710*09100258SXin LI.Fl i 711*09100258SXin LIor 712*09100258SXin LI.Fl s 713*09100258SXin LIfollowing an 714*09100258SXin LI.Ql @ 715*09100258SXin LIcharacter, is also used in certificate subject and issuer names in the form 716*09100258SXin LI.Ar host @ group 717*09100258SXin LIand should match the group specified via 718*09100258SXin LI.Ic crypto Cm ident 719*09100258SXin LIor 720*09100258SXin LI.Ic server Cm ident 721*09100258SXin LIin the ntpd configuration file. 722*09100258SXin LI.It Fl l Fl \-lifetime Ns = Ar days 723*09100258SXin LISet the lifetime for certificate expiration to 724*09100258SXin LI.Ar days . 725*09100258SXin LIThe default lifetime is one year (365 days). 726*09100258SXin LI.It Fl m Fl \-modulus Ns = Ar bits 727*09100258SXin LISet the number of bits in the prime modulus for generating files to 728*09100258SXin LI.Ar bits . 729*09100258SXin LIThe modulus defaults to 512, but can be set from 256 to 2048 (32 to 256 octets). 730*09100258SXin LIUse the larger moduli with caution, as this can consume considerable computing 731*09100258SXin LIresources and increases the size of authenticated packets. 732*09100258SXin LI.It Fl M Fl \-md5key 733*09100258SXin LIGenerate a new symmetric keys file containing 10 734*09100258SXin LI.Cm MD5 735*09100258SXin LIkeys, and if OpenSSL is available, 10 736*09100258SXin LI.Cm SHA 737*09100258SXin LIkeys. 738*09100258SXin LIAn 739*09100258SXin LI.Cm MD5 740*09100258SXin LIkey is a string of 20 random printable ASCII characters, while a 741*09100258SXin LI.Cm SHA 742*09100258SXin LIkey is a string of 40 random hex digits. 743*09100258SXin LIThe file can be edited using a text editor to change the key type or key content. 744*09100258SXin LIThis option is mutually exclusive with all other options. 745*09100258SXin LI.It Fl p Fl \-password Ns = Ar passwd 746*09100258SXin LISet the password for reading and writing encrypted files to 747*09100258SXin LI.Ar passwd . 748*09100258SXin LIThese include the host, sign and identify key files. 749*09100258SXin LIBy default, the password is the string returned by the Unix 750*09100258SXin LI.Ic hostname 751*09100258SXin LIcommand. 752*09100258SXin LI.It Fl P Fl \-pvt\-cert 753*09100258SXin LIGenerate a new private certificate used by the 754*09100258SXin LI.Cm PC 755*09100258SXin LIidentity scheme. 7562b15cb3dSCy SchubertBy default, the program generates public certificates. 757*09100258SXin LINote: the PC identity scheme is not recommended for new installations. 758*09100258SXin LI.It Fl q Fl \-export\-passwd Ns = Ar passwd 759*09100258SXin LISet the password for writing encrypted 760*09100258SXin LI.Cm IFF , GQ and MV 761*09100258SXin LIidentity files redirected to 762*09100258SXin LI.Pa stdout 763*09100258SXin LIto 764*09100258SXin LI.Ar passwd . 765*09100258SXin LIIn effect, these files are decrypted with the 766*09100258SXin LI.Fl p 767*09100258SXin LIpassword, then encrypted with the 768*09100258SXin LI.Fl q 769*09100258SXin LIpassword. 770*09100258SXin LIBy default, the password is the string returned by the Unix 771*09100258SXin LI.Ic hostname 772*09100258SXin LIcommand. 773*09100258SXin LI.It Fl s Fl \-subject\-key Ns = Ar Oo host Oc Op @ Ar group 774*09100258SXin LISpecify the Autokey host name, where 775*09100258SXin LI.Ar host 776*09100258SXin LIis the optional host name and 777*09100258SXin LI.Ar group 778*09100258SXin LIis the optional group name. 779*09100258SXin LIThe host name, and if provided, group name are used in 780*09100258SXin LI.Ar host @ group 781*09100258SXin LIform as certificate subject and issuer. 782*09100258SXin LISpecifying 783*09100258SXin LI.Fl s @ Ar group 784*09100258SXin LIis allowed, and results in leaving the host name unchanged, as with 785*09100258SXin LI.Fl i Ar group . 786*09100258SXin LIThe group name, or if no group is provided, the host name are also used in the 787*09100258SXin LIfile names of 788*09100258SXin LI.Cm IFF , GQ , 789*09100258SXin LIand 790*09100258SXin LI.Cm MV 791*09100258SXin LIidentity scheme client parameter files. 792*09100258SXin LIIf 793*09100258SXin LI.Ar host 794*09100258SXin LIis not specified, the default host name is the string returned by the Unix 795*09100258SXin LI.Ic hostname 796*09100258SXin LIcommand. 797*09100258SXin LI.It Fl S Fl \-sign\-key Ns = Op Cm RSA | DSA 798*09100258SXin LIGenerate a new encrypted public/private sign key file of the specified type. 799*09100258SXin LIBy default, the sign key is the host key and has the same type. 800*09100258SXin LIIf compatibility with FIPS 140\-2 is required, the sign key type must be 801*09100258SXin LI.Cm DSA . 802*09100258SXin LI.It Fl T Fl \-trusted\-cert 8032b15cb3dSCy SchubertGenerate a trusted certificate. 8042b15cb3dSCy SchubertBy default, the program generates a non\-trusted certificate. 805*09100258SXin LI.It Fl V Fl \-mv\-params Ar nkeys 806*09100258SXin LIGenerate 807*09100258SXin LI.Ar nkeys 808*09100258SXin LIencrypted server keys and parameters for the Mu\-Varadharajan (MV) 809*09100258SXin LIidentity scheme. 810*09100258SXin LIThis option is mutually exclusive with the 811*09100258SXin LI.Fl I 812*09100258SXin LIand 813*09100258SXin LI.Fl G 814*09100258SXin LIoptions. 815*09100258SXin LINote: support for this option should be considered a work in progress. 8162b15cb3dSCy Schubert.El 8172b15cb3dSCy Schubert.Ss Random Seed File 8182b15cb3dSCy SchubertAll cryptographically sound key generation schemes must have means 8192b15cb3dSCy Schubertto randomize the entropy seed used to initialize 8202b15cb3dSCy Schubertthe internal pseudo\-random number generator used 8212b15cb3dSCy Schubertby the library routines. 8222b15cb3dSCy SchubertThe OpenSSL library uses a designated random seed file for this purpose. 8232b15cb3dSCy SchubertThe file must be available when starting the NTP daemon and 8242b15cb3dSCy Schubert.Nm 8252b15cb3dSCy Schubertprogram. 8262b15cb3dSCy SchubertIf a site supports OpenSSL or its companion OpenSSH, 8272b15cb3dSCy Schubertit is very likely that means to do this are already available. 8282b15cb3dSCy Schubert.Pp 8292b15cb3dSCy SchubertIt is important to understand that entropy must be evolved 8302b15cb3dSCy Schubertfor each generation, for otherwise the random number sequence 8312b15cb3dSCy Schubertwould be predictable. 8322b15cb3dSCy SchubertVarious means dependent on external events, such as keystroke intervals, 8332b15cb3dSCy Schubertcan be used to do this and some systems have built\-in entropy sources. 8342b15cb3dSCy SchubertSuitable means are described in the OpenSSL software documentation, 8352b15cb3dSCy Schubertbut are outside the scope of this page. 8362b15cb3dSCy Schubert.Pp 8372b15cb3dSCy SchubertThe entropy seed used by the OpenSSL library is contained in a file, 8382b15cb3dSCy Schubertusually called 839*09100258SXin LI.Pa .rnd , 8402b15cb3dSCy Schubertwhich must be available when starting the NTP daemon 8412b15cb3dSCy Schubertor the 8422b15cb3dSCy Schubert.Nm 8432b15cb3dSCy Schubertprogram. 8442b15cb3dSCy SchubertThe NTP daemon will first look for the file 8452b15cb3dSCy Schubertusing the path specified by the 846*09100258SXin LI.Cm randfile 8472b15cb3dSCy Schubertsubcommand of the 8482b15cb3dSCy Schubert.Ic crypto 8492b15cb3dSCy Schubertconfiguration command. 8502b15cb3dSCy SchubertIf not specified in this way, or when starting the 8512b15cb3dSCy Schubert.Nm 8522b15cb3dSCy Schubertprogram, 8532b15cb3dSCy Schubertthe OpenSSL library will look for the file using the path specified 8542b15cb3dSCy Schubertby the 8552b15cb3dSCy Schubert.Ev RANDFILE 8562b15cb3dSCy Schubertenvironment variable in the user home directory, 8572b15cb3dSCy Schubertwhether root or some other user. 8582b15cb3dSCy SchubertIf the 8592b15cb3dSCy Schubert.Ev RANDFILE 8602b15cb3dSCy Schubertenvironment variable is not present, 8612b15cb3dSCy Schubertthe library will look for the 862*09100258SXin LI.Pa .rnd 8632b15cb3dSCy Schubertfile in the user home directory. 864*09100258SXin LISince both the 865*09100258SXin LI.Nm 866*09100258SXin LIprogram and 867*09100258SXin LI.Xr ntpd 1ntpdmdoc 868*09100258SXin LIdaemon must run as root, the logical place to put this file is in 869*09100258SXin LI.Pa /.rnd 870*09100258SXin LIor 871*09100258SXin LI.Pa /root/.rnd . 8722b15cb3dSCy SchubertIf the file is not available or cannot be written, 8732b15cb3dSCy Schubertthe daemon exits with a message to the system log and the program 8742b15cb3dSCy Schubertexits with a suitable error message. 8752b15cb3dSCy Schubert.Ss Cryptographic Data Files 876*09100258SXin LIAll file formats begin with two nonencrypted lines. 877*09100258SXin LIThe first line contains the file name, including the generated host name 878*09100258SXin LIand filestamp, in the format 879*09100258SXin LI.Pa ntpkey_ Ns Ar key _ Ar name . Ar filestamp , 880*09100258SXin LIwhere 881*09100258SXin LI.Ar key 882*09100258SXin LIis the key or parameter type, 883*09100258SXin LI.Ar name 884*09100258SXin LIis the host or group name and 885*09100258SXin LI.Ar filestamp 886*09100258SXin LIis the filestamp (NTP seconds) when the file was created. 887*09100258SXin LIBy convention, 888*09100258SXin LI.Ar key 889*09100258SXin LInames in generated file names include both upper and lower case 890*09100258SXin LIcharacters, while 891*09100258SXin LI.Ar key 892*09100258SXin LInames in generated link names include only lower case characters. 893*09100258SXin LIThe filestamp is not used in generated link names. 894*09100258SXin LIThe second line contains the datestamp in conventional Unix 895*09100258SXin LI.Pa date 896*09100258SXin LIformat. 897*09100258SXin LILines beginning with 898*09100258SXin LI.Ql # 899*09100258SXin LIare considered comments and ignored by the 9002b15cb3dSCy Schubert.Nm 9012b15cb3dSCy Schubertprogram and 9022b15cb3dSCy Schubert.Xr ntpd 1ntpdmdoc 9032b15cb3dSCy Schubertdaemon. 9042b15cb3dSCy Schubert.Pp 905*09100258SXin LIThe remainder of the file contains cryptographic data, encoded first using ASN.1 906*09100258SXin LIrules, then encrypted if necessary, and finally written in PEM\-encoded 907*09100258SXin LIprintable ASCII text, preceded and followed by MIME content identifier lines. 908*09100258SXin LI.Pp 909*09100258SXin LIThe format of the symmetric keys file, ordinarily named 910*09100258SXin LI.Pa ntp.keys , 911*09100258SXin LIis somewhat different than the other files in the interest of backward compatibility. 912*09100258SXin LIOrdinarily, the file is generated by this program, but it can be constructed 913*09100258SXin LIand edited using an ordinary text editor. 914*09100258SXin LI.Bd -literal -unfilled -offset center 915*09100258SXin LI# ntpkey_MD5key_bk.ntp.org.3595864945 916*09100258SXin LI# Thu Dec 12 19:22:25 2013 917*09100258SXin LI1 MD5 L";Nw<\`.I<f4U0)247"i # MD5 key 918*09100258SXin LI2 MD5 &>l0%XXK9O'51VwV<xq~ # MD5 key 919*09100258SXin LI3 MD5 lb4zLW~d^!K:]RsD'qb6 # MD5 key 920*09100258SXin LI4 MD5 Yue:tL[+vR)M\`n~bY,'? # MD5 key 921*09100258SXin LI5 MD5 B;fx'Kgr/&4ZTbL6=RxA # MD5 key 922*09100258SXin LI6 MD5 4eYwa\`o}3i@@V@..R9!l # MD5 key 923*09100258SXin LI7 MD5 \`A.([h+;wTQ|xfi%Sn_! # MD5 key 924*09100258SXin LI8 MD5 45:V,r4]l6y^JH6"Sh?F # MD5 key 925*09100258SXin LI9 MD5 3\-5vcn*6l29DS?Xdsg)* # MD5 key 926*09100258SXin LI10 MD5 2late4Me # MD5 key 927*09100258SXin LI11 SHA1 a27872d3030a9025b8446c751b4551a7629af65c # SHA1 key 928*09100258SXin LI12 SHA1 21bc3b4865dbb9e920902abdccb3e04ff97a5e74 # SHA1 key 929*09100258SXin LI13 SHA1 2b7736fe24fef5ba85ae11594132ab5d6f6daba9 # SHA1 key 930*09100258SXin LI14 SHA a5332809c8878dd3a5b918819108a111509aeceb # SHA key 931*09100258SXin LI15 MD2 2fe16c88c760ff2f16d4267e36c1aa6c926e6964 # MD2 key 932*09100258SXin LI16 MD4 b2691811dc19cfc0e2f9bcacd74213f29812183d # MD4 key 933*09100258SXin LI17 MD5 e4d6735b8bdad58ec5ffcb087300a17f7fef1f7c # MD5 key 934*09100258SXin LI18 MDC2 a8d5e2315c025bf3a79174c87fbd10477de2eabc # MDC2 key 935*09100258SXin LI19 RIPEMD160 77ca332cafb30e3cafb174dcd5b80ded7ba9b3d2 # RIPEMD160 key 936*09100258SXin LI20 AES128CMAC f92ff73eee86c1e7dc638d6489a04e4e555af878 # AES128CMAC key 937*09100258SXin LI.Ed 938*09100258SXin LI.D1 Figure 1. Typical Symmetric Key File 939*09100258SXin LI.Pp 940*09100258SXin LIFigure 1 shows a typical symmetric keys file used by the reference 941*09100258SXin LIimplementation. 942*09100258SXin LIFollowing the header the keys are entered one per line in the format 943*09100258SXin LI.D1 Ar keyno Ar type Ar key 9442b15cb3dSCy Schubertwhere 9452b15cb3dSCy Schubert.Ar keyno 946*09100258SXin LIis a positive integer in the range 1\-65534; 9472b15cb3dSCy Schubert.Ar type 948*09100258SXin LIis the key type for the message digest algorithm, which in the absence of the 949*09100258SXin LIOpenSSL library must be 950*09100258SXin LI.Cm MD5 951*09100258SXin LIto designate the MD5 message digest algorithm; 952*09100258SXin LIif the OpenSSL library is installed, the key type can be any 953*09100258SXin LImessage digest algorithm supported by that library; 954*09100258SXin LIhowever, if compatibility with FIPS 140\-2 is required, 955*09100258SXin LIthe key type must be either 956*09100258SXin LI.Cm SHA 957*09100258SXin LIor 958*09100258SXin LI.Cm SHA1 ; 9592b15cb3dSCy Schubert.Ar key 9602b15cb3dSCy Schubertis the key itself, 961*09100258SXin LIwhich is a printable ASCII string 20 characters or less in length: 962*09100258SXin LIeach character is chosen from the 93 printable characters 963*09100258SXin LIin the range 0x21 through 0x7e ( 964*09100258SXin LI.Ql ! 965*09100258SXin LIthrough 966*09100258SXin LI.Ql ~ 967*09100258SXin LI\&) excluding space and the 968*09100258SXin LI.Ql # 969*09100258SXin LIcharacter, and terminated by whitespace or a 9702b15cb3dSCy Schubert.Ql # 9712b15cb3dSCy Schubertcharacter. 972*09100258SXin LIAn OpenSSL key consists of a hex\-encoded ASCII string of 40 characters, which 973*09100258SXin LIis truncated as necessary. 9742b15cb3dSCy Schubert.Pp 9752b15cb3dSCy SchubertNote that the keys used by the 9762b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc 9772b15cb3dSCy Schubertand 9782b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc 9792b15cb3dSCy Schubertprograms 9802b15cb3dSCy Schubertare checked against passwords requested by the programs 9812b15cb3dSCy Schubertand entered by hand, so it is generally appropriate to specify these keys 9822b15cb3dSCy Schubertin human readable ASCII format. 9832b15cb3dSCy Schubert.Pp 9842b15cb3dSCy SchubertThe 9852b15cb3dSCy Schubert.Nm 986*09100258SXin LIprogram generates a symmetric keys file 987*09100258SXin LI.Pa ntpkey_MD5key_ Ns Ar hostname Ns . Ns Ar filestamp . 9882b15cb3dSCy SchubertSince the file contains private shared keys, 9892b15cb3dSCy Schubertit should be visible only to root and distributed by secure means 9902b15cb3dSCy Schubertto other subnet hosts. 9912b15cb3dSCy SchubertThe NTP daemon loads the file 9922b15cb3dSCy Schubert.Pa ntp.keys , 9932b15cb3dSCy Schubertso 9942b15cb3dSCy Schubert.Nm 9952b15cb3dSCy Schubertinstalls a soft link from this name to the generated file. 9962b15cb3dSCy SchubertSubsequently, similar soft links must be installed by manual 9972b15cb3dSCy Schubertor automated means on the other subnet hosts. 9982b15cb3dSCy SchubertWhile this file is not used with the Autokey Version 2 protocol, 9992b15cb3dSCy Schubertit is needed to authenticate some remote configuration commands 10002b15cb3dSCy Schubertused by the 10012b15cb3dSCy Schubert.Xr ntpq 1ntpqmdoc 10022b15cb3dSCy Schubertand 10032b15cb3dSCy Schubert.Xr ntpdc 1ntpdcmdoc 10042b15cb3dSCy Schubertutilities. 10052b15cb3dSCy Schubert.Sh "OPTIONS" 10062b15cb3dSCy Schubert.Bl -tag 10072b15cb3dSCy Schubert.It Fl b Ar imbits , Fl \-imbits Ns = Ns Ar imbits 10082b15cb3dSCy Schubertidentity modulus bits. 10092b15cb3dSCy SchubertThis option takes an integer number as its argument. 10102b15cb3dSCy SchubertThe value of 10112b15cb3dSCy Schubert.Ar imbits 10122b15cb3dSCy Schubertis constrained to being: 10132b15cb3dSCy Schubert.in +4 10142b15cb3dSCy Schubert.nf 10152b15cb3dSCy Schubert.na 10162b15cb3dSCy Schubertin the range 256 through 2048 10172b15cb3dSCy Schubert.fi 10182b15cb3dSCy Schubert.in -4 10192b15cb3dSCy Schubert.sp 10202b15cb3dSCy SchubertThe number of bits in the identity modulus. The default is 256. 10212b15cb3dSCy Schubert.It Fl c Ar scheme , Fl \-certificate Ns = Ns Ar scheme 10222b15cb3dSCy Schubertcertificate scheme. 10232b15cb3dSCy Schubert.sp 10242b15cb3dSCy Schubertscheme is one of 1025*09100258SXin LIRSA\-MD2, RSA\-MD5, RSA\-MDC2, RSA\-SHA, RSA\-SHA1, RSA\-RIPEMD160, 10262b15cb3dSCy SchubertDSA\-SHA, or DSA\-SHA1. 10272b15cb3dSCy Schubert.sp 1028*09100258SXin LISelect the certificate signature encryption/message digest scheme. 10292b15cb3dSCy SchubertNote that RSA schemes must be used with a RSA sign key and DSA 10302b15cb3dSCy Schubertschemes must be used with a DSA sign key. The default without 10312b15cb3dSCy Schubertthis option is RSA\-MD5. 10322b15cb3dSCy Schubert.It Fl C Ar cipher , Fl \-cipher Ns = Ns Ar cipher 10332b15cb3dSCy Schubertprivatekey cipher. 10342b15cb3dSCy Schubert.sp 10352b15cb3dSCy SchubertSelect the cipher which is used to encrypt the files containing 10362b15cb3dSCy Schubertprivate keys. The default is three\-key triple DES in CBC mode, 1037*09100258SXin LIequivalent to "\fB\-C des\-ede3\-cbc\fP". The openssl tool lists ciphers 10382b15cb3dSCy Schubertavailable in "\fBopenssl \-h\fP" output. 10392b15cb3dSCy Schubert.It Fl d , Fl \-debug\-level 10402b15cb3dSCy SchubertIncrease debug verbosity level. 10412b15cb3dSCy SchubertThis option may appear an unlimited number of times. 10422b15cb3dSCy Schubert.sp 10432b15cb3dSCy Schubert.It Fl D Ar number , Fl \-set\-debug\-level Ns = Ns Ar number 10442b15cb3dSCy SchubertSet the debug verbosity level. 10452b15cb3dSCy SchubertThis option may appear an unlimited number of times. 10462b15cb3dSCy SchubertThis option takes an integer number as its argument. 10472b15cb3dSCy Schubert.sp 10482b15cb3dSCy Schubert.It Fl e , Fl \-id\-key 10492b15cb3dSCy SchubertWrite IFF or GQ identity keys. 10502b15cb3dSCy Schubert.sp 1051*09100258SXin LIWrite the public parameters from the IFF or GQ client keys to 1052*09100258SXin LIthe standard output. 1053*09100258SXin LIThis is intended for automatic key distribution by email. 10542b15cb3dSCy Schubert.It Fl G , Fl \-gq\-params 10552b15cb3dSCy SchubertGenerate GQ parameters and keys. 10562b15cb3dSCy Schubert.sp 10572b15cb3dSCy SchubertGenerate parameters and keys for the GQ identification scheme, 10582b15cb3dSCy Schubertobsoleting any that may exist. 10592b15cb3dSCy Schubert.It Fl H , Fl \-host\-key 10602b15cb3dSCy Schubertgenerate RSA host key. 10612b15cb3dSCy Schubert.sp 10622b15cb3dSCy SchubertGenerate new host keys, obsoleting any that may exist. 10632b15cb3dSCy Schubert.It Fl I , Fl \-iffkey 10642b15cb3dSCy Schubertgenerate IFF parameters. 10652b15cb3dSCy Schubert.sp 10662b15cb3dSCy SchubertGenerate parameters for the IFF identification scheme, obsoleting 10672b15cb3dSCy Schubertany that may exist. 10682b15cb3dSCy Schubert.It Fl i Ar group , Fl \-ident Ns = Ns Ar group 10692b15cb3dSCy Schubertset Autokey group name. 10702b15cb3dSCy Schubert.sp 10712b15cb3dSCy SchubertSet the optional Autokey group name to name. This is used in 10722b15cb3dSCy Schubertthe file name of IFF, GQ, and MV client parameters files. In 10732b15cb3dSCy Schubertthat role, the default is the host name if this option is not 10742b15cb3dSCy Schubertprovided. The group name, if specified using \fB\-i/\-\-ident\fP or 10752b15cb3dSCy Schubertusing \fB\-s/\-\-subject\-name\fP following an '\fB@\fP' character, 1076*09100258SXin LIis also a part of the self\-signed host certificate subject and 10772b15cb3dSCy Schubertissuer names in the form \fBhost@group\fP and should match the 1078*09100258SXin LI\'\fBcrypto ident\fP' or '\fBserver ident\fP' configuration in the 1079*09100258SXin LI\fBntpd\fP configuration file. 10802b15cb3dSCy Schubert.It Fl l Ar lifetime , Fl \-lifetime Ns = Ns Ar lifetime 10812b15cb3dSCy Schubertset certificate lifetime. 10822b15cb3dSCy SchubertThis option takes an integer number as its argument. 10832b15cb3dSCy Schubert.sp 10842b15cb3dSCy SchubertSet the certificate expiration to lifetime days from now. 10852b15cb3dSCy Schubert.It Fl m Ar modulus , Fl \-modulus Ns = Ns Ar modulus 1086*09100258SXin LIprime modulus. 10872b15cb3dSCy SchubertThis option takes an integer number as its argument. 10882b15cb3dSCy SchubertThe value of 10892b15cb3dSCy Schubert.Ar modulus 10902b15cb3dSCy Schubertis constrained to being: 10912b15cb3dSCy Schubert.in +4 10922b15cb3dSCy Schubert.nf 10932b15cb3dSCy Schubert.na 10942b15cb3dSCy Schubertin the range 256 through 2048 10952b15cb3dSCy Schubert.fi 10962b15cb3dSCy Schubert.in -4 10972b15cb3dSCy Schubert.sp 10982b15cb3dSCy SchubertThe number of bits in the prime modulus. The default is 512. 1099*09100258SXin LI.It Fl M , Fl \-md5key 1100*09100258SXin LIgenerate symmetric keys. 1101*09100258SXin LI.sp 1102*09100258SXin LIGenerate symmetric keys, obsoleting any that may exist. 11032b15cb3dSCy Schubert.It Fl P , Fl \-pvt\-cert 11042b15cb3dSCy Schubertgenerate PC private certificate. 11052b15cb3dSCy Schubert.sp 11062b15cb3dSCy SchubertGenerate a private certificate. By default, the program generates 11072b15cb3dSCy Schubertpublic certificates. 11082b15cb3dSCy Schubert.It Fl p Ar passwd , Fl \-password Ns = Ns Ar passwd 11092b15cb3dSCy Schubertlocal private password. 11102b15cb3dSCy Schubert.sp 11112b15cb3dSCy SchubertLocal files containing private data are encrypted with the 11122b15cb3dSCy SchubertDES\-CBC algorithm and the specified password. The same password 11132b15cb3dSCy Schubertmust be specified to the local ntpd via the "crypto pw password" 11142b15cb3dSCy Schubertconfiguration command. The default password is the local 11152b15cb3dSCy Schuberthostname. 11162b15cb3dSCy Schubert.It Fl q Ar passwd , Fl \-export\-passwd Ns = Ns Ar passwd 11172b15cb3dSCy Schubertexport IFF or GQ group keys with password. 11182b15cb3dSCy Schubert.sp 11192b15cb3dSCy SchubertExport IFF or GQ identity group keys to the standard output, 11202b15cb3dSCy Schubertencrypted with the DES\-CBC algorithm and the specified password. 11212b15cb3dSCy SchubertThe same password must be specified to the remote ntpd via the 11222b15cb3dSCy Schubert"crypto pw password" configuration command. See also the option 11232b15cb3dSCy Schubert-\-id\-key (\-e) for unencrypted exports. 11242b15cb3dSCy Schubert.It Fl s Ar host@group , Fl \-subject\-name Ns = Ns Ar host@group 11252b15cb3dSCy Schubertset host and optionally group name. 11262b15cb3dSCy Schubert.sp 11272b15cb3dSCy SchubertSet the Autokey host name, and optionally, group name specified 11282b15cb3dSCy Schubertfollowing an '\fB@\fP' character. The host name is used in the file 11292b15cb3dSCy Schubertname of generated host and signing certificates, without the 11302b15cb3dSCy Schubertgroup name. The host name, and if provided, group name are used 1131*09100258SXin LIin \fBhost@group\fP form for the host certificate subject and issuer 11322b15cb3dSCy Schubertfields. Specifying '\fB\-s @group\fP' is allowed, and results in 11332b15cb3dSCy Schubertleaving the host name unchanged while appending \fB@group\fP to the 11342b15cb3dSCy Schubertsubject and issuer fields, as with \fB\-i group\fP. The group name, or 11352b15cb3dSCy Schubertif not provided, the host name are also used in the file names 11362b15cb3dSCy Schubertof IFF, GQ, and MV client parameter files. 1137*09100258SXin LI.It Fl S Ar sign , Fl \-sign\-key Ns = Ns Ar sign 1138*09100258SXin LIgenerate sign key (RSA or DSA). 1139*09100258SXin LI.sp 1140*09100258SXin LIGenerate a new sign key of the designated type, obsoleting any 1141*09100258SXin LIthat may exist. By default, the program uses the host key as the 1142*09100258SXin LIsign key. 11432b15cb3dSCy Schubert.It Fl T , Fl \-trusted\-cert 11442b15cb3dSCy Schuberttrusted certificate (TC scheme). 11452b15cb3dSCy Schubert.sp 11462b15cb3dSCy SchubertGenerate a trusted certificate. By default, the program generates 11472b15cb3dSCy Schuberta non\-trusted certificate. 11482b15cb3dSCy Schubert.It Fl V Ar num , Fl \-mv\-params Ns = Ns Ar num 11492b15cb3dSCy Schubertgenerate <num> MV parameters. 11502b15cb3dSCy SchubertThis option takes an integer number as its argument. 11512b15cb3dSCy Schubert.sp 11522b15cb3dSCy SchubertGenerate parameters and keys for the Mu\-Varadharajan (MV) 11532b15cb3dSCy Schubertidentification scheme. 11542b15cb3dSCy Schubert.It Fl v Ar num , Fl \-mv\-keys Ns = Ns Ar num 11552b15cb3dSCy Schubertupdate <num> MV keys. 11562b15cb3dSCy SchubertThis option takes an integer number as its argument. 11572b15cb3dSCy Schubert.sp 11582b15cb3dSCy SchubertThis option has not been fully documented. 11592b15cb3dSCy Schubert.It Fl \&? , Fl \-help 11602b15cb3dSCy SchubertDisplay usage information and exit. 11612b15cb3dSCy Schubert.It Fl \&! , Fl \-more\-help 11622b15cb3dSCy SchubertPass the extended usage information through a pager. 11632b15cb3dSCy Schubert.It Fl > Oo Ar cfgfile Oc , Fl \-save\-opts Oo Ns = Ns Ar cfgfile Oc 11642b15cb3dSCy SchubertSave the option state to \fIcfgfile\fP. The default is the \fIlast\fP 11652b15cb3dSCy Schubertconfiguration file listed in the \fBOPTION PRESETS\fP section, below. 11662b15cb3dSCy SchubertThe command will exit after updating the config file. 11672b15cb3dSCy Schubert.It Fl < Ar cfgfile , Fl \-load\-opts Ns = Ns Ar cfgfile , Fl \-no\-load\-opts 11682b15cb3dSCy SchubertLoad options from \fIcfgfile\fP. 11692b15cb3dSCy SchubertThe \fIno\-load\-opts\fP form will disable the loading 11702b15cb3dSCy Schubertof earlier config/rc/ini files. \fI\-\-no\-load\-opts\fP is handled early, 11712b15cb3dSCy Schubertout of order. 11722b15cb3dSCy Schubert.It Fl \-version Op Brq Ar v|c|n 11732b15cb3dSCy SchubertOutput version of program and exit. The default mode is `v', a simple 11742b15cb3dSCy Schubertversion. The `c' mode will print copyright information and `n' will 11752b15cb3dSCy Schubertprint the full copyright notice. 11762b15cb3dSCy Schubert.El 11772b15cb3dSCy Schubert.Sh "OPTION PRESETS" 11782b15cb3dSCy SchubertAny option that is not marked as \fInot presettable\fP may be preset 11792b15cb3dSCy Schubertby loading values from configuration ("RC" or ".INI") file(s) and values from 11802b15cb3dSCy Schubertenvironment variables named: 11812b15cb3dSCy Schubert.nf 11822b15cb3dSCy Schubert \fBNTP_KEYGEN_<option\-name>\fP or \fBNTP_KEYGEN\fP 11832b15cb3dSCy Schubert.fi 11842b15cb3dSCy Schubert.ad 11852b15cb3dSCy SchubertThe environmental presets take precedence (are processed later than) 11862b15cb3dSCy Schubertthe configuration files. 11872b15cb3dSCy SchubertThe \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP". 11882b15cb3dSCy SchubertIf any of these are directories, then the file \fI.ntprc\fP 11892b15cb3dSCy Schubertis searched for within those directories. 11902b15cb3dSCy Schubert.Sh USAGE 11912b15cb3dSCy Schubert.Sh "ENVIRONMENT" 11922b15cb3dSCy SchubertSee \fBOPTION PRESETS\fP for configuration environment variables. 11932b15cb3dSCy Schubert.Sh "FILES" 11942b15cb3dSCy SchubertSee \fBOPTION PRESETS\fP for configuration files. 11952b15cb3dSCy Schubert.Sh "EXIT STATUS" 11962b15cb3dSCy SchubertOne of the following exit values will be returned: 11972b15cb3dSCy Schubert.Bl -tag 11982b15cb3dSCy Schubert.It 0 " (EXIT_SUCCESS)" 11992b15cb3dSCy SchubertSuccessful program execution. 12002b15cb3dSCy Schubert.It 1 " (EXIT_FAILURE)" 12012b15cb3dSCy SchubertThe operation failed or the command syntax was not valid. 12022b15cb3dSCy Schubert.It 66 " (EX_NOINPUT)" 12032b15cb3dSCy SchubertA specified configuration file could not be loaded. 12042b15cb3dSCy Schubert.It 70 " (EX_SOFTWARE)" 12052b15cb3dSCy Schubertlibopts had an internal operational error. Please report 12062b15cb3dSCy Schubertit to autogen\-users@lists.sourceforge.net. Thank you. 12072b15cb3dSCy Schubert.El 12082b15cb3dSCy Schubert.Sh "AUTHORS" 12092b15cb3dSCy SchubertThe University of Delaware and Network Time Foundation 12102b15cb3dSCy Schubert.Sh "COPYRIGHT" 1211f0574f5cSXin LICopyright (C) 1992\-2017 The University of Delaware and Network Time Foundation all rights reserved. 12122b15cb3dSCy SchubertThis program is released under the terms of the NTP license, <http://ntp.org/license>. 12132b15cb3dSCy Schubert.Sh BUGS 1214*09100258SXin LIIt can take quite a while to generate some cryptographic values. 12152b15cb3dSCy Schubert.Pp 12162b15cb3dSCy SchubertPlease report bugs to http://bugs.ntp.org . 12172b15cb3dSCy Schubert.Pp 12182b15cb3dSCy SchubertPlease send bug reports to: http://bugs.ntp.org, bugs@ntp.org 12192b15cb3dSCy Schubert.Sh NOTES 12202b15cb3dSCy SchubertPortions of this document came from FreeBSD. 12212b15cb3dSCy Schubert.Pp 12222b15cb3dSCy SchubertThis manual page was \fIAutoGen\fP\-erated from the \fBntp\-keygen\fP 12232b15cb3dSCy Schubertoption definitions. 1224