Add warning for PKCS 1.5 decryption
Any timing variance dependant on the output of this function enables a Bleichenbacher attack. It is extremely difficult to use safely. In the Marvin attack paper (https://people.redhat.com/~hkario/marvin/marvin-attack-paper.pdf) the author suggests that implementations of PKCS 1.5 decryption that don't include a countermeasure should be considered inherently dangerous. They suggest that all libraries implement the same countermeasure, as implementing different countermeasures across libraries enables the Bleichenbacher attack as well. This is extremely fragile and therefore we don't implement it. The use of PKCS 1.5 in Mbed TLS implements the countermeasures recommended in the TLS standard (7.4.7.1 of RFC 5246) and is not vulnerable. Add a warning to PKCS 1.5 decryption to warn users about this. Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
parent
16ab76bbe7
commit
393df9c995
2 changed files with 16 additions and 0 deletions
|
@ -1736,6 +1736,13 @@
|
|||
0)
|
||||
|
||||
/** RSA PKCS#1 v1.5 encryption.
|
||||
*
|
||||
* \warning Calling psa_asymmetric_decrypt() with this algorithm as a
|
||||
* parameter is considered an inherently dangerous function
|
||||
* (CWE-242). Unless it is used in a side channel free and safe
|
||||
* way (eg. implementing the TLS protocol as per 7.4.7.1 of
|
||||
* RFC 5246), the calling code is vulnerable.
|
||||
*
|
||||
*/
|
||||
#define PSA_ALG_RSA_PKCS1V15_CRYPT ((psa_algorithm_t) 0x07000200)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue