OpenBSD manual page server

Manual Page Search Parameters

BN_ZERO(3) Library Functions Manual BN_ZERO(3)

BN_zero, BN_one, BN_value_one, BN_set_word, BN_get_wordBIGNUM assignment operations

#include <openssl/bn.h>

BN_zero(BIGNUM *a);

BN_one(BIGNUM *a);

const BIGNUM *

BN_set_word(BIGNUM *a, unsigned long w);

unsigned long
BN_get_word(BIGNUM *a);

(), (), and () set a to the values 0, 1 and w respectively. BN_zero() and BN_one() are macros.

() returns a BIGNUM constant of value 1. This constant is useful for use in comparisons and assignment.

() returns a if it can be represented as an unsigned long.

BN_get_word() returns the value a, or 0xffffffffL if a cannot be represented as an unsigned long.

BN_zero(), BN_one(), and BN_set_word() return 1 on success, 0 otherwise. BN_value_one() returns the constant.

BN_bn2bin(3), BN_new(3), BN_set_bit(3), BN_set_negative(3)

BN_zero(), BN_one(), and BN_set_word() are available in all versions of SSLeay and OpenSSL. BN_value_one() and BN_get_word() were added in SSLeay 0.8.

BN_value_one() was changed to return a true const BIGNUM * in OpenSSL 0.9.7.

Someone might change the constant.

If a BIGNUM is equal to 0xffffffffL; it can be represented as an unsigned long but this value is also returned on error.

December 10, 2016 OpenBSD-6.1