annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/openssl/dh.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /*
jpayne@69 2 * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
jpayne@69 3 *
jpayne@69 4 * Licensed under the OpenSSL license (the "License"). You may not use
jpayne@69 5 * this file except in compliance with the License. You can obtain a copy
jpayne@69 6 * in the file LICENSE in the source distribution or at
jpayne@69 7 * https://www.openssl.org/source/license.html
jpayne@69 8 */
jpayne@69 9
jpayne@69 10 #ifndef HEADER_DH_H
jpayne@69 11 # define HEADER_DH_H
jpayne@69 12
jpayne@69 13 # include <openssl/opensslconf.h>
jpayne@69 14
jpayne@69 15 # ifndef OPENSSL_NO_DH
jpayne@69 16 # include <openssl/e_os2.h>
jpayne@69 17 # include <openssl/bio.h>
jpayne@69 18 # include <openssl/asn1.h>
jpayne@69 19 # include <openssl/ossl_typ.h>
jpayne@69 20 # if OPENSSL_API_COMPAT < 0x10100000L
jpayne@69 21 # include <openssl/bn.h>
jpayne@69 22 # endif
jpayne@69 23 # include <openssl/dherr.h>
jpayne@69 24
jpayne@69 25 # ifdef __cplusplus
jpayne@69 26 extern "C" {
jpayne@69 27 # endif
jpayne@69 28
jpayne@69 29 # ifndef OPENSSL_DH_MAX_MODULUS_BITS
jpayne@69 30 # define OPENSSL_DH_MAX_MODULUS_BITS 10000
jpayne@69 31 # endif
jpayne@69 32 # ifndef OPENSSL_DH_CHECK_MAX_MODULUS_BITS
jpayne@69 33 # define OPENSSL_DH_CHECK_MAX_MODULUS_BITS 32768
jpayne@69 34 # endif
jpayne@69 35
jpayne@69 36 # define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024
jpayne@69 37
jpayne@69 38 # define DH_FLAG_CACHE_MONT_P 0x01
jpayne@69 39
jpayne@69 40 # if OPENSSL_API_COMPAT < 0x10100000L
jpayne@69 41 /*
jpayne@69 42 * Does nothing. Previously this switched off constant time behaviour.
jpayne@69 43 */
jpayne@69 44 # define DH_FLAG_NO_EXP_CONSTTIME 0x00
jpayne@69 45 # endif
jpayne@69 46
jpayne@69 47 /*
jpayne@69 48 * If this flag is set the DH method is FIPS compliant and can be used in
jpayne@69 49 * FIPS mode. This is set in the validated module method. If an application
jpayne@69 50 * sets this flag in its own methods it is its responsibility to ensure the
jpayne@69 51 * result is compliant.
jpayne@69 52 */
jpayne@69 53
jpayne@69 54 # define DH_FLAG_FIPS_METHOD 0x0400
jpayne@69 55
jpayne@69 56 /*
jpayne@69 57 * If this flag is set the operations normally disabled in FIPS mode are
jpayne@69 58 * permitted it is then the applications responsibility to ensure that the
jpayne@69 59 * usage is compliant.
jpayne@69 60 */
jpayne@69 61
jpayne@69 62 # define DH_FLAG_NON_FIPS_ALLOW 0x0400
jpayne@69 63
jpayne@69 64 /* Already defined in ossl_typ.h */
jpayne@69 65 /* typedef struct dh_st DH; */
jpayne@69 66 /* typedef struct dh_method DH_METHOD; */
jpayne@69 67
jpayne@69 68 DECLARE_ASN1_ITEM(DHparams)
jpayne@69 69
jpayne@69 70 # define DH_GENERATOR_2 2
jpayne@69 71 /* #define DH_GENERATOR_3 3 */
jpayne@69 72 # define DH_GENERATOR_5 5
jpayne@69 73
jpayne@69 74 /* DH_check error codes */
jpayne@69 75 # define DH_CHECK_P_NOT_PRIME 0x01
jpayne@69 76 # define DH_CHECK_P_NOT_SAFE_PRIME 0x02
jpayne@69 77 # define DH_UNABLE_TO_CHECK_GENERATOR 0x04
jpayne@69 78 # define DH_NOT_SUITABLE_GENERATOR 0x08
jpayne@69 79 # define DH_CHECK_Q_NOT_PRIME 0x10
jpayne@69 80 # define DH_CHECK_INVALID_Q_VALUE 0x20
jpayne@69 81 # define DH_CHECK_INVALID_J_VALUE 0x40
jpayne@69 82
jpayne@69 83 /* DH_check_pub_key error codes */
jpayne@69 84 # define DH_CHECK_PUBKEY_TOO_SMALL 0x01
jpayne@69 85 # define DH_CHECK_PUBKEY_TOO_LARGE 0x02
jpayne@69 86 # define DH_CHECK_PUBKEY_INVALID 0x04
jpayne@69 87
jpayne@69 88 /*
jpayne@69 89 * primes p where (p-1)/2 is prime too are called "safe"; we define this for
jpayne@69 90 * backward compatibility:
jpayne@69 91 */
jpayne@69 92 # define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME
jpayne@69 93
jpayne@69 94 # define d2i_DHparams_fp(fp,x) \
jpayne@69 95 (DH *)ASN1_d2i_fp((char *(*)())DH_new, \
jpayne@69 96 (char *(*)())d2i_DHparams, \
jpayne@69 97 (fp), \
jpayne@69 98 (unsigned char **)(x))
jpayne@69 99 # define i2d_DHparams_fp(fp,x) \
jpayne@69 100 ASN1_i2d_fp(i2d_DHparams,(fp), (unsigned char *)(x))
jpayne@69 101 # define d2i_DHparams_bio(bp,x) \
jpayne@69 102 ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, x)
jpayne@69 103 # define i2d_DHparams_bio(bp,x) \
jpayne@69 104 ASN1_i2d_bio_of_const(DH,i2d_DHparams,bp,x)
jpayne@69 105
jpayne@69 106 # define d2i_DHxparams_fp(fp,x) \
jpayne@69 107 (DH *)ASN1_d2i_fp((char *(*)())DH_new, \
jpayne@69 108 (char *(*)())d2i_DHxparams, \
jpayne@69 109 (fp), \
jpayne@69 110 (unsigned char **)(x))
jpayne@69 111 # define i2d_DHxparams_fp(fp,x) \
jpayne@69 112 ASN1_i2d_fp(i2d_DHxparams,(fp), (unsigned char *)(x))
jpayne@69 113 # define d2i_DHxparams_bio(bp,x) \
jpayne@69 114 ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, bp, x)
jpayne@69 115 # define i2d_DHxparams_bio(bp,x) \
jpayne@69 116 ASN1_i2d_bio_of_const(DH, i2d_DHxparams, bp, x)
jpayne@69 117
jpayne@69 118 DH *DHparams_dup(DH *);
jpayne@69 119
jpayne@69 120 const DH_METHOD *DH_OpenSSL(void);
jpayne@69 121
jpayne@69 122 void DH_set_default_method(const DH_METHOD *meth);
jpayne@69 123 const DH_METHOD *DH_get_default_method(void);
jpayne@69 124 int DH_set_method(DH *dh, const DH_METHOD *meth);
jpayne@69 125 DH *DH_new_method(ENGINE *engine);
jpayne@69 126
jpayne@69 127 DH *DH_new(void);
jpayne@69 128 void DH_free(DH *dh);
jpayne@69 129 int DH_up_ref(DH *dh);
jpayne@69 130 int DH_bits(const DH *dh);
jpayne@69 131 int DH_size(const DH *dh);
jpayne@69 132 int DH_security_bits(const DH *dh);
jpayne@69 133 #define DH_get_ex_new_index(l, p, newf, dupf, freef) \
jpayne@69 134 CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DH, l, p, newf, dupf, freef)
jpayne@69 135 int DH_set_ex_data(DH *d, int idx, void *arg);
jpayne@69 136 void *DH_get_ex_data(DH *d, int idx);
jpayne@69 137
jpayne@69 138 /* Deprecated version */
jpayne@69 139 DEPRECATEDIN_0_9_8(DH *DH_generate_parameters(int prime_len, int generator,
jpayne@69 140 void (*callback) (int, int,
jpayne@69 141 void *),
jpayne@69 142 void *cb_arg))
jpayne@69 143
jpayne@69 144 /* New version */
jpayne@69 145 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator,
jpayne@69 146 BN_GENCB *cb);
jpayne@69 147
jpayne@69 148 int DH_check_params_ex(const DH *dh);
jpayne@69 149 int DH_check_ex(const DH *dh);
jpayne@69 150 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key);
jpayne@69 151 int DH_check_params(const DH *dh, int *ret);
jpayne@69 152 int DH_check(const DH *dh, int *codes);
jpayne@69 153 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);
jpayne@69 154 int DH_generate_key(DH *dh);
jpayne@69 155 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
jpayne@69 156 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh);
jpayne@69 157 DH *d2i_DHparams(DH **a, const unsigned char **pp, long length);
jpayne@69 158 int i2d_DHparams(const DH *a, unsigned char **pp);
jpayne@69 159 DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length);
jpayne@69 160 int i2d_DHxparams(const DH *a, unsigned char **pp);
jpayne@69 161 # ifndef OPENSSL_NO_STDIO
jpayne@69 162 int DHparams_print_fp(FILE *fp, const DH *x);
jpayne@69 163 # endif
jpayne@69 164 int DHparams_print(BIO *bp, const DH *x);
jpayne@69 165
jpayne@69 166 /* RFC 5114 parameters */
jpayne@69 167 DH *DH_get_1024_160(void);
jpayne@69 168 DH *DH_get_2048_224(void);
jpayne@69 169 DH *DH_get_2048_256(void);
jpayne@69 170
jpayne@69 171 /* Named parameters, currently RFC7919 */
jpayne@69 172 DH *DH_new_by_nid(int nid);
jpayne@69 173 int DH_get_nid(const DH *dh);
jpayne@69 174
jpayne@69 175 # ifndef OPENSSL_NO_CMS
jpayne@69 176 /* RFC2631 KDF */
jpayne@69 177 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
jpayne@69 178 const unsigned char *Z, size_t Zlen,
jpayne@69 179 ASN1_OBJECT *key_oid,
jpayne@69 180 const unsigned char *ukm, size_t ukmlen, const EVP_MD *md);
jpayne@69 181 # endif
jpayne@69 182
jpayne@69 183 void DH_get0_pqg(const DH *dh,
jpayne@69 184 const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);
jpayne@69 185 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
jpayne@69 186 void DH_get0_key(const DH *dh,
jpayne@69 187 const BIGNUM **pub_key, const BIGNUM **priv_key);
jpayne@69 188 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
jpayne@69 189 const BIGNUM *DH_get0_p(const DH *dh);
jpayne@69 190 const BIGNUM *DH_get0_q(const DH *dh);
jpayne@69 191 const BIGNUM *DH_get0_g(const DH *dh);
jpayne@69 192 const BIGNUM *DH_get0_priv_key(const DH *dh);
jpayne@69 193 const BIGNUM *DH_get0_pub_key(const DH *dh);
jpayne@69 194 void DH_clear_flags(DH *dh, int flags);
jpayne@69 195 int DH_test_flags(const DH *dh, int flags);
jpayne@69 196 void DH_set_flags(DH *dh, int flags);
jpayne@69 197 ENGINE *DH_get0_engine(DH *d);
jpayne@69 198 long DH_get_length(const DH *dh);
jpayne@69 199 int DH_set_length(DH *dh, long length);
jpayne@69 200
jpayne@69 201 DH_METHOD *DH_meth_new(const char *name, int flags);
jpayne@69 202 void DH_meth_free(DH_METHOD *dhm);
jpayne@69 203 DH_METHOD *DH_meth_dup(const DH_METHOD *dhm);
jpayne@69 204 const char *DH_meth_get0_name(const DH_METHOD *dhm);
jpayne@69 205 int DH_meth_set1_name(DH_METHOD *dhm, const char *name);
jpayne@69 206 int DH_meth_get_flags(const DH_METHOD *dhm);
jpayne@69 207 int DH_meth_set_flags(DH_METHOD *dhm, int flags);
jpayne@69 208 void *DH_meth_get0_app_data(const DH_METHOD *dhm);
jpayne@69 209 int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data);
jpayne@69 210 int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *);
jpayne@69 211 int DH_meth_set_generate_key(DH_METHOD *dhm, int (*generate_key) (DH *));
jpayne@69 212 int (*DH_meth_get_compute_key(const DH_METHOD *dhm))
jpayne@69 213 (unsigned char *key, const BIGNUM *pub_key, DH *dh);
jpayne@69 214 int DH_meth_set_compute_key(DH_METHOD *dhm,
jpayne@69 215 int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh));
jpayne@69 216 int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm))
jpayne@69 217 (const DH *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *,
jpayne@69 218 BN_CTX *, BN_MONT_CTX *);
jpayne@69 219 int DH_meth_set_bn_mod_exp(DH_METHOD *dhm,
jpayne@69 220 int (*bn_mod_exp) (const DH *, BIGNUM *, const BIGNUM *, const BIGNUM *,
jpayne@69 221 const BIGNUM *, BN_CTX *, BN_MONT_CTX *));
jpayne@69 222 int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *);
jpayne@69 223 int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *));
jpayne@69 224 int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *);
jpayne@69 225 int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *));
jpayne@69 226 int (*DH_meth_get_generate_params(const DH_METHOD *dhm))
jpayne@69 227 (DH *, int, int, BN_GENCB *);
jpayne@69 228 int DH_meth_set_generate_params(DH_METHOD *dhm,
jpayne@69 229 int (*generate_params) (DH *, int, int, BN_GENCB *));
jpayne@69 230
jpayne@69 231
jpayne@69 232 # define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \
jpayne@69 233 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
jpayne@69 234 EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, NULL)
jpayne@69 235
jpayne@69 236 # define EVP_PKEY_CTX_set_dh_paramgen_subprime_len(ctx, len) \
jpayne@69 237 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
jpayne@69 238 EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN, len, NULL)
jpayne@69 239
jpayne@69 240 # define EVP_PKEY_CTX_set_dh_paramgen_type(ctx, typ) \
jpayne@69 241 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
jpayne@69 242 EVP_PKEY_CTRL_DH_PARAMGEN_TYPE, typ, NULL)
jpayne@69 243
jpayne@69 244 # define EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, gen) \
jpayne@69 245 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
jpayne@69 246 EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, NULL)
jpayne@69 247
jpayne@69 248 # define EVP_PKEY_CTX_set_dh_rfc5114(ctx, gen) \
jpayne@69 249 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \
jpayne@69 250 EVP_PKEY_CTRL_DH_RFC5114, gen, NULL)
jpayne@69 251
jpayne@69 252 # define EVP_PKEY_CTX_set_dhx_rfc5114(ctx, gen) \
jpayne@69 253 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \
jpayne@69 254 EVP_PKEY_CTRL_DH_RFC5114, gen, NULL)
jpayne@69 255
jpayne@69 256 # define EVP_PKEY_CTX_set_dh_nid(ctx, nid) \
jpayne@69 257 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, \
jpayne@69 258 EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN, \
jpayne@69 259 EVP_PKEY_CTRL_DH_NID, nid, NULL)
jpayne@69 260
jpayne@69 261 # define EVP_PKEY_CTX_set_dh_pad(ctx, pad) \
jpayne@69 262 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_DERIVE, \
jpayne@69 263 EVP_PKEY_CTRL_DH_PAD, pad, NULL)
jpayne@69 264
jpayne@69 265 # define EVP_PKEY_CTX_set_dh_kdf_type(ctx, kdf) \
jpayne@69 266 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
jpayne@69 267 EVP_PKEY_OP_DERIVE, \
jpayne@69 268 EVP_PKEY_CTRL_DH_KDF_TYPE, kdf, NULL)
jpayne@69 269
jpayne@69 270 # define EVP_PKEY_CTX_get_dh_kdf_type(ctx) \
jpayne@69 271 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
jpayne@69 272 EVP_PKEY_OP_DERIVE, \
jpayne@69 273 EVP_PKEY_CTRL_DH_KDF_TYPE, -2, NULL)
jpayne@69 274
jpayne@69 275 # define EVP_PKEY_CTX_set0_dh_kdf_oid(ctx, oid) \
jpayne@69 276 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
jpayne@69 277 EVP_PKEY_OP_DERIVE, \
jpayne@69 278 EVP_PKEY_CTRL_DH_KDF_OID, 0, (void *)(oid))
jpayne@69 279
jpayne@69 280 # define EVP_PKEY_CTX_get0_dh_kdf_oid(ctx, poid) \
jpayne@69 281 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
jpayne@69 282 EVP_PKEY_OP_DERIVE, \
jpayne@69 283 EVP_PKEY_CTRL_GET_DH_KDF_OID, 0, (void *)(poid))
jpayne@69 284
jpayne@69 285 # define EVP_PKEY_CTX_set_dh_kdf_md(ctx, md) \
jpayne@69 286 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
jpayne@69 287 EVP_PKEY_OP_DERIVE, \
jpayne@69 288 EVP_PKEY_CTRL_DH_KDF_MD, 0, (void *)(md))
jpayne@69 289
jpayne@69 290 # define EVP_PKEY_CTX_get_dh_kdf_md(ctx, pmd) \
jpayne@69 291 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
jpayne@69 292 EVP_PKEY_OP_DERIVE, \
jpayne@69 293 EVP_PKEY_CTRL_GET_DH_KDF_MD, 0, (void *)(pmd))
jpayne@69 294
jpayne@69 295 # define EVP_PKEY_CTX_set_dh_kdf_outlen(ctx, len) \
jpayne@69 296 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
jpayne@69 297 EVP_PKEY_OP_DERIVE, \
jpayne@69 298 EVP_PKEY_CTRL_DH_KDF_OUTLEN, len, NULL)
jpayne@69 299
jpayne@69 300 # define EVP_PKEY_CTX_get_dh_kdf_outlen(ctx, plen) \
jpayne@69 301 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
jpayne@69 302 EVP_PKEY_OP_DERIVE, \
jpayne@69 303 EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN, 0, (void *)(plen))
jpayne@69 304
jpayne@69 305 # define EVP_PKEY_CTX_set0_dh_kdf_ukm(ctx, p, plen) \
jpayne@69 306 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
jpayne@69 307 EVP_PKEY_OP_DERIVE, \
jpayne@69 308 EVP_PKEY_CTRL_DH_KDF_UKM, plen, (void *)(p))
jpayne@69 309
jpayne@69 310 # define EVP_PKEY_CTX_get0_dh_kdf_ukm(ctx, p) \
jpayne@69 311 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \
jpayne@69 312 EVP_PKEY_OP_DERIVE, \
jpayne@69 313 EVP_PKEY_CTRL_GET_DH_KDF_UKM, 0, (void *)(p))
jpayne@69 314
jpayne@69 315 # define EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN (EVP_PKEY_ALG_CTRL + 1)
jpayne@69 316 # define EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR (EVP_PKEY_ALG_CTRL + 2)
jpayne@69 317 # define EVP_PKEY_CTRL_DH_RFC5114 (EVP_PKEY_ALG_CTRL + 3)
jpayne@69 318 # define EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN (EVP_PKEY_ALG_CTRL + 4)
jpayne@69 319 # define EVP_PKEY_CTRL_DH_PARAMGEN_TYPE (EVP_PKEY_ALG_CTRL + 5)
jpayne@69 320 # define EVP_PKEY_CTRL_DH_KDF_TYPE (EVP_PKEY_ALG_CTRL + 6)
jpayne@69 321 # define EVP_PKEY_CTRL_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 7)
jpayne@69 322 # define EVP_PKEY_CTRL_GET_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 8)
jpayne@69 323 # define EVP_PKEY_CTRL_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 9)
jpayne@69 324 # define EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 10)
jpayne@69 325 # define EVP_PKEY_CTRL_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 11)
jpayne@69 326 # define EVP_PKEY_CTRL_GET_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 12)
jpayne@69 327 # define EVP_PKEY_CTRL_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 13)
jpayne@69 328 # define EVP_PKEY_CTRL_GET_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 14)
jpayne@69 329 # define EVP_PKEY_CTRL_DH_NID (EVP_PKEY_ALG_CTRL + 15)
jpayne@69 330 # define EVP_PKEY_CTRL_DH_PAD (EVP_PKEY_ALG_CTRL + 16)
jpayne@69 331
jpayne@69 332 /* KDF types */
jpayne@69 333 # define EVP_PKEY_DH_KDF_NONE 1
jpayne@69 334 # ifndef OPENSSL_NO_CMS
jpayne@69 335 # define EVP_PKEY_DH_KDF_X9_42 2
jpayne@69 336 # endif
jpayne@69 337
jpayne@69 338
jpayne@69 339 # ifdef __cplusplus
jpayne@69 340 }
jpayne@69 341 # endif
jpayne@69 342 # endif
jpayne@69 343 #endif