Update the documentation of mbedtls_psa_ecp_load_representation

Document the new curve_bits parameter.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-02-08 18:39:18 +01:00
parent 2fa6b5f503
commit d88ccaef23
2 changed files with 10 additions and 2 deletions

View file

@ -80,10 +80,10 @@ psa_status_t mbedtls_psa_ecp_load_representation(
curve_bytes = data_length / 2;
/* Montgomery public keys are represented in compressed format, meaning
* their curve_size is equal to the amount of input. */
* their curve_bytes is equal to the amount of input. */
/* Private keys are represented in uncompressed private random integer
* format, meaning their curve_size is equal to the amount of input. */
* format, meaning their curve_bytes is equal to the amount of input. */
}
if( explicit_bits )

View file

@ -27,6 +27,14 @@
/** Load the contents of a key buffer into an internal ECP representation
*
* \param[in] type The type of key contained in \p data.
* \param[in] curve_bits The nominal bit-size of the curve.
* It must be consistent with the representation
* passed in \p data.
* This can be 0, in which case the bit-size
* is inferred from \p data_length (which is possible
* for all key types and representation formats
* formats that are currently supported or will
* be in the foreseeable future).
* \param[in] data The buffer from which to load the representation.
* \param[in] data_length The size in bytes of \p data.
* \param[out] p_ecp Returns a pointer to an ECP context on success.