amd/picasso/verstage: replace rsa accel with modexp
commit362ec8dee21950b1f5e7f209c22311d7bebfb435
authorKangheui Won <khwon@chromium.org>
Fri, 2 Oct 2020 06:12:02 +0000 (2 16:12 +1000)
committerPatrick Georgi <pgeorgi@google.com>
Mon, 19 Oct 2020 06:53:51 +0000 (19 06:53 +0000)
treebe4bc4aad99940c03410ea10dcab57169dd46973
parent5b6ec3e4dcd63baea3355dd1af075ae44b4cd091
amd/picasso/verstage: replace rsa accel with modexp

Replace vb2ex_hwcrypto_rsa_verify_digest with vb2ex_hwcrypto_modexp.

Instead of using hardware acceleration for whole RSA process,
acclerating only calculation part(modexp) increases transparency
without affecting boot time.

BUG=b:169157796
BRANCH=zork
TEST=build and flash, check time spent on RSA is not changed

Change-Id: I085f043bf2014615d2c9db6df0b7947ee84b9546
Signed-off-by: Kangheui Won <khwon@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45987
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
src/soc/amd/picasso/psp_verstage/vboot_crypto.c