1
- /* $OpenBSD: bn_blind.c,v 1.34 2023/08/08 14:40:56 tb Exp $ */
1
+ /* $OpenBSD: bn_blind.c,v 1.35 2023/08/08 15:10:34 tb Exp $ */
2
2
/* ====================================================================
3
3
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4
4
*
@@ -179,7 +179,7 @@ BN_BLINDING_free(BN_BLINDING *r)
179
179
}
180
180
181
181
static int
182
- BN_BLINDING_setup (BN_BLINDING * ret , BN_CTX * ctx )
182
+ BN_BLINDING_setup (BN_BLINDING * b , BN_CTX * ctx )
183
183
{
184
184
int retry_counter = 32 ;
185
185
@@ -188,9 +188,9 @@ BN_BLINDING_setup(BN_BLINDING *ret, BN_CTX *ctx)
188
188
* we have basically factored mod = (p-1)(q-1)...
189
189
*/
190
190
do {
191
- if (!BN_rand_range (ret -> A , ret -> mod ))
191
+ if (!BN_rand_range (b -> A , b -> mod ))
192
192
return 0 ;
193
- if (BN_mod_inverse_ct (ret -> Ai , ret -> A , ret -> mod , ctx ) == NULL ) {
193
+ if (BN_mod_inverse_ct (b -> Ai , b -> A , b -> mod , ctx ) == NULL ) {
194
194
/* this should almost never happen for good RSA keys */
195
195
unsigned long error = ERR_peek_last_error ();
196
196
if (ERR_GET_REASON (error ) == BN_R_NO_INVERSE ) {
@@ -205,12 +205,12 @@ BN_BLINDING_setup(BN_BLINDING *ret, BN_CTX *ctx)
205
205
break ;
206
206
} while (1 );
207
207
208
- if (ret -> bn_mod_exp != NULL && ret -> m_ctx != NULL ) {
209
- if (!ret -> bn_mod_exp (ret -> A , ret -> A , ret -> e , ret -> mod ,
210
- ctx , ret -> m_ctx ))
208
+ if (b -> bn_mod_exp != NULL && b -> m_ctx != NULL ) {
209
+ if (!b -> bn_mod_exp (b -> A , b -> A , b -> e , b -> mod ,
210
+ ctx , b -> m_ctx ))
211
211
return 0 ;
212
212
} else {
213
- if (!BN_mod_exp_ct (ret -> A , ret -> A , ret -> e , ret -> mod , ctx ))
213
+ if (!BN_mod_exp_ct (b -> A , b -> A , b -> e , b -> mod , ctx ))
214
214
return 0 ;
215
215
}
216
216
0 commit comments