BIGNUM *BN_new();
void BN_free(a)
BIGNUM *a;
void BN_clear(a)
BIGNUM *a;
void BN_clear_free(a)
BIGNUM *a;
BIGNUM *BN_copy(a, b)
BIGNUM *a, *b;
BIGNUM *BN_dup(a)
BIGNUM *a;
char *BN_options();
BN_CTX *BN_CTX_new();
void BN_CTX_free(c)
BN_CTX *c;
BN_free frees the BIGNUM a. If a is NULL then no action is taken.
BN_clear Sets a to the value 0 and also zeros all unused allocated memory. This function is used to clear a variable of sensitive data.
BN_clear_free first zeros the memory used by a and then frees it. This function should be used to free BIGNUMs that have held sensitive numeric values like RSA private key values. Both this function and BN_clear are generally used only by RSA, DSA and DH routines. But see ssl/s3_srvr.c for an exception.
BN_copy copies from into to, which must have been previously allocated with BN_new. to will be expanded as needed to hold the new value. to is returned or NULL on error.
BN_dup creates a new BIGNUM and copies a into it. A pointer to the new structure is returned, or NULL on error.
BN_CTX_new creates a new BN_CTX structure and returns a pointer to it. All BIGNUMs contained in the BN_CTX are set to the value 0. A pointer to the new BN_CTX is returned or NULL on error.
BN_CTX_free frees the BN_CTX c. The BIGNUMs in c are BN_clear_free()ed.
bn_expand is an internal function that should not normally be called by the user. It ensures that b has enough room to store a bits bit number. The possinly expanded b is returnedI or NULL on error.