Ronald Cron | 6fe1bc3 | 2021-06-07 09:35:02 +0200 | [diff] [blame^] | 1 | Remove the padding parameters from mbedtls_rsa_init() |
| 2 | ----------------------------------------------------- |
| 3 | |
| 4 | This affects all users who use the RSA encryption, decryption, sign and |
| 5 | verify APIs. |
| 6 | |
| 7 | The function mbedtls_rsa_init() no longer supports selecting the PKCS#1 v2.1 |
| 8 | encoding and its hash. It just selects the PKCS#1 v1.5 encoding by default. If |
| 9 | you were using the PKCS#1 v2.1 encoding you now need, subsequently to the call |
| 10 | to mbedtls_rsa_init(), to call mbedtls_rsa_set_padding() to set it. |
| 11 | |
| 12 | Code migration examples: |
| 13 | ```C |
| 14 | mbedtls_rsa_init(ctx, padding, hash_id); |
| 15 | ``` |
| 16 | to |
| 17 | ```C |
| 18 | mbedtls_rsa_init(ctx); |
| 19 | mbedtls_rsa_set_padding(ctx, padding, hash_id); |
| 20 | ``` |
| 21 | or |
| 22 | ```C |
| 23 | mbedtls_rsa_init(ctx, MBEDTLS_RSA_PKCS_V15, <ignored>); |
| 24 | ``` |
| 25 | to |
| 26 | ```C |
| 27 | mbedtls_rsa_init(ctx); |
| 28 | ``` |
| 29 | |