From c0edc96704c36c68a57da05f0cd20cf49376a000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 16 Oct 2018 10:38:19 +0200 Subject: [PATCH] Add comment on internal function API --- library/ecdh.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/ecdh.c b/library/ecdh.c index fb46845c90..eaad62c99b 100644 --- a/library/ecdh.c +++ b/library/ecdh.c @@ -41,6 +41,10 @@ #if !defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT) /* * Generate public key (restartable version) + * + * Note: this internal function relies on its caller preserving the value of + * the output parameter 'd' accross continuation calls. This would not be + * acceptable for a public function but is OK here as we control call sites. */ static int ecdh_gen_public_restartable( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q,