libressl-BN_kronecker(3)

libressl-BN_kronecker3

Kronecker symbol

Usage

Crypto Library (libcrypto, -lcrypto)

#include <openssl/bn.h>

int

BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);

Overview

BN_kronecker() computes the Kronecker symbol (a | b), which generalizes the Legendre and Jacobi symbols for arbitrary integer numbers b.

Return values

BN_kronecker() returns -1, 0, or 1 in case of success or -2 on error.

History

BN_kronecker() first appeared in OpenSSL 0.9.7 and has been available since OpenBSD 3.2.

From libressl 4.4.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.