1.\" $OpenBSD: BN_kronecker.3,v 1.2 2022/11/15 17:55:00 schwarze Exp $ 2.\" 3.\" Copyright (c) 2022 Ingo Schwarze <schwarze@openbsd.org> 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.Dd $Mdocdate: November 15 2022 $ 18.Dt BN_KRONECKER 3 19.Os 20.Sh NAME 21.Nm BN_kronecker 22.Nd Kronecker symbol 23.Sh SYNOPSIS 24.In openssl/bn.h 25.Ft int 26.Fo BN_kronecker 27.Fa "const BIGNUM *a" 28.Fa "const BIGNUM *b" 29.Fa "BN_CTX *ctx" 30.Fc 31.Sh DESCRIPTION 32.Fn BN_kronecker 33computes the Kronecker symbol 34.Pq a | b , 35which generalizes the Legendre and Jacobi symbols 36for arbitrary integer numbers 37.Fa b . 38.Sh RETURN VALUES 39.Fn BN_kronecker 40returns \-1, 0, or 1 in case of success or \-2 on error. 41.Sh SEE ALSO 42.Xr BN_CTX_new 3 , 43.Xr BN_gcd 3 , 44.Xr BN_mod_sqrt 3 , 45.Xr BN_new 3 46.Rs 47.%A Henri Cohen 48.%B A Course in Computational Algebraic Number Theory 49.%I Springer 50.%C Berlin 51.%D 1993 52.%O Algorithm 1.4.10 53.Re 54.Sh HISTORY 55.Fn BN_kronecker 56first appeared in OpenSSL 0.9.7 and has been available since 57.Ox 3.2 . 58