diff options
Diffstat (limited to 'lib/lib5.h')
| -rw-r--r-- | lib/lib5.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -4,7 +4,9 @@ #include <stdlib.h> #include <stdint.h> #include <gmp.h> +#include <math.h> #include <openssl/bn.h> +#include<openssl/bio.h> struct dh_param { mpz_t A; @@ -19,6 +21,7 @@ struct dh_param { // global openssl context for auxaliry results BN_CTX *ctx; +BIO *out; struct extended_euclid { int d; @@ -61,8 +64,18 @@ int rsa_decrpyt(int message, struct rsa_key *private); int rsa_encrypt(int message, struct rsa_key *public); int modulo(int a, int b); void extended_euclid_algo(int a, int b, struct extended_euclid *e); +void extended_euclid_algo_bignum(BIGNUM *a, BIGNUM *b, struct extended_euclid_bignum *e); int rsa_generate_key_bignum(struct rsa_key_bignum *public, struct rsa_key_bignum *private); int free_rsa_key_bignum(struct rsa_key_bignum *t); int modular_multiplicative_inverse_bignum_my(BIGNUM *res, BIGNUM *number, BIGNUM *modulo); int modular_multiplicative_inverse(int number, int _modulo); +int rsa_broadcast_cube(BIGNUM *res, BIGNUM **a, BIGNUM **n); +int chinese_remainder_theorem_bignum(BIGNUM *solution, BIGNUM *sol_no_mod, BIGNUM **a, BIGNUM **n, int len); +int check_co_prime_bignum(BIGNUM *a, BIGNUM *b); +int check_co_prime_bignum(BIGNUM *a, BIGNUM *b); +int __chinese_remainder_theorem_bignum(BIGNUM *solution, BIGNUM *sol_no_mod, BIGNUM **a, BIGNUM **n, int len); +int check_co_prime(int a, int b); +int __chinese_remainder_theorem(int *a, int *n, int len); +int nth_root_bignum(BIGNUM *res, BIGNUM *number, BIGNUM *n); +double nth_root_wr(double x, int n); #endif |
