00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef DNS_KEYVALUES_H
00021 #define DNS_KEYVALUES_H 1
00022
00023
00024
00025
00026
00027
00028 #define DNS_KEYFLAG_TYPEMASK 0xC000
00029 #define DNS_KEYTYPE_AUTHCONF 0x0000
00030 #define DNS_KEYTYPE_CONFONLY 0x8000
00031 #define DNS_KEYTYPE_AUTHONLY 0x4000
00032 #define DNS_KEYTYPE_NOKEY 0xC000
00033 #define DNS_KEYTYPE_NOAUTH DNS_KEYTYPE_CONFONLY
00034 #define DNS_KEYTYPE_NOCONF DNS_KEYTYPE_AUTHONLY
00035
00036 #define DNS_KEYFLAG_RESERVED2 0x2000
00037 #define DNS_KEYFLAG_EXTENDED 0x1000
00038 #define DNS_KEYFLAG_RESERVED4 0x0800
00039 #define DNS_KEYFLAG_RESERVED5 0x0400
00040 #define DNS_KEYFLAG_OWNERMASK 0x0300
00041 #define DNS_KEYOWNER_USER 0x0000
00042 #define DNS_KEYOWNER_ENTITY 0x0200
00043 #define DNS_KEYOWNER_ZONE 0x0100
00044 #define DNS_KEYOWNER_RESERVED 0x0300
00045 #define DNS_KEYFLAG_REVOKE 0x0080
00046 #define DNS_KEYFLAG_RESERVED9 0x0040
00047 #define DNS_KEYFLAG_RESERVED10 0x0020
00048 #define DNS_KEYFLAG_RESERVED11 0x0010
00049 #define DNS_KEYFLAG_SIGNATORYMASK 0x000F
00050
00051 #define DNS_KEYFLAG_RESERVEDMASK (DNS_KEYFLAG_RESERVED2 | \
00052 DNS_KEYFLAG_RESERVED4 | \
00053 DNS_KEYFLAG_RESERVED5 | \
00054 DNS_KEYFLAG_RESERVED9 | \
00055 DNS_KEYFLAG_RESERVED10 | \
00056 DNS_KEYFLAG_RESERVED11 )
00057 #define DNS_KEYFLAG_KSK 0x0001
00058
00059 #define DNS_KEYFLAG_RESERVEDMASK2 0xFFFF
00060
00061
00062 #define DNS_KEYALG_RSAMD5 1
00063 #define DNS_KEYALG_RSA DNS_KEYALG_RSAMD5
00064 #define DNS_KEYALG_DH 2
00065 #define DNS_KEYALG_DSA 3
00066 #define DNS_KEYALG_NSEC3DSA 6
00067 #define DNS_KEYALG_DSS DNS_ALG_DSA
00068 #define DNS_KEYALG_ECC 4
00069 #define DNS_KEYALG_RSASHA1 5
00070 #define DNS_KEYALG_NSEC3RSASHA1 7
00071 #define DNS_KEYALG_RSASHA256 8
00072 #define DNS_KEYALG_RSASHA512 10
00073 #define DNS_KEYALG_ECCGOST 12
00074 #define DNS_KEYALG_ECDSA256 13
00075 #define DNS_KEYALG_ECDSA384 14
00076 #define DNS_KEYALG_INDIRECT 252
00077 #define DNS_KEYALG_PRIVATEDNS 253
00078 #define DNS_KEYALG_PRIVATEOID 254
00079
00080
00081 #define DNS_KEYPROTO_RESERVED 0
00082 #define DNS_KEYPROTO_TLS 1
00083 #define DNS_KEYPROTO_EMAIL 2
00084 #define DNS_KEYPROTO_DNSSEC 3
00085 #define DNS_KEYPROTO_IPSEC 4
00086 #define DNS_KEYPROTO_ANY 255
00087
00088
00089 #define DNS_SIG_RSAMINBITS 512
00090 #define DNS_SIG_RSAMAXBITS 2552
00091
00092 #define DNS_SIG_RSAMAXBYTES ((DNS_SIG_RSAMAXBITS+7/8)*2+3)
00093
00094 #define DNS_SIG_RSAMAXBASE64 (((DNS_SIG_RSAMAXBYTES+2)/3)*4)
00095 #define DNS_SIG_RSAMINSIZE ((DNS_SIG_RSAMINBITS+7)/8)
00096 #define DNS_SIG_RSAMAXSIZE ((DNS_SIG_RSAMAXBITS+7)/8)
00097
00098 #define DNS_SIG_DSASIGSIZE 41
00099 #define DNS_SIG_DSAMINBITS 512
00100 #define DNS_SIG_DSAMAXBITS 1024
00101 #define DNS_SIG_DSAMINBYTES 213
00102 #define DNS_SIG_DSAMAXBYTES 405
00103
00104 #define DNS_SIG_GOSTSIGSIZE 64
00105
00106 #define DNS_SIG_ECDSA256SIZE 64
00107 #define DNS_SIG_ECDSA384SIZE 96
00108
00109 #define DNS_KEY_ECDSA256SIZE 64
00110 #define DNS_KEY_ECDSA384SIZE 96
00111
00112 #endif