]> the.earth.li Git - onak.git/blob - openpgp.h
Bump debhelper compat level to 13
[onak.git] / openpgp.h
1 /*
2  * openpgp.h - Defines directly related to OpenPGP RFC 4880
3  *
4  * Copyright 2011 Jonathan McDowell <noodles@earth.li>
5  *
6  * This program is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program.  If not, see <https://www.gnu.org/licenses/>.
17  */
18
19 #ifndef __OPENPGP_H__
20 #define __OPENPGP_H__
21
22 #define OPENPGP_PKALGO_RSA              1
23 #define OPENPGP_PKALGO_RSA_ENC          2
24 #define OPENPGP_PKALGO_RSA_SIGN         3
25 #define OPENPGP_PKALGO_ELGAMAL_ENC      16
26 #define OPENPGP_PKALGO_DSA              17
27 #define OPENPGP_PKALGO_EC               18
28 #define OPENPGP_PKALGO_ECDSA            19
29 #define OPENPGP_PKALGO_ELGAMAL_SIGN     20
30 #define OPENPGP_PKALGO_DH               21
31 #define OPENPGP_PKALGO_EDDSA            22
32
33 #define OPENPGP_SYMALGO_PLAIN           0
34 #define OPENPGP_SYMALGO_IDEA            1
35 #define OPENPGP_SYMALGO_3DES            2
36 #define OPENPGP_SYMALGO_CAST5           3
37 #define OPENPGP_SYMALGO_BLOWFISH        4
38 #define OPENPGP_SYMALGO_SAFER_SK128     5       /* In RFC2440, not in RFC4880 */
39 #define OPENPGP_SYMALGO_DES_SK          6       /* In RFC2440, not in RFC4880 */
40 #define OPENPGP_SYMALGO_AES128          7
41 #define OPENPGP_SYMALGO_AES192          8
42 #define OPENPGP_SYMALGO_AES256          9
43 #define OPENPGP_SYMALGO_TWOFISH         10
44 #define OPENPGP_SYMALGO_CAMELLIA128     11      /* From GnuPG */
45 #define OPENPGP_SYMALGO_CAMELLIA192     12      /* From GnuPG */
46 #define OPENPGP_SYMALGO_CAMELLIA256     13      /* From GnuPG */
47
48 #define OPENPGP_HASH_MD5                1
49 #define OPENPGP_HASH_SHA1               2
50 #define OPENPGP_HASH_RIPEMD160          3
51 #define OPENPGP_HASH_SHA1X              4       /* In RFC2440, not in RFC4880 */
52 #define OPENPGP_HASH_MD2                5       /* In RFC2440, not in RFC4880 */
53 #define OPENPGP_HASH_TIGER192           6       /* In RFC2440, not in RFC4880 */
54 #define OPENPGP_HASH_HAVAL_5_160        7       /* In RFC2440, not in RFC4880 */
55 #define OPENPGP_HASH_SHA256             8
56 #define OPENPGP_HASH_SHA384             9
57 #define OPENPGP_HASH_SHA512             10
58 #define OPENPGP_HASH_SHA224             11
59
60 #define OPENPGP_COMP_NONE               0
61 #define OPENPGP_COMP_ZIP                1
62 #define OPENPGP_COMP_ZLIB               2
63 #define OPENPGP_COMP_BZIP2              3
64
65 #define OPENPGP_PACKET_PKSESSIONKEY     1
66 #define OPENPGP_PACKET_SIGNATURE        2
67 #define OPENPGP_PACKET_SYMSESSIONKEY    3
68 #define OPENPGP_PACKET_ONEPASSSIG       4
69 #define OPENPGP_PACKET_SECRETKEY        5
70 #define OPENPGP_PACKET_PUBLICKEY        6
71 #define OPENPGP_PACKET_SECRETSUBKEY     7
72 #define OPENPGP_PACKET_COMPRESSED       8
73 #define OPENPGP_PACKET_ENCRYPTED        9
74 #define OPENPGP_PACKET_MARKER           10
75 #define OPENPGP_PACKET_LITERALDATA      11
76 #define OPENPGP_PACKET_TRUST            12
77 #define OPENPGP_PACKET_UID              13
78 #define OPENPGP_PACKET_PUBLICSUBKEY     14
79 #define OPENPGP_PACKET_UAT              17
80 #define OPENPGP_PACKET_ENCRYPTED_MDC    18
81 #define OPENPGP_PACKET_MDC              19
82 #define OPENPGP_PACKET_COMMENT          61
83
84 #define OPENPGP_SIGTYPE_BINARY          0x00
85 #define OPENPGP_SIGTYPE_TEXT            0x01
86 #define OPENPGP_SIGTYPE_KEY_REV         0x20
87 #define OPENPGP_SIGTYPE_SUBKEY_REV      0x28
88 #define OPENPGP_SIGTYPE_CERT_REV        0x30
89
90 #define OPENPGP_SIGSUB_CREATION         2
91 #define OPENPGP_SIGSUB_EXPIRY           3
92 #define OPENPGP_SIGSUB_EXPORTABLE       4
93 #define OPENPGP_SIGSUB_TRUSTSIG         5
94 #define OPENPGP_SIGSUB_REGEX            6
95 #define OPENPGP_SIGSUB_REVOCABLE        7
96 #define OPENPGP_SIGSUB_CAPABILITIES     8       /* Legacy */
97 #define OPENPGP_SIGSUB_KEYEXPIRY        9
98 #define OPENPGP_SIGSUB_ARR              10      /* Placeholder in RFC */
99 #define OPENPGP_SIGSUB_PREFSYM          11
100 #define OPENPGP_SIGSUB_REVOCATION_KEY   12
101 #define OPENPGP_SIGSUB_ISSUER           16
102 #define OPENPGP_SIGSUB_ISSUER_UID       17      /* Legacy */
103 #define OPENPGP_SIGSUB_URL              18      /* Legacy */
104 #define OPENPGP_SIGSUB_X_ISSUER_FINGER  19      /* Legacy */
105 #define OPENPGP_SIGSUB_NOTATION         20
106 #define OPENPGP_SIGSUB_PREFHASH         21
107 #define OPENPGP_SIGSUB_PREFCOMPRESS     22
108 #define OPENPGP_SIGSUB_KEYSERVER        23
109 #define OPENPGP_SIGSUB_PREFKEYSERVER    24
110 #define OPENPGP_SIGSUB_PRIMARYUID       25
111 #define OPENPGP_SIGSUB_POLICYURI        26
112 #define OPENPGP_SIGSUB_KEYFLAGS         27
113 #define OPENPGP_SIGSUB_SIGNER_UID       28
114 #define OPENPGP_SIGSUB_REVOKE_REASON    29
115 #define OPENPGP_SIGSUB_FEATURES         30
116 #define OPENPGP_SIGSUB_SIGNATURE_TARGET 31
117 #define OPENPGP_SIGSUB_EMBEDDED_SIG     32
118 #define OPENPGP_SIGSUB_ISSUER_FINGER    33
119
120 #endif /* __OPENPGP_H__ */