BN_exp

Compute r = a^p (non-modular exponentiation).

Synopsis

Declared in <openssl/bn.h>

int
BN_exp(
    BIGNUM* r,
    BIGNUM const* a,
    BIGNUM const* p,
    BN_CTX* ctx);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
rResult BIGNUM.
aBase.
pNon-negative exponent.
ctxBN_CTX for temporaries.