BN_mod_mul_montgomery

Montgomery multiply a and b modulo mont's modulus into r.

Synopsis

Declared in <openssl/bn.h>

int
BN_mod_mul_montgomery(
    BIGNUM* r,
    BIGNUM const* a,
    BIGNUM const* b,
    BN_MONT_CTX* mont,
    BN_CTX* ctx);

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
rDestination product in the Montgomery domain (or ordinary form depending on inputs).
aFirst factor (typically already in Montgomery form).
bSecond factor (typically already in Montgomery form).
montMontgomery context from BN_MONT_CTX_set().
ctxBN_CTX scratch space.