diff options
| author | Benedict <benedict@0xb8000.de> | 2016-12-09 18:29:31 +0100 |
|---|---|---|
| committer | Benedict <benedict@0xb8000.de> | 2017-02-21 13:00:26 +0100 |
| commit | 601bcda4cb9aaba2bd08810a46120a3d4c6b50d0 (patch) | |
| tree | c83187747eac98942a7c5b6faf728921686a05fe /lib/lib5.h | |
| parent | 6e5aaceed5c89e323acc1ce701f8cdf573058c46 (diff) | |
set5: task36: completed
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 |
