Lines Matching defs:dh
157 static int DH_zencod_bn_mod_exp ( const DH *dh, BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
159 static int DH_zencod_generate_key ( DH *dh ) ;
160 static int DH_zencod_compute_key ( unsigned char *key, const BIGNUM *pub_key, DH *dh ) ;
971 static int DH_zencod_generate_key ( DH *dh )
986 if ( dh->priv_key ) {
987 bn_prv = dh->priv_key;
998 if ( dh->pub_key )
999 bn_pub = dh->pub_key;
1007 if ( !bn_wexpand ( bn_prv, dh->p->dmax ) ||
1008 !bn_wexpand ( bn_pub, dh->p->dmax ) ) {
1012 bn_prv->top = dh->p->top;
1013 bn_pub->top = dh->p->top;
1016 BIGNUM2ZEN ( &p, dh->p ) ;
1017 BIGNUM2ZEN ( &g, dh->g ) ;
1020 x.len = DH_size(dh) * 8;
1033 dh->priv_key = bn_prv;
1034 dh->pub_key = bn_pub;
1039 if (!dh->priv_key && bn_prv)
1041 if (!dh->pub_key && bn_pub)
1048 static int DH_zencod_compute_key ( unsigned char *key, const BIGNUM *pub_key, DH *dh )
1059 if ( !dh->priv_key ) {
1066 BIGNUM2ZEN ( &x, dh->priv_key ) ;
1067 BIGNUM2ZEN ( &p, dh->p ) ;
1089 static int DH_zencod_bn_mod_exp ( const DH *dh, BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,