[KMS] Change algorithm from RSA_SHA256_4096 to SHA512.
This change is to fix a mistake that I made earlier when defining
supported algorithms, now the supported algorithms are consistent
with go/fuchsia-kms-api-design.
Tests: Build
Bug: None
Change-Id: I01903d8c5aab910da088099019f9667a5ea263ee
diff --git a/garnet/bin/kms/src/common.rs b/garnet/bin/kms/src/common.rs
index 01d631e..0a0b20c 100644
--- a/garnet/bin/kms/src/common.rs
+++ b/garnet/bin/kms/src/common.rs
@@ -83,10 +83,10 @@
AsymmetricKeyAlgorithm::EcdsaSha512P521,
AsymmetricKeyAlgorithm::RsaSsaPssSha2562048,
AsymmetricKeyAlgorithm::RsaSsaPssSha2563072,
- AsymmetricKeyAlgorithm::RsaSsaPssSha2564096,
+ AsymmetricKeyAlgorithm::RsaSsaPssSha5124096,
AsymmetricKeyAlgorithm::RsaSsaPkcs1Sha2562048,
AsymmetricKeyAlgorithm::RsaSsaPkcs1Sha2563072,
- AsymmetricKeyAlgorithm::RsaSsaPkcs1Sha2564096,
+ AsymmetricKeyAlgorithm::RsaSsaPkcs1Sha5124096,
];
/// The key attributes structure to be stored as attribute file.
diff --git a/sdk/fidl/fuchsia.kms/key_manager.fidl b/sdk/fidl/fuchsia.kms/key_manager.fidl
index 87c3102..a6c7842 100644
--- a/sdk/fidl/fuchsia.kms/key_manager.fidl
+++ b/sdk/fidl/fuchsia.kms/key_manager.fidl
@@ -26,10 +26,10 @@
enum AsymmetricKeyAlgorithm {
RSA_SSA_PSS_SHA256_2048 = 1;
RSA_SSA_PSS_SHA256_3072 = 2;
- RSA_SSA_PSS_SHA256_4096 = 3;
+ RSA_SSA_PSS_SHA512_4096 = 3;
RSA_SSA_PKCS1_SHA256_2048 = 4;
RSA_SSA_PKCS1_SHA256_3072 = 5;
- RSA_SSA_PKCS1_SHA256_4096 = 6;
+ RSA_SSA_PKCS1_SHA512_4096 = 6;
ECDSA_SHA256_P256 = 7;
ECDSA_SHA512_P384 = 8;
ECDSA_SHA512_P521 = 9;
@@ -77,17 +77,7 @@
//
// Generate an asymmetric key using |key_name| as the unique name and |key_algorithm| as
// algorithm. |key| is the generated asymmetric key interface request. If the |key_name| is not
- // unique, you would get KEY_ALREADY_EXISTS. The supported key_algorithms are:
- // RsaSsaPssSha2562048
- // RsaSsaPssSha2563072
- // RsaSsaPssSha2564096
- // RsaSsaPkcs1Sha2562048
- // RsaSsaPkcs1Sha2563072
- // RsaSsaPkcs1Sha2564096
- // EcdsaSha256P256
- // EcdsaSha512P384
- // EcdsaSha512P521
- // The generated key can be used to encrypt and decrypt data.
+ // unique, you would get KEY_ALREADY_EXISTS.
GenerateAsymmetricKeyWithAlgorithm(
string:MAX_KEY_NAME_SIZE key_name,
AsymmetricKeyAlgorithm key_algorithm,
@@ -98,16 +88,7 @@
// Import an asymmetric private key using |key_name| as the unique name, |key_algorithm| as
// algorithm and |data| as key data. |key| is imported asymmetric key interface request. Key
// data should be in asn.1 encoded DER format. If the |key_name| is not unique, you would get
- // KEY_ALREADY_EXISTS. The supported key_algorithms are:
- // RsaSsaPssSha2562048
- // RsaSsaPssSha2563072
- // RsaSsaPssSha2564096
- // RsaSsaPkcs1Sha2562048
- // RsaSsaPkcs1Sha2563072
- // RsaSsaPkcs1Sha2564096
- // EcdsaSha256P256
- // EcdsaSha512P384
- // EcdsaSha512P521
+ // KEY_ALREADY_EXISTS.
ImportAsymmetricPrivateKey(
bytes data,
string:MAX_KEY_NAME_SIZE key_name,