GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BN_ZERO(3) FreeBSD 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>

int
BN_zero(BIGNUM *a);

int
BN_one(BIGNUM *a);

const BIGNUM *
BN_value_one(void);

int
BN_set_word(BIGNUM *a, BN_ULONG w);

BN_ULONG
BN_get_word(const BIGNUM *a);

BN_ULONG is a macro that expands to an unsigned integral type optimized for the most efficient implementation on the local platform. It is unsigned long (= uint64_t) on _LP64 platforms and unsigned int (= uint32_t) elsewhere.

(), (), and () set a to the values 0, 1 and w respectively.

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

BN_get_word() returns the value a, or a number with all bits set if a cannot be represented as a BN_ULONG.

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(), BN_value_one(), and BN_set_word() first appeared in SSLeay 0.5.1. BN_get_word() first appeared in SSLeay 0.6.0. These functions have been available since OpenBSD 2.4.

Someone might change the constant.

If the value of a BIGNUM is equal to a BN_ULONG with all bits set, the return value of BN_get_word() collides with return value used to indicate errors.

BN_ULONG should probably be a typedef rather than a macro.

April 30, 2023 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.