---
name: "libressl-BN_kronecker"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-BN_kronecker"
---

# libressl-BN\_kronecker(3)

Kronecker symbol

## NAME

**BN\_kronecker** – Kronecker symbol

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/bn.h\>**

*int*\

**BN\_kronecker**(*const BIGNUM \*a*, *const BIGNUM \*b*, *BN\_CTX \*ctx*);

## DESCRIPTION

**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.

## SEE ALSO

BN\_CTX\_new(3), BN\_gcd(3), BN\_mod\_sqrt(3), BN\_new(3) Henri Cohen, *A Course in Computational Algebraic Number Theory*, Springer, Berlin, 1993, Algorithm 1.4.10.

## HISTORY

**BN\_kronecker**() first appeared in OpenSSL 0.9.7 and has been available since OpenBSD 3.2.
