e2d16be9641117cafe0387acd8697fd51d359757
[openssl.git] / include / openssl / core_names.h
1 /*
2  * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the Apache License 2.0 (the "License").  You may not use
5  * this file except in compliance with the License.  You can obtain a copy
6  * in the file LICENSE in the source distribution or at
7  * https://www.openssl.org/source/license.html
8  */
9
10 #ifndef OSSL_CORE_NAMES_H
11 # define OSSL_CORE_NAMES_H
12
13 # ifdef __cplusplus
14 extern "C" {
15 # endif
16
17 /*
18  * Well known parameter names that Providers can define
19  */
20
21 /*
22  * A printable name for this provider
23  * Type: OSSL_PARAM_UTF8_STRING
24  */
25 #define OSSL_PROV_PARAM_NAME        "name"
26 /*
27  * A version string for this provider
28  * Type: OSSL_PARAM_UTF8_STRING
29  */
30 #define OSSL_PROV_PARAM_VERSION     "version"
31 /*
32  * A string providing provider specific build information
33  * Type: OSSL_PARAM_UTF8_STRING
34  */
35 #define OSSL_PROV_PARAM_BUILDINFO   "buildinfo"
36
37
38 /* cipher parameters */
39 #define OSSL_CIPHER_PARAM_PADDING   "padding"    /* int */
40 #define OSSL_CIPHER_PARAM_MODE      "mode"       /* int */
41 #define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize" /* int */
42 #define OSSL_CIPHER_PARAM_FLAGS     "flags"      /* ulong */
43 #define OSSL_CIPHER_PARAM_KEYLEN    "keylen"     /* int */
44 #define OSSL_CIPHER_PARAM_IVLEN     "ivlen"      /* int */
45 #define OSSL_CIPHER_PARAM_IV        "iv"         /* octet_string OR octet_ptr */
46 #define OSSL_CIPHER_PARAM_NUM       "num"        /* int */
47 #define OSSL_CIPHER_PARAM_AEAD_TAG           "tag"        /* octet_string */
48 #define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD      "tlsaad"     /* octet_string */
49 #define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD  "tlsaadpad"  /* size_t */
50 #define OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED "tlsivfixed" /* octet_string */
51 #define OSSL_CIPHER_PARAM_AEAD_IVLEN         "aeadivlen"  /* size_t */
52
53 /* digest parameters */
54 #define OSSL_DIGEST_PARAM_XOFLEN    "xoflen"
55 #define OSSL_DIGEST_PARAM_SSL3_MS   "ssl3-ms"
56 #define OSSL_DIGEST_PARAM_PAD_TYPE  "pad_type"
57 #define OSSL_DIGEST_PARAM_MICALG    "micalg"
58 #define OSSL_DIGEST_PARAM_BLOCK_SIZE "blocksize" /* OSSL_PARAM_INTEGER */
59 #define OSSL_DIGEST_PARAM_SIZE      "size" /* OSSL_PARAM_INTEGER */
60 #define OSSL_DIGEST_PARAM_FLAGS     "flags" /* OSSL_PARAM_UNSIGNED_INTEGER */
61
62 /* MAC parameters */
63 #define OSSL_MAC_PARAM_KEY          "key"       /* octet string */
64 #define OSSL_MAC_PARAM_IV           "iv"        /* octet string */
65 #define OSSL_MAC_PARAM_CUSTOM       "custom"    /* utf8 string */
66 #define OSSL_MAC_PARAM_SALT         "salt"      /* octet string */
67 #define OSSL_MAC_PARAM_XOF          "xof"       /* int, 0 or 1 */
68 #define OSSL_MAC_PARAM_FLAGS        "flags"     /* int */
69 /* Note that "md" and "digest" are equivalent */
70 #define OSSL_MAC_PARAM_MD           "md"        /* utf8 string */
71 #define OSSL_MAC_PARAM_DIGEST       "digest"    /* utf8 string */
72 #define OSSL_MAC_PARAM_CIPHER       "cipher"    /* utf8 string */
73 /* Note that "algorithm" can be used instead of "md", "digest" or "cipher" */
74 #define OSSL_MAC_PARAM_ALGORITHM    "algorithm" /* utf8 string */
75 #define OSSL_MAC_PARAM_ENGINE       "engine"    /* utf8 string */
76 #define OSSL_MAC_PARAM_PROPERTIES   "properties" /* utf8 string */
77 /* Note that "size", "digestsize" and "outlen" are equivalent */
78 #define OSSL_MAC_PARAM_SIZE         "size"      /* size_t */
79 #define OSSL_MAC_PARAM_DIGESTSIZE   "digestsize" /* size_t */
80 #define OSSL_MAC_PARAM_OUTLEN       "outlen"    /* size_t */
81
82 /* PKEY parameters */
83 /* Diffie-Hellman Parameters */
84 #define OSSL_PKEY_PARAM_DH_P         "dh-p"
85 #define OSSL_PKEY_PARAM_DH_G         "dh-g"
86 #define OSSL_PKEY_PARAM_DH_Q         "dh-q"
87 /* Diffie-Hellman Keys */
88 #define OSSL_PKEY_PARAM_DH_PUB_KEY   "dh-pub"
89 #define OSSL_PKEY_PARAM_DH_PRIV_KEY  "dh-priv"
90
91 /* Key Exchange parameters */
92
93 #define OSSL_EXCHANGE_PARAM_PAD           "exchange-pad"
94
95 # ifdef __cplusplus
96 }
97 # endif
98
99 #endif