Convert a into the Montgomery domain for modulus mont.

Synopsis

Declared in <openssl/bn.h>

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

Return Value

1 on success, or 0 on error.

Parameters

Name

Description

r

Destination for aR mod m.

a

Value to convert (typically reduced modulo m).

mont

Montgomery context initialized for modulus m.

ctx

BN_CTX for temporary storage.

Created with MrDocs