mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 09:38:26 +00:00
- Increased size of generated value X
This commit is contained in:
parent
2b222c830b
commit
2a1fadffd7
1 changed files with 2 additions and 2 deletions
|
@ -106,7 +106,7 @@ int dhm_make_params( dhm_context *ctx, int x_size,
|
|||
MPI_CHK( mpi_grow( &ctx->X, n ) );
|
||||
MPI_CHK( mpi_lset( &ctx->X, 0 ) );
|
||||
|
||||
n = x_size >> 3;
|
||||
n = x_size - 1;
|
||||
p = (unsigned char *) ctx->X.p;
|
||||
for( i = 0; i < n; i++ )
|
||||
*p++ = (unsigned char) f_rng( p_rng );
|
||||
|
@ -183,7 +183,7 @@ int dhm_make_public( dhm_context *ctx, int x_size,
|
|||
MPI_CHK( mpi_grow( &ctx->X, n ) );
|
||||
MPI_CHK( mpi_lset( &ctx->X, 0 ) );
|
||||
|
||||
n = x_size >> 3;
|
||||
n = x_size - 1;
|
||||
p = (unsigned char *) ctx->X.p;
|
||||
for( i = 0; i < n; i++ )
|
||||
*p++ = (unsigned char) f_rng( p_rng );
|
||||
|
|
Loading…
Reference in a new issue