Home
last modified time | relevance | path

Searched refs:sw_enforced (Results 1 – 25 of 66) sorted by relevance

123

/system/keymaster/key_blob_utils/
Dsoftware_keyblobs.cpp94 AuthorizationSet* sw_enforced) { in FakeKeyAuthorizations() argument
96 sw_enforced->Clear(); in FakeKeyAuthorizations()
114 sw_enforced->push_back(TAG_PURPOSE, KM_PURPOSE_SIGN); in FakeKeyAuthorizations()
115 sw_enforced->push_back(TAG_PURPOSE, KM_PURPOSE_VERIFY); in FakeKeyAuthorizations()
116 sw_enforced->push_back(TAG_PURPOSE, KM_PURPOSE_ENCRYPT); in FakeKeyAuthorizations()
117 sw_enforced->push_back(TAG_PURPOSE, KM_PURPOSE_DECRYPT); in FakeKeyAuthorizations()
138 sw_enforced->push_back(TAG_PURPOSE, KM_PURPOSE_SIGN); in FakeKeyAuthorizations()
139 sw_enforced->push_back(TAG_PURPOSE, KM_PURPOSE_VERIFY); in FakeKeyAuthorizations()
155 sw_enforced->push_back(TAG_ALL_USERS); in FakeKeyAuthorizations()
156 sw_enforced->push_back(TAG_NO_AUTH_REQUIRED); in FakeKeyAuthorizations()
[all …]
Docb_utils.cpp47 const AuthorizationSet& sw_enforced, in BuildDerivationData() argument
52 hidden.SerializedSize() + hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in BuildDerivationData()
60 buf = sw_enforced.Serialize(buf, end); in BuildDerivationData()
66 const AuthorizationSet& sw_enforced, in InitializeKeyWrappingContext() argument
72 keymaster_error_t error = BuildDerivationData(hw_enforced, sw_enforced, hidden, in InitializeKeyWrappingContext()
113 const AuthorizationSet& sw_enforced, const AuthorizationSet& hidden, in OcbEncryptKey() argument
126 InitializeKeyWrappingContext(hw_enforced, sw_enforced, hidden, master_key, &ctx); in OcbEncryptKey()
145 const AuthorizationSet& sw_enforced, const AuthorizationSet& hidden, in OcbDecryptKey() argument
158 InitializeKeyWrappingContext(hw_enforced, sw_enforced, hidden, master_key, &ctx); in OcbDecryptKey()
Dauth_encrypted_key_blob.cpp54 Buffer BuildAesGcmInfo(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, in BuildAesGcmInfo() argument
60 hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in BuildAesGcmInfo()
68 buf = sw_enforced.Serialize(buf, end); in BuildAesGcmInfo()
80 const AuthorizationSet& sw_enforced, in DeriveAesGcmKeyEncryptionKey() argument
94 Buffer info = BuildAesGcmInfo(hw_enforced, sw_enforced, hidden, error); in DeriveAesGcmKeyEncryptionKey()
115 const AuthorizationSet& sw_enforced, // in AesGcmEncryptKey() argument
125 Buffer kek = DeriveAesGcmKeyEncryptionKey(hw_enforced, sw_enforced, hidden, master_key, error); in AesGcmEncryptKey()
168 DeriveAesGcmKeyEncryptionKey(key.hw_enforced, key.sw_enforced, hidden, master_key, error); in AesGcmDecryptKey()
208 const AuthorizationSet& sw_enforced, in SerializeAuthEncryptedBlob() argument
215 hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in SerializeAuthEncryptedBlob()
[all …]
Dintegrity_assured_key_blob.cpp78 const AuthorizationSet& sw_enforced, in SerializeIntegrityAssuredBlob() argument
83 sw_enforced.SerializedSize() + // in SerializeIntegrityAssuredBlob()
92 p = sw_enforced.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob()
101 AuthorizationSet* sw_enforced) { in DeserializeIntegrityAssuredBlob() argument
116 sw_enforced); in DeserializeIntegrityAssuredBlob()
122 AuthorizationSet* sw_enforced) { in DeserializeIntegrityAssuredBlob_NoHmacCheck() argument
133 !sw_enforced->Deserialize(&p, end)) in DeserializeIntegrityAssuredBlob_NoHmacCheck()
/system/keymaster/contexts/
Dsoft_keymaster_context.cpp142 AuthorizationSet* sw_enforced) { in SetAuthorizations() argument
143 sw_enforced->Clear(); in SetAuthorizations()
166 if (hw_enforced->GetTagCount(entry.tag) == 0) sw_enforced->push_back(entry); in SetAuthorizations()
171 sw_enforced->push_back(TAG_CREATION_DATETIME, java_time(time(nullptr))); in SetAuthorizations()
172 sw_enforced->push_back(TAG_ORIGIN, origin); in SetAuthorizations()
173 sw_enforced->push_back(TAG_OS_VERSION, os_version); in SetAuthorizations()
174 sw_enforced->push_back(TAG_OS_PATCHLEVEL, os_patchlevel); in SetAuthorizations()
176 return TranslateAuthorizationSetError(sw_enforced->is_valid()); in SetAuthorizations()
184 AuthorizationSet* sw_enforced) const { in CreateKeyBlob()
186 os_patchlevel_, hw_enforced, sw_enforced); in CreateKeyBlob()
[all …]
Dkeymaster1_passthrough_context.cpp119 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) { in parseKeymaster1HwBlob() argument
137 sw_enforced->Reinitialize(characteristics->sw_enforced); in parseKeymaster1HwBlob()
147 AuthorizationSet sw_enforced; in ParseKeyBlob() local
157 DeserializeIntegrityAssuredBlob(blob, hidden, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob()
162 &hw_enforced, &sw_enforced); in ParseKeyBlob()
169 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
175 move(sw_enforced), key); in ParseKeyBlob()
184 AuthorizationSet hw_enforced, sw_enforced; in DeleteKey() local
186 blob, &key_material, &hw_enforced, &sw_enforced); in DeleteKey()
217 AuthorizationSet* sw_enforced) const { in CreateKeyBlob()
[all …]
/system/keymaster/include/keymaster/legacy_support/
Dkeymaster1_legacy_support.h71 AuthorizationSet* sw_enforced, in GenerateKey() argument
76 sw_enforced, cert_chain); in GenerateKey()
80 sw_enforced, cert_chain); in GenerateKey()
91 AuthorizationSet* sw_enforced, CertificateChain* cert_chain) const { in ImportKey() argument
95 issuer_subject, output_key_blob, hw_enforced, sw_enforced, cert_chain); in ImportKey()
99 issuer_subject, output_key_blob, hw_enforced, sw_enforced, cert_chain); in ImportKey()
105 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in LoadKey() argument
113 AuthProxy(hw_enforced, sw_enforced))) { in LoadKey()
115 move(hw_enforced), move(sw_enforced), key); in LoadKey()
118 move(hw_enforced), move(sw_enforced), key); in LoadKey()
[all …]
Dkeymaster_passthrough_key.h47 AuthorizationSet* sw_enforced, in GenerateKey() argument
49 return engine_->GenerateKey(key_description, key_blob, hw_enforced, sw_enforced); in GenerateKey()
58 AuthorizationSet* sw_enforced, in ImportKey() argument
61 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
66 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
84 AuthorizationSet&& sw_enforced, const KeyFactory* key_factory, in KeymasterPassthroughKey() argument
87 : Key(move(hw_enforced), move(sw_enforced), key_factory), in KeymasterPassthroughKey()
Dec_keymaster1_key.h49 AuthorizationSet* sw_enforced,
59 AuthorizationSet* sw_enforced,
64 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
79 AuthorizationSet&& sw_enforced, const KeyFactory* key_factory) in EcdsaKeymaster1Key() argument
80 : EcKey(ecdsa_key, move(hw_enforced), move(sw_enforced), key_factory) {} in EcdsaKeymaster1Key()
Drsa_keymaster1_key.h49 AuthorizationSet* sw_enforced,
59 AuthorizationSet* sw_enforced,
64 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
80 RsaKeymaster1Key(RSA* rsa_key, AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaKeymaster1Key() argument
82 : RsaKey(rsa_key, move(hw_enforced), move(sw_enforced), key_factory) {} in RsaKeymaster1Key()
/system/keymaster/include/keymaster/km_openssl/
Dec_key.h30 EcKey(AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, const KeyFactory* factory) in EcKey() argument
31 : AsymmetricKey(move(hw_enforced), move(sw_enforced), factory) {} in EcKey()
32 EcKey(AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, const KeyFactory* factory, in EcKey() argument
34 : AsymmetricKey(move(hw_enforced), move(sw_enforced), factory), ec_key_(move(ec_key)) {} in EcKey()
42 EcKey(EC_KEY* ec_key, AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, in EcKey() argument
44 : AsymmetricKey(move(hw_enforced), move(sw_enforced), key_factory), ec_key_(ec_key) {} in EcKey()
Drsa_key.h30 RsaKey(AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, const KeyFactory* factory) in RsaKey() argument
31 : AsymmetricKey(move(hw_enforced), move(sw_enforced), factory) {} in RsaKey()
32 RsaKey(AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, const KeyFactory* factory, in RsaKey() argument
34 : AsymmetricKey(move(hw_enforced), move(sw_enforced), factory), rsa_key_(move(rsa_key)) {} in RsaKey()
45 RsaKey(RSA* rsa, AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, in RsaKey() argument
47 : AsymmetricKey(move(hw_enforced), move(sw_enforced), key_factory), rsa_key_(rsa) {} in RsaKey()
Drsa_operation.h36 RsaOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaOperation() argument
39 : Operation(purpose, move(hw_enforced), move(sw_enforced)), rsa_key_(key), in RsaOperation()
76 RsaDigestingOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
92 RsaSignOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaSignOperation() argument
94 : RsaDigestingOperation(move(hw_enforced), move(sw_enforced), KM_PURPOSE_SIGN, digest, in RsaSignOperation()
116 RsaVerifyOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaVerifyOperation() argument
118 : RsaDigestingOperation(move(hw_enforced), move(sw_enforced), KM_PURPOSE_VERIFY, digest, in RsaVerifyOperation()
140 RsaCryptOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaCryptOperation() argument
143 : RsaOperation(move(hw_enforced), move(sw_enforced), purpose, digest, padding, key), in RsaCryptOperation()
166 RsaEncryptOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaEncryptOperation() argument
[all …]
Decdsa_operation.h32 EcdsaOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in EcdsaOperation() argument
34 : Operation(purpose, move(hw_enforced), move(sw_enforced)), digest_(digest), in EcdsaOperation()
55 EcdsaSignOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in EcdsaSignOperation() argument
57 : EcdsaOperation(move(hw_enforced), move(sw_enforced), KM_PURPOSE_SIGN, digest, key) {} in EcdsaSignOperation()
70 EcdsaVerifyOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in EcdsaVerifyOperation() argument
72 : EcdsaOperation(move(hw_enforced), move(sw_enforced), KM_PURPOSE_VERIFY, digest, key) {} in EcdsaVerifyOperation()
92 AuthorizationSet&& sw_enforced,
99 Operation* InstantiateOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in InstantiateOperation() argument
102 EcdsaSignOperation(move(hw_enforced), move(sw_enforced), digest, key); in InstantiateOperation()
109 Operation* InstantiateOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in InstantiateOperation() argument
[all …]
/system/keymaster/km_openssl/
Dsymmetric_key.cpp38 AuthorizationSet* sw_enforced, in GenerateKey() argument
40 if (!key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in GenerateKey()
61 hw_enforced, sw_enforced); in GenerateKey()
71 AuthorizationSet* sw_enforced, in ImportKey() argument
73 if (!output_key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in ImportKey()
96 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
107 AuthorizationSet&& sw_enforced, const KeyFactory* key_factory) in SymmetricKey() argument
108 : Key(move(hw_enforced), move(sw_enforced), key_factory) { in SymmetricKey()
Dattestation_utils.cpp50 const AuthorizationSet& sw_enforced, in build_attestation_extension() argument
59 keymaster_error_t error = build_attestation_record(attest_params, sw_enforced, tee_enforced, in build_attestation_extension()
80 const AuthorizationSet& sw_enforced, in build_eat_extension() argument
91 build_eat_record(attest_params, sw_enforced, tee_enforced, context, &eat_bytes); in build_eat_extension()
111 const AuthorizationSet& sw_enforced, in add_attestation_extension() argument
116 if (auto error = build_attestation_extension(attest_params, tee_enforced, sw_enforced, in add_attestation_extension()
121 if (auto error = build_eat_extension(attest_params, tee_enforced, sw_enforced, context, in add_attestation_extension()
139 const AuthorizationSet& sw_enforced, in make_attestation_cert() argument
149 if (auto error = add_attestation_extension(attest_params, tee_enforced, sw_enforced, context, in make_attestation_cert()
278 return generate_attestation(pkey.get(), key.sw_enforced(), key.hw_enforced(), attest_params, in generate_attestation()
[all …]
Daes_key.cpp45 AuthorizationSet&& sw_enforced, in LoadKey() argument
51 sw_enforced.Contains(TAG_BLOCK_MODE, KM_MODE_GCM)) { in LoadKey()
54 !sw_enforced.GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length)) { in LoadKey()
63 AesKey(move(key_material), move(hw_enforced), move(sw_enforced), this)); in LoadKey()
Drsa_key_factory.cpp56 AuthorizationSet* sw_enforced, in GenerateKey() argument
58 if (!key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in GenerateKey()
98 hw_enforced, sw_enforced); in GenerateKey()
104 RsaKey key(*hw_enforced, *sw_enforced, this, move(rsa_key)); in GenerateKey()
127 AuthorizationSet* sw_enforced, in ImportKey() argument
129 if (!output_key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in ImportKey()
139 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
152 RsaKey key(*hw_enforced, *sw_enforced, this, move(rsa_key)); in ImportKey()
215 AuthorizationSet&& sw_enforced, in CreateEmptyKey() argument
217 key->reset(new (std::nothrow) RsaKey(move(hw_enforced), move(sw_enforced), this)); in CreateEmptyKey()
Dec_key_factory.cpp84 AuthorizationSet* sw_enforced, in GenerateKey() argument
86 if (!key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in GenerateKey()
128 hw_enforced, sw_enforced); in GenerateKey()
134 EcKey key(*hw_enforced, *sw_enforced, this, move(ec_key)); in GenerateKey()
156 AuthorizationSet* sw_enforced, in ImportKey() argument
158 if (!output_key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in ImportKey()
167 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
180 EcKey key(*hw_enforced, *sw_enforced, this, move(ec_key)); in ImportKey()
286 AuthorizationSet&& sw_enforced, in CreateEmptyKey() argument
288 key->reset(new (std::nothrow) EcKey(move(hw_enforced), move(sw_enforced), this)); in CreateEmptyKey()
/system/keymaster/include/keymaster/key_blob_utils/
Dsoftware_keyblobs.h40 AuthorizationSet* sw_enforced);
45 AuthorizationSet* sw_enforced);
51 AuthorizationSet* sw_enforced);
56 AuthorizationSet* sw_enforced);
59 AuthorizationSet* sw_enforced,
Dintegrity_assured_key_blob.h31 const AuthorizationSet& sw_enforced,
38 AuthorizationSet* sw_enforced);
43 AuthorizationSet* sw_enforced);
/system/keymaster/include/keymaster/
Dkey.h46 const AuthorizationSet& sw_enforced() const { return sw_enforced_; } in sw_enforced() function
48 AuthorizationSet& sw_enforced() { return sw_enforced_; } in sw_enforced() function
64 Key(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in Key() argument
66 : hw_enforced_(move(hw_enforced)), sw_enforced_(move(sw_enforced)), in Key()
/system/keymaster/legacy_support/
Dkeymaster_passthrough_engine.cpp86 AuthorizationSet* sw_enforced) const override;
92 AuthorizationSet* sw_enforced) const override;
199 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) { in ConvertCharacteristics() argument
201 if (sw_enforced) sw_enforced->Reinitialize(characteristics.sw_enforced); in ConvertCharacteristics()
207 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in GenerateKey()
219 ConvertCharacteristics(*characteristics, hw_enforced, sw_enforced); in GenerateKey()
227 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in GenerateKey()
239 ConvertCharacteristics(characteristics, hw_enforced, sw_enforced); in GenerateKey()
248 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in ImportKey()
263 ConvertCharacteristics(*characteristics, hw_enforced, sw_enforced); in ImportKey()
[all …]
Drsa_keymaster1_key.cpp88 AuthorizationSet* sw_enforced, in GenerateKey() argument
92 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced); in GenerateKey()
103 AuthorizationSet* sw_enforced, in ImportKey() argument
108 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
114 AuthorizationSet&& sw_enforced, in LoadKey() argument
123 RsaKeymaster1Key(rsa.release(), move(hw_enforced), move(sw_enforced), this)); in LoadKey()
Dec_keymaster1_key.cpp70 AuthorizationSet* sw_enforced, in GenerateKey() argument
83 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced); in GenerateKey()
94 AuthorizationSet* sw_enforced, in ImportKey() argument
99 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
105 AuthorizationSet&& sw_enforced, in LoadKey() argument
115 EcdsaKeymaster1Key(ecdsa.release(), move(hw_enforced), move(sw_enforced), this)); in LoadKey()

123