1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Merged support for secp224k1, secp192k1 and secp25k1

This commit is contained in:
Paul Bakker
2014-01-22 13:08:44 +01:00
10 changed files with 319 additions and 8 deletions

View File

@ -246,7 +246,7 @@ int ecdh_calc_secret( ecdh_context *ctx, size_t *olen,
if( mpi_size( &ctx->z ) > blen )
return( POLARSSL_ERR_ECP_BAD_INPUT_DATA );
*olen = ctx->grp.nbits / 8 + ( ( ctx->grp.nbits % 8 ) != 0 );
*olen = ctx->grp.pbits / 8 + ( ( ctx->grp.pbits % 8 ) != 0 );
return mpi_write_binary( &ctx->z, buf, *olen );
}