Home
last modified time | relevance | path

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

/system/keymaster/legacy_support/
Drsa_keymaster1_operation.cpp47 AuthorizationSet begin_params(input_params); in Begin() local
48 int pos = begin_params.find(TAG_DIGEST); in Begin()
53 begin_params.push_back(TAG_DIGEST, KM_DIGEST_NONE); in Begin()
55 begin_params[pos].enumerated = KM_DIGEST_NONE; in Begin()
58 pos = begin_params.find(TAG_PADDING); in Begin()
60 switch (begin_params[pos].enumerated) { in Begin()
65 begin_params[pos].enumerated = KM_PAD_NONE; in Begin()
75 &begin_params, nullptr /* out_params */, &operation_handle_); in Begin()
117 const AuthorizationSet& begin_params, in CreateOperation() argument
120 if (!GetAndValidateDigest(begin_params, key, &digest, error)) return nullptr; in CreateOperation()
[all …]
Decdsa_keymaster1_operation.cpp48 AuthorizationSet begin_params(input_params); in Begin() local
49 int pos = begin_params.find(TAG_DIGEST); in Begin()
51 begin_params[pos].enumerated = KM_DIGEST_NONE; in Begin()
54 &begin_params, nullptr /* out_params */, &operation_handle_); in Begin()
96 const AuthorizationSet& begin_params, in CreateOperation() argument
99 if (!GetAndValidateDigest(begin_params, key, &digest, error)) return nullptr; in CreateOperation()
Drsa_keymaster1_operation.h109 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
Decdsa_keymaster1_operation.h110 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
Dkeymaster1_engine.cpp147 GetKeymaster1PublicKey(key_data->key_material, key_data->begin_params, error)); in BuildRsaKey()
/system/keymaster/android_keymaster/
Doperation.cpp86 bool OperationFactory::GetAndValidatePadding(const AuthorizationSet& begin_params, const Key& key, in GetAndValidatePadding() argument
90 if (!begin_params.GetTagValue(TAG_PADDING, padding)) { in GetAndValidatePadding()
91 LOG_E("%d padding modes specified in begin params", begin_params.GetTagCount(TAG_PADDING)); in GetAndValidatePadding()
111 bool OperationFactory::GetAndValidateDigest(const AuthorizationSet& begin_params, const Key& key, in GetAndValidateDigest() argument
114 return GetAndValidateDigest(begin_params, key, digest, error, false); in GetAndValidateDigest()
117 bool OperationFactory::GetAndValidateDigest(const AuthorizationSet& begin_params, const Key& key, in GetAndValidateDigest() argument
121 if (!begin_params.GetTagValue(TAG_DIGEST, digest)) { in GetAndValidateDigest()
129 begin_params.GetTagCount(TAG_DIGEST)); in GetAndValidateDigest()
/system/keymaster/include/keymaster/
Doperation.h57 virtual OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
82 bool GetAndValidatePadding(const AuthorizationSet& begin_params, const Key& key,
84 bool GetAndValidateDigest(const AuthorizationSet& begin_params, const Key& key,
86 bool GetAndValidateDigest(const AuthorizationSet& begin_params, const Key& key,
/system/keymaster/km_openssl/
Drsa_operation.cpp64 const AuthorizationSet& begin_params, in CreateRsaOperation() argument
67 if (!GetAndValidatePadding(begin_params, key, &padding, error)) return nullptr; in CreateRsaOperation()
74 if (require_digest && !GetAndValidateDigest(begin_params, key, &digest, error, true)) { in CreateRsaOperation()
96 const AuthorizationSet& begin_params, in CreateRsaOperation() argument
100 *error = GetAndValidateMgfDigest(begin_params, key, &mgf_digest); in CreateRsaOperation()
103 RsaOperationFactory::CreateRsaOperation(std::move(key), begin_params, error)); in CreateRsaOperation()
131 const AuthorizationSet& begin_params, const Key& key, keymaster_digest_t* digest) const { in GetAndValidateMgfDigest() argument
133 if (!begin_params.Contains(TAG_PADDING, KM_PAD_RSA_OAEP)) { in GetAndValidateMgfDigest()
138 if (!begin_params.GetTagValue(TAG_RSA_OAEP_MGF_DIGEST, digest)) { in GetAndValidateMgfDigest()
145 begin_params.GetTagCount(TAG_RSA_OAEP_MGF_DIGEST)); in GetAndValidateMgfDigest()
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()
68 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,
Decdsa_operation.cpp35 OperationPtr EcdsaOperationFactory::CreateOperation(Key&& key, const AuthorizationSet& begin_params, in CreateOperation() argument
46 if (!GetAndValidateDigest(begin_params, ecdsa_key, &digest, error, true)) { in CreateOperation()
Dblock_cipher_operation.h56 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
/system/keymaster/include/keymaster/km_openssl/
Drsa_operation.h201 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params, in CreateOperation() argument
203 return OperationPtr(CreateRsaOperation(std::move(key), begin_params, error)); in CreateOperation()
209 virtual RsaOperation* CreateRsaOperation(Key&& key, const AuthorizationSet& begin_params,
233 RsaOperation* CreateRsaOperation(Key&& key, const AuthorizationSet& begin_params,
238 keymaster_error_t GetAndValidateMgfDigest(const AuthorizationSet& begin_params, const Key& key,
Decdh_operation.h67 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
Decdsa_operation.h109 OperationPtr CreateOperation(Key&& key, const AuthorizationSet& begin_params,
/system/keymaster/include/keymaster/legacy_support/
Dkeymaster1_engine.h58 : op_handle(0), begin_params(params), key_material(blob), error(KM_ERROR_OK), in KeyData()
62 AuthorizationSet begin_params; member
/system/keymaster/tests/
Dkeymaster_enforcement_test.cpp543 AuthorizationSet begin_params(AuthorizationSetBuilder().Authorization(TAG_NONCE, "foo", 3)); in TEST_F() local
547 begin_params, 0 /* challenge */, true /* is_begin_operation */)); in TEST_F()
550 begin_params, 0 /* challenge */, true /* is_begin_operation */)); in TEST_F()
553 begin_params, 0 /* challenge */, in TEST_F()
557 begin_params, 0 /* challenge */, true /* is_begin_operation */)); in TEST_F()