Lines Matching +full:for +full:- +full:context
6 * The Elliptic Curve Diffie-Hellman (ECDH) protocol is an anonymous
9 * elliptic-curve public–private key pair.
11 * For more information, see <em>NIST SP 800-56A Rev. 2: Recommendation for
12 * Pair-Wise Key Establishment Schemes Using Discrete Logarithm
17 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
29 * Mbed TLS supports two formats for ECDH contexts (#mbedtls_ecdh_context
30 * defined in `ecdh.h`). For most applications, the choice of format makes
35 * (56 bytes on a 32-bit platform). In future versions of the library, it
38 * context fields directly and with restartable ECP operations.
80 * The context used by the default ECDH implementation.
82 * Later versions might change the structure of this context, therefore users
93 mbedtls_ecp_restart_ctx MBEDTLS_PRIVATE(rs); /*!< The restart context for EC computations. */
101 * ECDSA context is not supported; objects of this type
103 * \brief The ECDH context structure.
117 int MBEDTLS_PRIVATE(restart_enabled); /*!< The flag for restartable mode. */
118 mbedtls_ecp_restart_ctx MBEDTLS_PRIVATE(rs); /*!< The restart context for EC computations. */
130 } MBEDTLS_PRIVATE(ctx); /*!< Implementation-specific context. The
131 context in use is specified by the \c var
134 uint8_t MBEDTLS_PRIVATE(restart_enabled); /*!< The flag for restartable mode. Functions of
145 * \brief Return the ECP group for provided context.
151 * \param ctx The ECDH context to parse. This must not be \c NULL.
153 * \return The \c mbedtls_ecp_group_id of the context.
158 * \brief Check whether a given group can be used for ECDH.
177 * domain parameters loaded, for example through
184 * \param p_rng The RNG context to be passed to \p f_rng. This may be
185 * \c NULL in case \p f_rng doesn't need a context argument.
205 * countermeasures against side-channel attacks.
206 * For more information, see mbedtls_ecp_mul().
209 * domain parameters loaded, for example through
218 * \param p_rng The RNG context to be passed to \p f_rng. This may be
220 * context argument.
232 * \brief This function initializes an ECDH context.
234 * \param ctx The ECDH context to initialize. This must not be \c NULL.
239 * \brief This function sets up the ECDH context with the information
246 * This is the first function used by a TLS server for ECDHE
249 * \param ctx The ECDH context to set up. This must be initialized.
250 * \param grp_id The group id of the group to set up the context for.
258 * \brief This function frees a context.
260 * \param ctx The context to free. This may be \c NULL, in which
262 * it must point to an initialized ECDH context.
271 * This is the second function used by a TLS server for ECDHE
276 * \param ctx The ECDH context to use. This must be initialized
277 * and bound to a group, for example via mbedtls_ecdh_setup().
283 * \param p_rng The RNG context to be passed to \p f_rng. This may be
284 * \c NULL in case \p f_rng doesn't need a context argument.
301 * sets up its ECDHE context from the server's public
306 * \param ctx The ECDHE context to use. This must be initialized.
325 * \brief This function sets up an ECDH context from an EC key.
328 * ServerKeyExchange for static ECDH, and imports ECDH
333 * \param ctx The ECDH context to set up. This must be initialized.
336 * - #MBEDTLS_ECDH_OURS: The key is ours.
337 * - #MBEDTLS_ECDH_THEIRS: The key is that of the peer.
351 * This is the second function used by a TLS client for ECDH(E)
356 * \param ctx The ECDH context to use. This must be initialized
365 * \param p_rng The RNG context to be passed to \p f_rng. This may be
366 * \c NULL in case \p f_rng doesn't need a context argument.
382 * This is the third function used by a TLS server for ECDH(E)
388 * \param ctx The ECDH context to use. This must be initialized
389 * and bound to a group, for example via mbedtls_ecdh_setup().
407 * countermeasures against side-channel attacks.
408 * For more information, see mbedtls_ecp_mul().
412 * \param ctx The ECDH context to use. This must be initialized
421 * \param p_rng The RNG context. This may be \c NULL if \p f_rng
422 * doesn't need a context argument.
436 * \brief This function enables restartable EC computations for this
437 * context. (Default: disabled.)
442 * computations once enabled, except by free-ing the context,
443 * which cancels possible in-progress operations.
445 * \param ctx The ECDH context to use. This must be initialized.