diff options
author | Tink Team <tink-dev@google.com> | 2023-04-13 01:09:43 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-04-13 01:11:14 -0700 |
commit | 6bd671f68edb720e158a3b6792dc7af01f2b4269 (patch) | |
tree | f1084d29490c0263f8277d41ce7b273dbe9e49a5 /cc/experimental | |
parent | a687818740fec6d916302588acf2c82f1dc58fc0 (diff) | |
download | tink-6bd671f68edb720e158a3b6792dc7af01f2b4269.tar.gz |
Internal Code Change
PiperOrigin-RevId: 523926109
Diffstat (limited to 'cc/experimental')
4 files changed, 7 insertions, 7 deletions
diff --git a/cc/experimental/pqcrypto/signature/subtle/falcon_subtle_utils.h b/cc/experimental/pqcrypto/signature/subtle/falcon_subtle_utils.h index 302803aea..81b1e081b 100644 --- a/cc/experimental/pqcrypto/signature/subtle/falcon_subtle_utils.h +++ b/cc/experimental/pqcrypto/signature/subtle/falcon_subtle_utils.h @@ -102,7 +102,7 @@ class FalconKeyPair { // This is an utility function that generates a new Falcon key pair. // This function is expected to be called from a key manager class. crypto::tink::util::StatusOr<FalconKeyPair> GenerateFalconKeyPair( - int32 private_key_size); + int32_t private_key_size); // Validates whether the private key size is safe to use for falcon signature. crypto::tink::util::Status ValidateFalconPrivateKeySize(int32_t key_size); diff --git a/cc/experimental/pqcrypto/signature/subtle/sphincs_sign.cc b/cc/experimental/pqcrypto/signature/subtle/sphincs_sign.cc index 408622b71..48d96f1e2 100644 --- a/cc/experimental/pqcrypto/signature/subtle/sphincs_sign.cc +++ b/cc/experimental/pqcrypto/signature/subtle/sphincs_sign.cc @@ -52,7 +52,7 @@ util::StatusOr<std::unique_ptr<PublicKeySign>> SphincsSign::New( } util::StatusOr<std::string> SphincsSign::Sign(absl::string_view data) const { - util::StatusOr<int32> key_size_index = + util::StatusOr<int32_t> key_size_index = SphincsKeySizeToIndex(key_.GetKey().size()); if (!key_size_index.ok()) { return key_size_index.status(); diff --git a/cc/experimental/pqcrypto/signature/subtle/sphincs_subtle_utils.h b/cc/experimental/pqcrypto/signature/subtle/sphincs_subtle_utils.h index 95fa9e907..964638c8c 100644 --- a/cc/experimental/pqcrypto/signature/subtle/sphincs_subtle_utils.h +++ b/cc/experimental/pqcrypto/signature/subtle/sphincs_subtle_utils.h @@ -62,7 +62,7 @@ struct SphincsParamsPqclean { SphincsHashType hash_type; SphincsVariant variant; SphincsSignatureType sig_length_type; - int32 private_key_size; + int32_t private_key_size; }; // Representation of the Sphincs private key. @@ -127,10 +127,10 @@ crypto::tink::util::StatusOr<SphincsKeyPair> GenerateSphincsKeyPair( SphincsParamsPqclean params); // Validates whether the private key size is safe to use for sphincs signature. -crypto::tink::util::Status ValidatePrivateKeySize(int32 key_size); +crypto::tink::util::Status ValidatePrivateKeySize(int32_t key_size); // Validates whether the public key size is safe to use for sphincs signature. -crypto::tink::util::Status ValidatePublicKeySize(int32 key_size); +crypto::tink::util::Status ValidatePublicKeySize(int32_t key_size); // Validates whether the parameters are safe to use for sphincs signature. crypto::tink::util::Status ValidateParams(SphincsParamsPqclean params); @@ -138,7 +138,7 @@ crypto::tink::util::Status ValidateParams(SphincsParamsPqclean params); // Convert the sphincs private key size to the appropiate index in the // pqclean functions array. -crypto::tink::util::StatusOr<int32> SphincsKeySizeToIndex(int32 key_size); +crypto::tink::util::StatusOr<int32_t> SphincsKeySizeToIndex(int32_t key_size); } // namespace subtle } // namespace tink diff --git a/cc/experimental/pqcrypto/signature/subtle/sphincs_verify.cc b/cc/experimental/pqcrypto/signature/subtle/sphincs_verify.cc index 5554071bf..6582b865c 100644 --- a/cc/experimental/pqcrypto/signature/subtle/sphincs_verify.cc +++ b/cc/experimental/pqcrypto/signature/subtle/sphincs_verify.cc @@ -55,7 +55,7 @@ util::StatusOr<std::unique_ptr<PublicKeyVerify>> SphincsVerify::New( util::Status SphincsVerify::Verify(absl::string_view signature, absl::string_view data) const { SphincsParamsPqclean params = key_.GetParams(); - util::StatusOr<int32> key_size_index = + util::StatusOr<int32_t> key_size_index = SphincsKeySizeToIndex(params.private_key_size); if (!key_size_index.ok()) { return key_size_index.status(); |