diff options
author | Julius Werner <jwerner@chromium.org> | 2022-08-09 18:46:50 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2022-08-12 20:59:59 +0000 |
commit | 99a9928447568e0144a61ea1d1799ecd99b31b9d (patch) | |
tree | 346de50def36a9f1c46d8dd4adf476acce33105c /3rdparty/blobs | |
parent | 5ef258b3f6a6481d20f1fca0f60db894b80649ab (diff) |
soc/(amd|rockchip): Update vb2ex_hwcrypto implementations to new API req
We want to extend the vb2ex_hwcrypto APIs on the vboot side to allow
passing 0 for the data_size parameter to vb2ex_hwcrypto_digest_init()
(see CL:3825558). This is because not all use cases allow knowing the
amount of data to be hashed beforehand (most notable the metadata hash
for CBFS verification), and some HW crypto engines do not need this
information, so we don't want to preclude them from optimizing these use
cases just because others do.
The new API requirement is that data_size may be 0, which indicates that
the amount of data to be hashed is unknown. If a HW crypto engine cannot
support this case, it should return VB2_ERROR_EX_HWCRYPTO_UNSUPPORTED to
those calls (this patch adds the code to do that to existing HW crypto
implementations). If the passed-in data_size value is non-zero, the HW
crypto implementation can trust that it is accurate.
Also reduce a bit of the console spew for existing HW crypto
implementations, since vboot already logs the same information anyway.
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Ieb7597080254b31ef2bdbc0defc91b119c618380
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66621
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to '3rdparty/blobs')
0 files changed, 0 insertions, 0 deletions