5d51e591fe253eddddc41ac43218b61ba152ff56
[openssl.git] / crypto / dh / dh_locl.h
1 /*
2  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
3  *
4  * Licensed under the OpenSSL licenses, (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  * https://www.openssl.org/source/license.html
8  * or in the file LICENSE in the source distribution.
9  */
10
11 #include <openssl/dh.h>
12
13 struct dh_st {
14     /*
15      * This first argument is used to pick up errors when a DH is passed
16      * instead of a EVP_PKEY
17      */
18     int pad;
19     int version;
20     BIGNUM *p;
21     BIGNUM *g;
22     long length;                /* optional */
23     BIGNUM *pub_key;            /* g^x % p */
24     BIGNUM *priv_key;           /* x */
25     int flags;
26     BN_MONT_CTX *method_mont_p;
27     /* Place holders if we want to do X9.42 DH */
28     BIGNUM *q;
29     BIGNUM *j;
30     unsigned char *seed;
31     int seedlen;
32     BIGNUM *counter;
33     int references;
34     CRYPTO_EX_DATA ex_data;
35     const DH_METHOD *meth;
36     ENGINE *engine;
37     CRYPTO_RWLOCK *lock;
38 };