/system/keymaster/tests/ |
D | android_keymaster_test.cpp | 492 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 …]
|
D | android_keymaster_test_utils.cpp | 370 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 …]
|
D | android_keymaster_test_utils.h | 230 const AuthorizationSet& begin_params, 234 const std::string& signature, const AuthorizationSet& begin_params, 264 const AuthorizationSet& begin_params, 284 const AuthorizationSet& begin_params,
|
D | keymaster_enforcement_test.cpp | 534 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/ |
D | rsa_keymaster1_operation.cpp | 48 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 …]
|
D | ecdsa_keymaster1_operation.cpp | 49 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()
|
D | ecdsa_keymaster1_operation.h | 110 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
|
D | rsa_keymaster1_operation.h | 110 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
|
D | keymaster1_engine.cpp | 154 GetKeymaster1PublicKey(key_data->key_material, key_data->begin_params, error)); in BuildRsaKey()
|
/system/keymaster/android_keymaster/ |
D | operation.cpp | 89 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/ |
D | operation.h | 55 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/ |
D | hmac_operation.cpp | 37 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()
|
D | block_cipher_operation.cpp | 52 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()
|
D | hmac_operation.h | 58 virtual OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
|
D | rsa_operation.cpp | 63 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()
|
D | ecdsa_operation.cpp | 31 OperationPtr EcdsaOperationFactory::CreateOperation(Key&& key, const AuthorizationSet& begin_params, in CreateOperation() argument 42 if (!GetAndValidateDigest(begin_params, ecdsa_key, &digest, error, true)) { in CreateOperation()
|
D | block_cipher_operation.h | 54 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
|
/system/keymaster/include/keymaster/legacy_support/ |
D | keymaster1_engine.h | 60 : 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/ |
D | rsa_operation.h | 190 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,
|
D | ecdsa_operation.h | 86 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
|