Home
last modified time | relevance | path

Searched refs:begin_params (Results 1 – 20 of 20) sorted by relevance

/system/keymaster/tests/
Dandroid_keymaster_test.cpp492 AuthorizationSet begin_params(client_params()); in TEST_P() local
493 begin_params.push_back(TAG_DIGEST, KM_DIGEST_NONE); in TEST_P()
494 begin_params.push_back(TAG_PADDING, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
495 EXPECT_EQ(KM_ERROR_INCOMPATIBLE_PADDING_MODE, BeginOperation(KM_PURPOSE_SIGN, begin_params)); in TEST_P()
534 AuthorizationSet begin_params(client_params()); in TEST_P() local
535 begin_params.push_back(TAG_DIGEST, KM_DIGEST_NONE); in TEST_P()
536 begin_params.push_back(TAG_PADDING, KM_PAD_RSA_PKCS1_1_5_SIGN); in TEST_P()
537 EXPECT_EQ(KM_ERROR_OK, BeginOperation(KM_PURPOSE_SIGN, begin_params)); in TEST_P()
556 AuthorizationSet begin_params(client_params()); in TEST_P() local
557 begin_params.push_back(TAG_DIGEST, KM_DIGEST_SHA_2_256); in TEST_P()
[all …]
Dandroid_keymaster_test_utils.cpp370 const AuthorizationSet& begin_params, in ProcessMessage() argument
373 EXPECT_EQ(KM_ERROR_OK, BeginOperation(purpose, begin_params, begin_out_params)); in ProcessMessage()
381 const string& signature, const AuthorizationSet& begin_params, in ProcessMessage() argument
384 EXPECT_EQ(KM_ERROR_OK, BeginOperation(purpose, begin_params, output_params)); in ProcessMessage()
467 AuthorizationSet begin_params(client_params()), output_params; in EncryptMessage() local
468 begin_params.push_back(TAG_PADDING, padding); in EncryptMessage()
471 ProcessMessage(KM_PURPOSE_ENCRYPT, message, begin_params, update_params, &output_params); in EncryptMessage()
498 AuthorizationSet begin_params(client_params()), output_params; in EncryptMessage() local
499 begin_params.push_back(TAG_PADDING, padding); in EncryptMessage()
500 begin_params.push_back(TAG_DIGEST, digest); in EncryptMessage()
[all …]
Dandroid_keymaster_test_utils.h230 const AuthorizationSet& begin_params,
234 const std::string& signature, const AuthorizationSet& begin_params,
264 const AuthorizationSet& begin_params,
284 const AuthorizationSet& begin_params,
Dkeymaster_enforcement_test.cpp534 AuthorizationSet begin_params(AuthorizationSetBuilder().Authorization(TAG_NONCE, "foo", 3)); in TEST_F() local
538 begin_params, 0 /* challenge */, true /* is_begin_operation */)); in TEST_F()
541 begin_params, 0 /* challenge */, true /* is_begin_operation */)); in TEST_F()
544 begin_params, 0 /* challenge */, in TEST_F()
548 begin_params, 0 /* challenge */, true /* is_begin_operation */)); in TEST_F()
/system/keymaster/legacy_support/
Drsa_keymaster1_operation.cpp48 AuthorizationSet begin_params(input_params); in Begin() local
49 int pos = begin_params.find(TAG_DIGEST); in Begin()
54 begin_params.push_back(TAG_DIGEST, KM_DIGEST_NONE); in Begin()
56 begin_params[pos].enumerated = KM_DIGEST_NONE; in Begin()
59 pos = begin_params.find(TAG_PADDING); in Begin()
62 switch (begin_params[pos].enumerated) { in Begin()
67 begin_params[pos].enumerated = KM_PAD_NONE; in Begin()
77 &begin_params, nullptr /* out_params */, &operation_handle_); in Begin()
120 const AuthorizationSet& begin_params, in CreateOperation() argument
123 if (!GetAndValidateDigest(begin_params, key, &digest, error)) return nullptr; in CreateOperation()
[all …]
Decdsa_keymaster1_operation.cpp49 AuthorizationSet begin_params(input_params); in Begin() local
50 int pos = begin_params.find(TAG_DIGEST); in Begin()
53 begin_params[pos].enumerated = KM_DIGEST_NONE; in Begin()
56 &begin_params, nullptr /* out_params */, &operation_handle_); in Begin()
99 const AuthorizationSet& begin_params, in CreateOperation() argument
102 if (!GetAndValidateDigest(begin_params, key, &digest, error)) return nullptr; in CreateOperation()
Decdsa_keymaster1_operation.h110 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
Drsa_keymaster1_operation.h110 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
Dkeymaster1_engine.cpp154 GetKeymaster1PublicKey(key_data->key_material, key_data->begin_params, error)); in BuildRsaKey()
/system/keymaster/android_keymaster/
Doperation.cpp89 bool OperationFactory::GetAndValidatePadding(const AuthorizationSet& begin_params, const Key& key, in GetAndValidatePadding() argument
93 if (!begin_params.GetTagValue(TAG_PADDING, padding)) { in GetAndValidatePadding()
94 LOG_E("%d padding modes specified in begin params", begin_params.GetTagCount(TAG_PADDING)); in GetAndValidatePadding()
114 bool OperationFactory::GetAndValidateDigest(const AuthorizationSet& begin_params, const Key& key, in GetAndValidateDigest() argument
117 return GetAndValidateDigest(begin_params, key, digest, error, false); in GetAndValidateDigest()
120 bool OperationFactory::GetAndValidateDigest(const AuthorizationSet& begin_params, const Key& key, in GetAndValidateDigest() argument
124 if (!begin_params.GetTagValue(TAG_DIGEST, digest)) { in GetAndValidateDigest()
132 begin_params.GetTagCount(TAG_DIGEST)); in GetAndValidateDigest()
/system/keymaster/include/keymaster/
Doperation.h55 virtual OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
80 bool GetAndValidatePadding(const AuthorizationSet& begin_params, const Key& key,
82 bool GetAndValidateDigest(const AuthorizationSet& begin_params, const Key& key,
84 bool GetAndValidateDigest(const AuthorizationSet& begin_params, const Key& key,
/system/keymaster/km_openssl/
Dhmac_operation.cpp37 OperationPtr HmacOperationFactory::CreateOperation(Key&& key, const AuthorizationSet& begin_params, in CreateOperation() argument
47 if (begin_params.GetTagValue(TAG_MAC_LENGTH, &mac_length_bits)) { in CreateOperation()
63 begin_params.GetTagCount(TAG_DIGEST)); in CreateOperation()
Dblock_cipher_operation.cpp52 static keymaster_error_t GetAndValidateGcmTagLength(const AuthorizationSet& begin_params, in GetAndValidateGcmTagLength() argument
56 if (!begin_params.GetTagValue(TAG_MAC_LENGTH, &tag_length_bits)) { in GetAndValidateGcmTagLength()
80 const AuthorizationSet& begin_params, in CreateOperation() argument
84 if (!begin_params.GetTagValue(TAG_BLOCK_MODE, &block_mode)) { in CreateOperation()
85 LOG_E("%d block modes specified in begin params", begin_params.GetTagCount(TAG_BLOCK_MODE)); in CreateOperation()
100 *error = GetAndValidateGcmTagLength(begin_params, key.authorizations(), &tag_length); in CreateOperation()
107 if (!GetAndValidatePadding(begin_params, key, &padding, error)) { in CreateOperation()
Dhmac_operation.h58 virtual OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
Drsa_operation.cpp63 const AuthorizationSet& begin_params, in CreateRsaOperation() argument
66 if (!GetAndValidatePadding(begin_params, key, &padding, error)) return nullptr; in CreateRsaOperation()
73 if (require_digest && !GetAndValidateDigest(begin_params, key, &digest, error, true)) { in CreateRsaOperation()
95 const AuthorizationSet& begin_params, in CreateRsaOperation() argument
98 RsaOperationFactory::CreateRsaOperation(move(key), begin_params, error)); in CreateRsaOperation()
Decdsa_operation.cpp31 OperationPtr EcdsaOperationFactory::CreateOperation(Key&& key, const AuthorizationSet& begin_params, in CreateOperation() argument
42 if (!GetAndValidateDigest(begin_params, ecdsa_key, &digest, error, true)) { in CreateOperation()
Dblock_cipher_operation.h54 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
/system/keymaster/include/keymaster/legacy_support/
Dkeymaster1_engine.h60 : op_handle(0), begin_params(params), key_material(blob), error(KM_ERROR_OK), in KeyData()
64 AuthorizationSet begin_params; member
/system/keymaster/include/keymaster/km_openssl/
Drsa_operation.h190 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params, in CreateOperation() argument
192 return OperationPtr(CreateRsaOperation(move(key), begin_params, error)); in CreateOperation()
198 virtual RsaOperation* CreateRsaOperation(Key&& key, const AuthorizationSet& begin_params,
222 RsaOperation* CreateRsaOperation(Key&& key, const AuthorizationSet& begin_params,
Decdsa_operation.h86 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,