aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/dh/dh.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2013-07-30 18:05:08 +0100
committerDr. Stephen Henson <steve@openssl.org>2013-08-05 15:45:01 +0100
commitdc1ce3bc64845d16314af1f11acf5384e4ae9b34 (patch)
treea2d3c888ad4c955a57e2f805d410914b56d3ecb3 /crypto/dh/dh.h
parent3909087801729bebb3a1182936a855a47e4ee9c9 (diff)
downloadopenssl-dc1ce3bc64845d16314af1f11acf5384e4ae9b34.tar.gz
Add KDF for DH.
Add X9.42 DH KDF. Move sharedinfo generation code to CMS library as the same structure is used by DH and ECDH. Move ASN1_OBJECT typedef to ossl_typ.h so it can be picked up by dh headers without the need to use ASN1.
Diffstat (limited to 'crypto/dh/dh.h')
-rw-r--r--crypto/dh/dh.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h
index 53f9f26566..a86c64db01 100644
--- a/crypto/dh/dh.h
+++ b/crypto/dh/dh.h
@@ -239,6 +239,13 @@ DH *DH_get_1024_160(void);
DH *DH_get_2048_224(void);
DH *DH_get_2048_256(void);
+/* RFC2631 KDF */
+int DH_KDF_X9_42(unsigned char *out, size_t outlen,
+ const unsigned char *Z, size_t Zlen,
+ ASN1_OBJECT *key_oid,
+ const unsigned char *ukm, size_t ukmlen,
+ const EVP_MD *md);
+
#define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, NULL)