diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2013-07-30 18:05:08 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2013-10-01 14:01:18 +0100 |
commit | 5c4ff8ad37302e982edbb405f810492350885060 (patch) | |
tree | e7d80dd1ee63f1be6ccda319c2283494bc6aaafa /crypto/dh/dh.h | |
parent | dc427fc8e2f5f1212e4fe2c00409ab220bc0ebe1 (diff) |
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.
(cherry picked from commit dc1ce3bc64845d16314af1f11acf5384e4ae9b34)
Diffstat (limited to 'crypto/dh/dh.h')
-rw-r--r-- | crypto/dh/dh.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h index 5e356f618b..e59a1705a6 100644 --- a/crypto/dh/dh.h +++ b/crypto/dh/dh.h @@ -232,6 +232,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) |