@ -483,16 +483,10 @@ static int voprf_sign_tt(const VOPRF_METHOD *method,
return 0 ;
}
if ( num_to_issue > ( ( size_t ) - 1 ) / sizeof ( EC_JACOBIAN ) | |
num_to_issue > ( ( size_t ) - 1 ) / sizeof ( EC_SCALAR ) ) {
OPENSSL_PUT_ERROR ( TRUST_TOKEN , ERR_R_OVERFLOW ) ;
return 0 ;
}
int ret = 0 ;
EC_JACOBIAN * BTs = OPENSSL_malloc ( num_to_issue * sizeof ( EC_JACOBIAN ) ) ;
EC_JACOBIAN * Zs = OPENSSL_malloc ( num_to_issue * sizeof ( EC_JACOBIAN ) ) ;
EC_SCALAR * es = OPENSSL_malloc ( num_to_issue * sizeof ( EC_SCALAR ) ) ;
EC_JACOBIAN * BTs = OPENSSL_calloc ( num_to_issue , sizeof ( EC_JACOBIAN ) ) ;
EC_JACOBIAN * Zs = OPENSSL_calloc ( num_to_issue , sizeof ( EC_JACOBIAN ) ) ;
EC_SCALAR * es = OPENSSL_calloc ( num_to_issue , sizeof ( EC_SCALAR ) ) ;
CBB batch_cbb ;
CBB_zero ( & batch_cbb ) ;
if ( ! BTs | |
@ -582,17 +576,11 @@ static STACK_OF(TRUST_TOKEN) *voprf_unblind_tt(
return NULL ;
}
if ( count > ( ( size_t ) - 1 ) / sizeof ( EC_JACOBIAN ) | |
count > ( ( size_t ) - 1 ) / sizeof ( EC_SCALAR ) ) {
OPENSSL_PUT_ERROR ( TRUST_TOKEN , ERR_R_OVERFLOW ) ;
return NULL ;
}
int ok = 0 ;
STACK_OF ( TRUST_TOKEN ) * ret = sk_TRUST_TOKEN_new_null ( ) ;
EC_JACOBIAN * BTs = OPENSSL_malloc ( count * sizeof ( EC_JACOBIAN ) ) ;
EC_JACOBIAN * Zs = OPENSSL_malloc ( count * sizeof ( EC_JACOBIAN ) ) ;
EC_SCALAR * es = OPENSSL_malloc ( count * sizeof ( EC_SCALAR ) ) ;
EC_JACOBIAN * BTs = OPENSSL_calloc ( count , sizeof ( EC_JACOBIAN ) ) ;
EC_JACOBIAN * Zs = OPENSSL_calloc ( count , sizeof ( EC_JACOBIAN ) ) ;
EC_SCALAR * es = OPENSSL_calloc ( count , sizeof ( EC_SCALAR ) ) ;
CBB batch_cbb ;
CBB_zero ( & batch_cbb ) ;
if ( ret = = NULL | |
@ -868,16 +856,10 @@ static int voprf_sign_impl(const VOPRF_METHOD *method,
return 0 ;
}
if ( num_to_issue > ( ( size_t ) - 1 ) / sizeof ( EC_JACOBIAN ) | |
num_to_issue > ( ( size_t ) - 1 ) / sizeof ( EC_SCALAR ) ) {
OPENSSL_PUT_ERROR ( TRUST_TOKEN , ERR_R_OVERFLOW ) ;
return 0 ;
}
int ret = 0 ;
EC_JACOBIAN * BTs = OPENSSL_malloc ( num_to_issue * sizeof ( EC_JACOBIAN ) ) ;
EC_JACOBIAN * Zs = OPENSSL_malloc ( num_to_issue * sizeof ( EC_JACOBIAN ) ) ;
EC_SCALAR * dis = OPENSSL_malloc ( num_to_issue * sizeof ( EC_SCALAR ) ) ;
EC_JACOBIAN * BTs = OPENSSL_calloc ( num_to_issue , sizeof ( EC_JACOBIAN ) ) ;
EC_JACOBIAN * Zs = OPENSSL_calloc ( num_to_issue , sizeof ( EC_JACOBIAN ) ) ;
EC_SCALAR * dis = OPENSSL_calloc ( num_to_issue , sizeof ( EC_SCALAR ) ) ;
if ( ! BTs | | ! Zs | | ! dis ) {
goto err ;
}
@ -984,17 +966,11 @@ static STACK_OF(TRUST_TOKEN) *voprf_unblind(
return NULL ;
}
if ( count > ( ( size_t ) - 1 ) / sizeof ( EC_JACOBIAN ) | |
count > ( ( size_t ) - 1 ) / sizeof ( EC_SCALAR ) ) {
OPENSSL_PUT_ERROR ( TRUST_TOKEN , ERR_R_OVERFLOW ) ;
return NULL ;
}
int ok = 0 ;
STACK_OF ( TRUST_TOKEN ) * ret = sk_TRUST_TOKEN_new_null ( ) ;
EC_JACOBIAN * BTs = OPENSSL_malloc ( count * sizeof ( EC_JACOBIAN ) ) ;
EC_JACOBIAN * Zs = OPENSSL_malloc ( count * sizeof ( EC_JACOBIAN ) ) ;
EC_SCALAR * dis = OPENSSL_malloc ( count * sizeof ( EC_SCALAR ) ) ;
EC_JACOBIAN * BTs = OPENSSL_calloc ( count , sizeof ( EC_JACOBIAN ) ) ;
EC_JACOBIAN * Zs = OPENSSL_calloc ( count , sizeof ( EC_JACOBIAN ) ) ;
EC_SCALAR * dis = OPENSSL_calloc ( count , sizeof ( EC_SCALAR ) ) ;
if ( ret = = NULL | | ! BTs | | ! Zs | | ! dis ) {
goto err ;
}