NAME
BNaddword, BNsubword, BNmulword, BNdivword, BNmodword -
arithmetic functions on BIGNUMs with integersSYNOPSIS
#include
int BNaddword(BIGNUM *a, BNULONG w); int BNsubword(BIGNUM *a, BNULONG w); int BNmulword(BIGNUM *a, BNULONG w); BNULONG BNdivword(BIGNUM *a, BNULONG w); BNULONG BNmodword(const BIGNUM *a, BNULONG w);DESCRIPTION
These functions perform arithmetic operations on BIGNUMs with unsigned integers. They are much more efficient than the normal BIGNUM arithmetic operations. BNaddword() adds ww to aa ("a+=w").BNsubword() subtracts ww from aa ("a-=w").
BNmulword() multiplies aa and ww ("a*=b"). BNdivword() divides aa by ww ("a/=w") and returns the remainder.BNmodword() returns the remainder of aa divided by ww ("a%m").
For BNdivword() and BNmodword(), ww must not be 0.RETURN VALUES
BNaddword(), BNsubword() and BNmulword() return 1 for success, 0 on error. The error codes can be obtained by ERRgeterror(3).BNmodword() and BNdivword() return aa%ww.
SEE ALSO
bn(3), ERRgeterror(3), BNadd(3) HISTORY BNaddword() and BNmodword() are available in all versions of SSLeay and OpenSSL. BNdivword() was added in SSLeay 0.8, and BNsubword() and BNmulword() in SSLeay 0.9.0.0.9.7l 2002-09-25 BNaddword(3)