BN_mod_lshift

Compute r = (a << n) mod m (left-shift then reduce).

Synopsis

Declared in <openssl/bn.h>

int
BN_mod_lshift(
    BIGNUM* r,
    BIGNUM const* a,
    int n,
    BIGNUM const* m,
    BN_CTX* ctx);

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
rDestination for the result.
aValue to shift.
nNumber of bits to shift left; must be non-negative.
mModulus; must be non-zero.
ctxBN_CTX for temporary storage.