Use enums for DNS_KEYFLAG_, DNS_KEYTYPE_, DNS_KEYOWNER_, DNS_KEYALG_, and DNS_KEYPROTO_ values. Remove values that are never used. Eliminate the obsolete DNS_KEYFLAG_SIGNATORYMASK. Instead, add three more RESERVED bits for the key flag values that it covered but which were never used.