[PATCH 2/3] lib: rsa: Leverage existing data buffer instead of systematic copy
Simon Glass
sjg at chromium.org
Sat Mar 12 03:43:55 CET 2022
Hi,
On Wed, 9 Mar 2022 at 02:28, SESA644425 <giojahermann at gmail.com> wrote:
>
> Prior to introduction of modifications in rsassa_pss functions
> related to padding verification, doing a pass to reduce memory
> consumption of function by replacing memory copies of parts of
> const buffer by pointers to the original buffer (masked_db and
> h are subparts of msg buffer which is declared 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 <gioja.hermann at non.se.com>
> ---
> Despite checkpath.pl recommendation, it is not possible to use u8 instead
> of uint8_t. Proceeding with u8 breaks build with error: unknown type name u8
Yes any code compiled by host tools must use uint8_t/
> lib/rsa/rsa-verify.c | 37 ++++++++++++++++++-------------------
> 1 file changed, 18 insertions(+), 19 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list