22 #ifndef AVFORMAT_RTMPDH_H
23 #define AVFORMAT_RTMPDH_H
28 #if CONFIG_GMP || CONFIG_GCRYPT
32 typedef mpz_ptr FFBigNum;
36 typedef gcry_mpi_t FFBigNum;
39 typedef struct FF_DH {
48 #include <openssl/bn.h>
49 #include <openssl/dh.h>
51 typedef BIGNUM *FFBigNum;
100 int pub_key_len,
uint8_t *secret_key,
int ff_dh_compute_shared_secret_key(FF_DH *dh, const uint8_t *pub_key, int pub_key_len, uint8_t *secret_key, int secret_key_len)
Compute the shared secret key from the private FF_DH value and the other party's public value...
void ff_dh_free(FF_DH *dh)
Free a Diffie-Hellmann context.
FF_DH * ff_dh_init(int key_len)
Initialize a Diffie-Hellmann context.
int ff_dh_write_public_key(FF_DH *dh, uint8_t *pub_key, int pub_key_len)
Write the public key into the given buffer.
int ff_dh_generate_public_key(FF_DH *dh)
Generate a public key.