A custom modular exponentiation function using the OpenSSL BIGNUM library to carry out a Diffie-Hellman key exchange