blob: f6aba08b114f2c7f41d857ba1c662875b7575aae [file] [log] [blame] [view]
Manuel Pégourié-Gonnarde6e51aa2021-06-15 11:29:26 +02001The RNG parameter is now mandatory for all functions that accept one
2--------------------------------------------------------------------
3
4This change affects all users who called a function accepting a `f_rng`
5parameter with `NULL` as the value of this argument; this is no longer
6supported.
7
Manuel Pégourié-Gonnard87072592021-06-16 11:02:38 +02008The changed functions are: the X.509 CRT and CSR writing functions; the PK and
9RSA sign and decrypt functions; `mbedtls_rsa_private()`; the functions in DHM
10and ECDH that compute the shared secret; the scalar multiplication functions in
11ECP.
Manuel Pégourié-Gonnarde6e51aa2021-06-15 11:29:26 +020012
13You now need to pass a properly seeded, cryptographically secure RNG to all
14functions that accept a `f_rng` parameter. It is of course still possible to
15pass `NULL` as the context pointer `p_rng` if your RNG function doesn't need a
16context.
17
Manuel Pégourié-Gonnard87072592021-06-16 11:02:38 +020018Alternative implementations of a module (enabled with the `MBEDTLS_module_ALT`
19configuration options) may have their own internal and are free to ignore the
20`f_rng` argument but must allow users to pass one anyway.
21
Manuel Pégourié-Gonnarde6e51aa2021-06-15 11:29:26 +020022Some functions gained an RNG parameter
23--------------------------------------
24
25This affects users of the following functions: `mbedtls_ecp_check_pub_priv()`,
26`mbedtls_pk_check_pair()`, `mbedtls_pk_parse_key()`, and
27`mbedtls_pk_parse_keyfile()`.
28
29You now need to pass a properly seeded, cryptographically secure RNG when
30calling these functions. It is used for blinding, a counter-measure against
31side-channel attacks.
32
33The configuration option `MBEDTLS_ECP_NO_INTERNAL_RNG` was removed
34------------------------------------------------------------------
35
36This doesn't affect users of the default configuration; it only affects people
37who were explicitly setting this option.
38
39This was a trade-off between code size and counter-measures; it is no longer
40relevant as the counter-measure is now always on at no cost in code size.