[PATCH 3/3] lib: rsa: Update function padding_pss_verify (any-salt)

2022-03-09 Thread SESA644425
Modify function to support any salt length instead of max length only. Function now detects salt length by parsing the content of db buffer. Note that it works with (but is not limited to) zero-length, digest-length and max-length Signed-off-by: SESA644425 --- Despite checkpath.pl recommendation

[PATCH 2/3] lib: rsa: Leverage existing data buffer instead of systematic copy

2022-03-09 Thread SESA644425
const, salt is a subpart of db which is a working buffer, unmodified after being filled). New pointers scope is limited to the function where they are declared (not returned to caller by any mean), zeroing risk of memory fault related to the change. Signed-off-by: SESA644425 --- Despite

[PATCH 1/3] lib: rsa: Fix const-correctness of rsassa_pss functions

2022-03-09 Thread SESA644425
Prior to introduction of modifications in rsassa_pss functions related to padding verification, doing a pass to update const-correctness in targeted functions to comply with coding-rules and avoid const-cast Signed-off-by: SESA644425 --- Despite checkpath.pl recommendation, it is not possible

[PATCH 0/3] Support any-salt for padding pss verification

2022-03-09 Thread SESA644425
This patchset does add support for any salt length in function padding_pss_verify which currently supports only max salt-length option. The fix is preceded by two changes to enhance memory consumption and const-correctness in the area of the patch. - Hermann Gioja - SESA644425 (3): lib: rsa