mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 03:25:46 +01:00
- Increased size of generated value X
This commit is contained in:
parent
2b222c830b
commit
2a1fadffd7
@ -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 New Issue
Block a user