Multiply then reduce using a reciprocal context: r = (x * y) mod m (m from recp).

Synopsis

Declared in <openssl/bn.h>

int
BN_mod_mul_reciprocal(
    BIGNUM* r,
    BIGNUM const* x,
    BIGNUM const* y,
    BN_RECP_CTX* recp,
    BN_CTX* ctx);

Return Value

1 on success, or 0 on failure.

Parameters

Name

Description

r

Destination for the product modulo the reciprocal modulus.

x

First multiplicand.

y

Second multiplicand.

recp

Reciprocal context previously set with BN_RECP_CTX_set().

ctx

BN_CTX for temporaries.

Created with MrDocs