Simplify usage of DHM blinding
This commit is contained in:
parent
c83e418149
commit
15d5de1969
8 changed files with 62 additions and 57 deletions
|
@ -230,13 +230,11 @@ int dhm_make_public( dhm_context *ctx, int x_size,
|
|||
*
|
||||
* \return 0 if successful, or an POLARSSL_ERR_DHM_XXX error code
|
||||
*
|
||||
* \note If f_rng is not NULL, it is used to blind the input as
|
||||
* countermeasure against timing attacks. This is only useful
|
||||
* when this function is called repeatedly with the same
|
||||
* secret value (X field), eg when using DH key exchange as
|
||||
* opposed to DHE. It is recommended to use a non-NULL f_rng
|
||||
* only when needed, since otherwise this countermeasure has
|
||||
* high overhead.
|
||||
* \note If non-NULL, f_rng is used to blind the input as
|
||||
* countermeasure against timing attacks. Blinding is
|
||||
* automatically used if and only if our secret value X is
|
||||
* re-used and costs nothing otherwise, so it is recommended
|
||||
* to always pass a non-NULL f_rng argument.
|
||||
*/
|
||||
int dhm_calc_secret( dhm_context *ctx,
|
||||
unsigned char *output, size_t *olen,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue