Skip to content
Commit fb733054 authored by SESA644425's avatar SESA644425 Committed by Tom Rini
Browse files

lib: rsa: Leverage existing data buffer instead of systematic copy



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: default avatarSESA644425 <gioja.hermann@non.se.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent c755aa8a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment