Lines Matching refs:buf
298 unsigned char *buf, size_t blen, in ecdh_make_params_internal() argument
332 if( ( ret = mbedtls_ecp_tls_write_group( &ctx->grp, &grp_len, buf, in ecdh_make_params_internal()
336 buf += grp_len; in ecdh_make_params_internal()
340 &pt_len, buf, blen ) ) != 0 ) in ecdh_make_params_internal()
355 unsigned char *buf, size_t blen, in mbedtls_ecdh_make_params() argument
362 ECDH_VALIDATE_RET( buf != NULL ); in mbedtls_ecdh_make_params()
372 return( ecdh_make_params_internal( ctx, olen, ctx->point_format, buf, blen, in mbedtls_ecdh_make_params()
380 buf, blen, f_rng, p_rng ) ); in mbedtls_ecdh_make_params()
384 ctx->point_format, buf, blen, in mbedtls_ecdh_make_params()
394 const unsigned char **buf, in ecdh_read_params_internal() argument
397 return( mbedtls_ecp_tls_read_point( &ctx->grp, &ctx->Qp, buf, in ecdh_read_params_internal()
398 end - *buf ) ); in ecdh_read_params_internal()
409 const unsigned char **buf, in mbedtls_ecdh_read_params() argument
415 ECDH_VALIDATE_RET( buf != NULL ); in mbedtls_ecdh_read_params()
416 ECDH_VALIDATE_RET( *buf != NULL ); in mbedtls_ecdh_read_params()
419 if( ( ret = mbedtls_ecp_tls_read_group_id( &grp_id, buf, end - *buf ) ) in mbedtls_ecdh_read_params()
427 return( ecdh_read_params_internal( ctx, buf, end ) ); in mbedtls_ecdh_read_params()
434 buf, end) ); in mbedtls_ecdh_read_params()
438 buf, end ) ); in mbedtls_ecdh_read_params()
521 unsigned char *buf, size_t blen, in ecdh_make_public_internal() argument
554 buf, blen ); in ecdh_make_public_internal()
561 unsigned char *buf, size_t blen, in mbedtls_ecdh_make_public() argument
568 ECDH_VALIDATE_RET( buf != NULL ); in mbedtls_ecdh_make_public()
576 return( ecdh_make_public_internal( ctx, olen, ctx->point_format, buf, blen, in mbedtls_ecdh_make_public()
584 buf, blen, f_rng, p_rng ) ); in mbedtls_ecdh_make_public()
588 ctx->point_format, buf, blen, in mbedtls_ecdh_make_public()
598 const unsigned char *buf, size_t blen ) in ecdh_read_public_internal() argument
601 const unsigned char *p = buf; in ecdh_read_public_internal()
607 if( (size_t)( p - buf ) != blen ) in ecdh_read_public_internal()
617 const unsigned char *buf, size_t blen ) in mbedtls_ecdh_read_public() argument
620 ECDH_VALIDATE_RET( buf != NULL ); in mbedtls_ecdh_read_public()
623 return( ecdh_read_public_internal( ctx, buf, blen ) ); in mbedtls_ecdh_read_public()
630 buf, blen ) ); in mbedtls_ecdh_read_public()
634 buf, blen ) ); in mbedtls_ecdh_read_public()
642 size_t *olen, unsigned char *buf, in ecdh_calc_secret_internal() argument
686 return mbedtls_mpi_write_binary_le( &ctx->z, buf, *olen ); in ecdh_calc_secret_internal()
688 return mbedtls_mpi_write_binary( &ctx->z, buf, *olen ); in ecdh_calc_secret_internal()
695 unsigned char *buf, size_t blen, in mbedtls_ecdh_calc_secret() argument
702 ECDH_VALIDATE_RET( buf != NULL ); in mbedtls_ecdh_calc_secret()
709 return( ecdh_calc_secret_internal( ctx, olen, buf, blen, f_rng, p_rng, in mbedtls_ecdh_calc_secret()
717 buf, blen, f_rng, p_rng ) ); in mbedtls_ecdh_calc_secret()
720 return( ecdh_calc_secret_internal( &ctx->ctx.mbed_ecdh, olen, buf, in mbedtls_ecdh_calc_secret()