vboot2: remove rsa from vb2_hwcrypto_rsa_allowed

Initially vb2_hwcrypto_rsa_allowed were meant to only determine if we
can use rsa hardware acceleration. However we're planning to also use
this method for hashing, hence drop rsa from the name.

BUG=b:166038345
BRANCH=zork
TEST=CC=x86_64-pc-linux-gnu-clang make runtests

Signed-off-by: Kangheui Won <khwon@chromium.org>
Change-Id: I9efb05b3d035dcd584a47d006415ea87bf931ad6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2566865
Reviewed-by: Joel Kitching <kitching@chromium.org>
diff --git a/firmware/2lib/2api.c b/firmware/2lib/2api.c
index 95dc6c2..28de834 100644
--- a/firmware/2lib/2api.c
+++ b/firmware/2lib/2api.c
@@ -355,7 +355,7 @@
 				      vb2_member_of(sd, sd->data_key_offset),
 				      sd->data_key_size));
 
-	key.allow_hwcrypto = vb2_hwcrypto_rsa_allowed(ctx);
+	key.allow_hwcrypto = vb2_hwcrypto_allowed(ctx);
 
 	/*
 	 * Check digest vs. signature.  Note that this destroys the signature.
diff --git a/firmware/2lib/include/2secdata.h b/firmware/2lib/include/2secdata.h
index 880a2ec..c3355f8 100644
--- a/firmware/2lib/include/2secdata.h
+++ b/firmware/2lib/include/2secdata.h
@@ -217,9 +217,10 @@
 uint8_t *vb2_secdata_fwmp_get_dev_key_hash(struct vb2_context *ctx);
 
 /*
- * Helper function to check if hwcrypto for RSA is allowed
+ * Helper function to check if hwcrypto is allowed.
  */
-static inline int vb2_hwcrypto_rsa_allowed(struct vb2_context *ctx) {
+static inline int vb2_hwcrypto_allowed(struct vb2_context *ctx)
+{
 
 	/* disable hwcrypto in recovery mode */
 	if (ctx->flags & VB2_CONTEXT_RECOVERY_MODE)
diff --git a/firmware/lib20/misc.c b/firmware/lib20/misc.c
index 6ad3cab..bc8e995 100644
--- a/firmware/lib20/misc.c
+++ b/firmware/lib20/misc.c
@@ -43,7 +43,7 @@
 	/* Unpack the root key */
 	VB2_TRY(vb2_unpack_key_buffer(&root_key, key_data, key_size));
 
-	root_key.allow_hwcrypto = vb2_hwcrypto_rsa_allowed(ctx);
+	root_key.allow_hwcrypto = vb2_hwcrypto_allowed(ctx);
 
 	/* Load the firmware keyblock header after the root key */
 	kb = vb2_workbuf_alloc(&wb, sizeof(*kb));
@@ -149,7 +149,7 @@
 
 	VB2_TRY(vb2_unpack_key_buffer(&data_key, key_data, key_size));
 
-	data_key.allow_hwcrypto = vb2_hwcrypto_rsa_allowed(ctx);
+	data_key.allow_hwcrypto = vb2_hwcrypto_allowed(ctx);
 
 	/* Load the firmware preamble header */
 	pre = vb2_workbuf_alloc(&wb, sizeof(*pre));