diff options
Diffstat (limited to 'lib/lib5.h')
| -rw-r--r-- | lib/lib5.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -30,6 +30,21 @@ struct dh_param_bignum { BIGNUM *s2; }; +struct srp_context { + BIGNUM *salt; + BIGNUM *v; + BIGNUM *g; + BIGNUM *N; + BIGNUM *a; + BIGNUM *u; + BIGNUM *k; + BIGNUM *b; + BIGNUM *B; + BIGNUM *A; + char client_K[20]; + char server_K[20]; +}; + // global openssl context for auxaliry results BN_CTX *ctx; BIO *out; @@ -94,4 +109,11 @@ 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); +void srp_server_init(char *email, char *password, struct srp_context *srpc); +void srp_client_send1(char *email, struct srp_context *srpc); +void srp_server_send1(struct srp_context *srpc); +void srp_compute_uH(struct srp_context *srpc); +void srp_client_prepare_k(struct srp_context *srpc, char *password); +void srp_server_prepare_k(struct srp_context *srpc); +void srp_context_init(struct srp_context *s); #endif |
