DNSKEYGEN(1)                 BSD Reference Manual                 DNSKEYGEN(1)

NNAAMMEE
     ddnnsskkeeyyggeenn - generate and display public and private RSA keys for

SSYYNNOOPPSSIISS
     ddnnsskkeeyyggeenn [--gg[_s_i_z_e][--ff]] [--zz| --ee | --uu] [--ii] [--mm] [--pp_#] [--ss_#] [--xx] _n_a_m_e

DDEESSCCRRIIPPTTIIOONN
     DDnnsskkeeyyggeenn (DNS Key Generator) is a tool to generate and maintain RSA keys
     for DNS (Domain Name System).

     --gg[_s_i_z_e]    DDnnsskkeeyyggeenn will generate a new key when the ``--gg'' flag is
                 specified.  If the ``--gg'' flag is not specified, then it will
                 attempt to display an existing key that is stored in the cur-
                 rent directory.  If no _s_i_z_e is specified after the ``--gg''
                 flag, a key of 512 bits will be generated; otherwise, _s_i_z_e is
                 the size of the modulus in the newly-generated key.

     --ff          flag can only be specified with the ``--gg'' flag; this changes
                 the exponent used on the key.  If ``--ff'' is specified, the
                 exponent is 65537, which is suitable for encryption keys.  If
                 ``--ff'' is not specified, the exponent is 3, which is suitable
                 for signatures and verification of public data such as DNS
                 records.  Signing and verifying with exponent of 65537 takes
                 significantly more CPU time than with exponent of 3.

     --zz --ee --uu    These flags define the type of key being generated: Zone (DNS
                 validation) key, End Entity (host or service) key or User
                 (e.g. email) key, respectively.  Each key is only allowed to
                 be one of these.  When keys are displayed, the type of key
                 can be changed.

     --ii          Indicates that the key can be used for IPSEC (Internet Proto-
                 col Security services).

     --mm          Indicates that the key can be used for secure email.

     --pp_#         Indicates that the key can be used for protocol number _#. A
                 value of _0 denies the use of the key for _a_n_y protocol (other
                 than those specified by other option flags like --mm). A value
                 of _2_5_5 allows it to be used with _a_l_l protocols.  These proto-
                 col numbers will be assigned in the latest Assigned Numbers
                 RFC from the Internet Assigned Numbers Authority (IANA).

     --ss_#         Strength value; this value is only used when key is signing.
                 Interpretation of this field is to be specified later. De-
                 fault value is 7.

     --xx          Experimental key.  This indicates that software should not
                 assume that it should use secure protocols when talking to
                 this zone, host, or user.  Instead, the key is being pub-
                 lished experimentally, to debug the software to be used to
                 run the secure protocols, for example.  Data signed by Exper-
                 imental keys will not be treated as trusted by DNS servers.

     _n_a_m_e        The DNS name the key is for.  This can be any valid DNS name.

   DDEETTAAIILLSS
     DDnnsskkeeyyggeenn uses two files for each key: _<_n_a_m_e_>_._p_r_i_v and _<_n_a_m_e_>_._p_u_b_l_i_c.
     File _<_n_a_m_e_>_._p_u_b_l_i_c contains the public key in the pubkey format:

           _<_f_l_a_g_s_> _<_a_l_g_o_r_i_t_h_m_> _<_p_r_o_t_o_c_o_l_> _<_e_x_p_o_n_e_n_t_|_m_o_d_u_l_u_s_>


     DDnnsskkeeyyggeenn _n_a_m_e displays the public key in both DNS RR format and pubkey
     format.  DDnnsskkeeyyggeenn can display the key with different flags on subsequent
     runs.  The contents of the public key file will not be changed.
     _<_n_a_m_e_>_._p_r_i_v stores the private key, in either a password-protected format
     file or in a open file. The advantage of a password-protected file is
     that it is harder to use the key if the file is stolen. The disadvantage
     is that the password has to be given each time the key is read. If the
     key is to be stored in a safe off-line place, and only used for signing
     zones, then local policy may allow storing the key in an unencrypted for-
     mat.

EENNVVIIRROONNMMEENNTT
     No environmental variables are used.

SSEEEE AALLSSOO
     RSAREF documentation, _R_F_C _2_0_6_5 on secure DNS.

AAUUTTHHOORR
     Olafur Gudmundsson (ogud@tis.com).

AACCKKNNOOWWLLEEDDGGMMEENNTTSS
     The underlying cryptographic math is done by the RSAREF or BSAFE li-
     braries.

BBUUGGSS
     DDnnsskkeeyyggeenn renames old keys in such a way that only one ``previous'' key
     for a given name is kept; older keys are overwritten.  (For example, the
     third time a key is generated for a given name, the second key is kept as
     the ``previous'' key, while the first key is lost.  If a key is generated
     _a_g_a_i_n for this name--i.e., if the fourth key is generated--then the third
     key will become the ``previous'' key and the second key will be lost.)
     DDnnsskkeeyyggeenn will not overwrite existing keys.  Only one key for each name
     can be stored in the current directory.  If you want to keep your old
     keys, rename the files before running ddnnsskkeeyyggeenn. Otherwise you must
     delete them before running ddnnsskkeeyyggeenn.

     Portability of Private key file must be better tested between different
     implementations of RSA.

4th Berkeley Distribution      October 25, 1996                              2
