feat(runtime/rmi): implement RMI_PDEV_SET_PUBKEY
Validate the public key length and key algorithm based on RMM
specification. Convert the raw public key to mbedtls ecdh or rsa context
based on key algorithm. Set public context in libspdm connection.
Compute the digest of the public key as part of attestation evidence.
This change also adds a patch to libspdm which will set the PUB_KEY to
the spdm connection in provided certificate slot id.
Supports public key from certificate that uses asym algo of type
ECDSA_P256, ECDSA_P384 or RSASSA_3072.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
Change-Id: I3d5efa12fe7c267120664ff88e81964db298a9c7
9 files changed