BN_nist_mod_521

Fast reduction of a modulo the NIST P-521 prime.

Synopsis

Declared in <openssl/bn.h>

int
BN_nist_mod_521(
    BIGNUM* r,
    BIGNUM const* a,
    BIGNUM const* p,
    BN_CTX* ctx);

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
rDestination (may equal a).
aValue to reduce (non-negative).
pMust be the NIST P-521 prime (unused for the fast path but retained for API shape).
ctxBN_CTX scratch space (may be unused).