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

Name

Description

r

Destination (may equal a).

a

Value to reduce (non‐negative).

p

Must be the NIST P‐521 prime (unused for the fast path but retained for API shape).

ctx

BN_CTX scratch space (may be unused).

Created with MrDocs