Divide m by the reciprocal modulus in recp, producing quotient and remainder.

Synopsis

Declared in <openssl/bn.h>

int
BN_div_recp(
    BIGNUM* dv,
    BIGNUM* rem,
    BIGNUM const* m,
    BN_RECP_CTX* recp,
    BN_CTX* ctx);

Return Value

1 on success, or 0 on failure.

Parameters

Name

Description

dv

Destination for the quotient, or NULL if not required.

rem

Destination for the remainder, or NULL if not required.

m

Dividend.

recp

Reciprocal context previously set up for the divisor.

ctx

BN_CTX for temporaries.

Created with MrDocs