123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #ifndef OSSL_CRYPTO_BN_H
- # define OSSL_CRYPTO_BN_H
- # include <openssl/bn.h>
- # include <limits.h>
- BIGNUM *bn_wexpand(BIGNUM *a, int words);
- BIGNUM *bn_expand2(BIGNUM *a, int words);
- void bn_correct_top(BIGNUM *a);
- signed char *bn_compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len);
- int bn_get_top(const BIGNUM *a);
- int bn_get_dmax(const BIGNUM *a);
- void bn_set_all_zero(BIGNUM *a);
- int bn_copy_words(BN_ULONG *out, const BIGNUM *in, int size);
- BN_ULONG *bn_get_words(const BIGNUM *a);
- void bn_set_static_words(BIGNUM *a, const BN_ULONG *words, int size);
- int bn_set_words(BIGNUM *a, const BN_ULONG *words, int num_words);
- 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);
- int bn_from_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
- BN_CTX *ctx);
- int bn_mod_add_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
- const BIGNUM *m);
- int bn_mod_sub_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
- const BIGNUM *m);
- int bn_mul_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
- int bn_sqr_fixed_top(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
- int bn_lshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n);
- int bn_rshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n);
- int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
- const BIGNUM *d, BN_CTX *ctx);
- #endif
|