BN_mod_sqr

Compute r = (a * a) mod m.

Synopsis

Declared in <openssl/bn.h>

int
BN_mod_sqr(
    BIGNUM* r,
    BIGNUM const* a,
    BIGNUM const* m,
    BN_CTX* ctx);

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
rDestination square.
aValue to square.
mModulus.
ctxBN_CTX scratch space.