BN_BLINDING_create_param

Create or refresh RSA blinding factors A and A^-1 mod m.

Synopsis

Declared in <openssl/bn.h>

BN_BLINDING*
BN_BLINDING_create_param(
    BN_BLINDING* b,
    BIGNUM const* e,
    BIGNUM* m,
    BN_CTX* ctx,
    int(* bn_mod_exp)(BIGNUM*, BIGNUM const*, BIGNUM const*, BIGNUM const*, BN_CTX*, BN_MONT_CTX*),
    BN_MONT_CTX* m_ctx);

Return Value

Blinding object on success, or NULL on error.

Parameters

NameDescription
bExisting BN_BLINDING to reuse, or NULL to allocate a new one.
ePublic exponent used when generating fresh factors (may be NULL to keep the stored value).
mModulus (copied into the blinding object when b is newly allocated).
ctxBN_CTX scratch space.
bn_mod_expModular exponentiation callback used internally, or NULL for BN_mod_exp_mont().
m_ctxOptional Montgomery context passed to bn_mod_exp, or NULL.