Home | History | Annotate | Download | only in rsa

Lines Matching full:goto

94 	if (ctx == NULL) goto err;
100 if (r3 == NULL) goto err;
106 if(!rsa->n && ((rsa->n=BN_new()) == NULL)) goto err;
107 if(!rsa->d && ((rsa->d=BN_new()) == NULL)) goto err;
108 if(!rsa->e && ((rsa->e=BN_new()) == NULL)) goto err;
109 if(!rsa->p && ((rsa->p=BN_new()) == NULL)) goto err;
110 if(!rsa->q && ((rsa->q=BN_new()) == NULL)) goto err;
111 if(!rsa->dmp1 && ((rsa->dmp1=BN_new()) == NULL)) goto err;
112 if(!rsa->dmq1 && ((rsa->dmq1=BN_new()) == NULL)) goto err;
113 if(!rsa->iqmp && ((rsa->iqmp=BN_new()) == NULL)) goto err;
121 goto err;
122 if (!BN_sub(r2,rsa->p,BN_value_one())) goto err;
123 if (!BN_gcd(r1,r2,rsa->e,ctx)) goto err;
126 goto err;
129 goto err;
139 goto err;
145 goto err;
147 if (!BN_sub(r2,rsa->q,BN_value_one())) goto err;
148 if (!BN_gcd(r1,r2,rsa->e,ctx)) goto err;
152 goto err;
155 goto err;
164 if (!BN_mul(rsa->n,rsa->p,rsa->q,ctx)) goto err;
167 if (!BN_sub(r1,rsa->p,BN_value_one())) goto err; /* p-1 */
168 if (!BN_sub(r2,rsa->q,BN_value_one())) goto err; /* q-1 */
169 if (!BN_mul(r0,r1,r2,ctx)) goto err; /* (p-1)(q-1) */
177 if (!BN_mod_inverse(rsa->d,rsa->e,pr0,ctx)) goto err; /* d */
189 if (!BN_mod(rsa->dmp1,d,r1,ctx)) goto err;
192 if (!BN_mod(rsa->dmq1,d,r2,ctx)) goto err;
202 if (!BN_mod_inverse(rsa->iqmp,rsa->q,p,ctx)) goto err;