# include <openssl/bn.h>
# include <limits.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
BIGNUM *bn_wexpand(BIGNUM *a, int words);
BIGNUM *bn_expand2(BIGNUM *a, int words);
int bn_get_top(const BIGNUM *a);
-void bn_set_top(BIGNUM *a, int top);
-
int bn_get_dmax(const BIGNUM *a);
/* Set all words to zero */
*/
int bn_set_words(BIGNUM *a, BN_ULONG *words, int num_words);
-size_t bn_sizeof_BIGNUM(void);
-
/*
- * Return element el from an array of BIGNUMs starting at base (required
- * because callers do not know the size of BIGNUM at compilation time)
+ * Some BIGNUM functions assume most significant limb to be non-zero, which
+ * is customarily arranged by bn_correct_top. Output from below functions
+ * is not processed with bn_correct_top, and for this reason it may not be
+ * returned out of public API. It may only be passed internally into other
+ * functions known to support non-minimal or zero-padded BIGNUMs.
*/
-BIGNUM *bn_array_el(BIGNUM *base, int el);
-
-
-#ifdef __cplusplus
-}
-#endif
+int bn_mul_mont_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
+ BN_MONT_CTX *mont, BN_CTX *ctx);
+int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
+ BN_CTX *ctx);
#endif