Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
NAME
bn_mul_words, bn_mul_add_words, bn_sqr_words, bn_div_words, bn_add_words, bn_sub_words, bn_mul_comba4, bn_mul_comba8, bn_sqr_comba4, bn_sqr_comba8, bn_mul_normal, bn_expand, bn_wexpand — BIGNUM library internal functionsSYNOPSIS
#include bn_local.hbn_mul_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w);
bn_mul_add_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w);
bn_sqr_words(BN_ULONG *rp, BN_ULONG *ap, int num);
bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d);
bn_add_words(BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp, int num);
bn_sub_words(BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp, int num);
bn_mul_comba4(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b);
bn_mul_comba8(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b);
bn_sqr_comba4(BN_ULONG *r, BN_ULONG *a);
bn_sqr_comba8(BN_ULONG *r, BN_ULONG *a);
bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb);
bn_expand(BIGNUM *a, int bits);
bn_wexpand(BIGNUM *a, int n);
DESCRIPTION
This page documents some internal functions used by the BIGNUM implementation. They are described here to facilitate debugging and extending the library. They are not to be used by applications.The BIGNUM structure
typedef struct bignum_st BIGNUM; struct bignum_st { BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ int top; /* Index of last used d +1. */ /* The next are internal book keeping for bn_expand. */ int dmax; /* Size of the d array. */ int neg; /* one if the number is negative */ int flags; };