22 #ifndef AVFORMAT_RTMPDH_H
23 #define AVFORMAT_RTMPDH_H
29 #if CONFIG_GMP || CONFIG_GCRYPT
33 typedef mpz_ptr FFBigNum;
37 typedef gcry_mpi_t FFBigNum;
40 typedef struct FF_DH {
49 #include <openssl/bn.h>
50 #include <openssl/dh.h>
52 typedef BIGNUM *FFBigNum;
101 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.