Home
last modified time | relevance | path

Searched refs:sw_enforced (Results 1 – 25 of 72) 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()
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()
Dauth_encrypted_key_blob.cpp53 const AuthorizationSet& sw_enforced, // in BuildDerivationInfo() argument
59 hidden.SerializedSize() + hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in BuildDerivationInfo()
75 buf = sw_enforced.Serialize(buf, end); in BuildDerivationInfo()
94 const AuthorizationSet& sw_enforced, // in DeriveAesGcmKeyEncryptionKey() argument
106 BuildDerivationInfo(format, hw_enforced, sw_enforced, hidden, secure_deletion_data); in DeriveAesGcmKeyEncryptionKey()
125 const AuthorizationSet& sw_enforced, // in AesGcmEncryptKey() argument
132 KmErrorOr<Buffer> kek = DeriveAesGcmKeyEncryptionKey(format, hw_enforced, sw_enforced, hidden, in AesGcmEncryptKey()
171 DeriveAesGcmKeyEncryptionKey(key.encrypted_key.format, key.hw_enforced, key.sw_enforced, in AesGcmDecryptKey()
207 const AuthorizationSet& sw_enforced, in SerializeAuthEncryptedBlob() argument
213 hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in SerializeAuthEncryptedBlob()
[all …]
/system/keymaster/include/keymaster/legacy_support/
Dkeymaster1_legacy_support.h72 AuthorizationSet* sw_enforced, in GenerateKey() argument
77 sw_enforced, cert_chain); in GenerateKey()
81 sw_enforced, cert_chain); in GenerateKey()
92 AuthorizationSet* sw_enforced, CertificateChain* cert_chain) const { in ImportKey() argument
96 std::move(attest_key), issuer_subject, output_key_blob, hw_enforced, sw_enforced, in ImportKey()
101 std::move(attest_key), issuer_subject, output_key_blob, hw_enforced, sw_enforced, in ImportKey()
108 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in LoadKey() argument
116 AuthProxy(hw_enforced, sw_enforced))) { in LoadKey()
118 std::move(hw_enforced), std::move(sw_enforced), in LoadKey()
122 std::move(hw_enforced), std::move(sw_enforced), in LoadKey()
[all …]
Dkeymaster_passthrough_key.h49 AuthorizationSet* sw_enforced, in GenerateKey() argument
51 return engine_->GenerateKey(key_description, key_blob, hw_enforced, sw_enforced); in GenerateKey()
60 AuthorizationSet* sw_enforced, in ImportKey() argument
63 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
68 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
86 AuthorizationSet&& sw_enforced, const KeyFactory* key_factory, in KeymasterPassthroughKey() argument
89 : Key(std::move(hw_enforced), std::move(sw_enforced), key_factory), in KeymasterPassthroughKey()
Dec_keymaster1_key.h51 AuthorizationSet* sw_enforced,
61 AuthorizationSet* sw_enforced,
66 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
81 AuthorizationSet&& sw_enforced, const KeyFactory* key_factory) in EcdsaKeymaster1Key() argument
82 : EcKey(ecdsa_key, std::move(hw_enforced), std::move(sw_enforced), key_factory) {} in EcdsaKeymaster1Key()
Drsa_keymaster1_key.h51 AuthorizationSet* sw_enforced,
61 AuthorizationSet* sw_enforced,
66 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
82 RsaKeymaster1Key(RSA* rsa_key, AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaKeymaster1Key() argument
84 : RsaKey(rsa_key, std::move(hw_enforced), std::move(sw_enforced), key_factory) {} in RsaKeymaster1Key()
/system/keymaster/include/keymaster/km_openssl/
Decdsa_operation.h35 EcdsaOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in EcdsaOperation() argument
37 : Operation(purpose, std::move(hw_enforced), std::move(sw_enforced)), digest_(digest), in EcdsaOperation()
58 EcdsaSignOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in EcdsaSignOperation() argument
60 : EcdsaOperation(std::move(hw_enforced), std::move(sw_enforced), KM_PURPOSE_SIGN, digest, in EcdsaSignOperation()
74 EcdsaVerifyOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in EcdsaVerifyOperation() argument
76 : EcdsaOperation(std::move(hw_enforced), std::move(sw_enforced), KM_PURPOSE_VERIFY, digest, in EcdsaVerifyOperation()
90 Ed25519SignOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in Ed25519SignOperation() argument
92 : EcdsaSignOperation(std::move(hw_enforced), std::move(sw_enforced), digest, key) {} in Ed25519SignOperation()
115 AuthorizationSet&& sw_enforced,
122 Operation* InstantiateOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in InstantiateOperation() argument
[all …]
Drsa_operation.h38 RsaOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaOperation() argument
41 : Operation(purpose, std::move(hw_enforced), std::move(sw_enforced)), rsa_key_(key), in RsaOperation()
78 RsaDigestingOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
94 RsaSignOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaSignOperation() argument
96 : RsaDigestingOperation(std::move(hw_enforced), std::move(sw_enforced), KM_PURPOSE_SIGN, in RsaSignOperation()
118 RsaVerifyOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaVerifyOperation() argument
120 : RsaDigestingOperation(std::move(hw_enforced), std::move(sw_enforced), KM_PURPOSE_VERIFY, in RsaVerifyOperation()
142 RsaCryptOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaCryptOperation() argument
145 : RsaOperation(std::move(hw_enforced), std::move(sw_enforced), purpose, digest, padding, in RsaCryptOperation()
169 RsaEncryptOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaEncryptOperation() argument
[all …]
Dec_key.h32 EcKey(AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, const KeyFactory* factory) in EcKey() argument
33 : AsymmetricKey(std::move(hw_enforced), std::move(sw_enforced), factory) {} in EcKey()
34 EcKey(AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, const KeyFactory* factory, in EcKey() argument
36 : AsymmetricKey(std::move(hw_enforced), std::move(sw_enforced), factory), in EcKey()
47 EcKey(EC_KEY* ec_key, AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, in EcKey() argument
49 : AsymmetricKey(std::move(hw_enforced), std::move(sw_enforced), key_factory), in EcKey()
Dcurve25519_key.h32 bool IsEd25519Key(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced);
35 bool IsX25519Key(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced);
39 Curve25519Key(AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, in Curve25519Key() argument
41 : AsymmetricKey(std::move(hw_enforced), std::move(sw_enforced), factory) {} in Curve25519Key()
42 Curve25519Key(AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, in Curve25519Key() argument
44 : AsymmetricKey(std::move(hw_enforced), std::move(sw_enforced), factory) { in Curve25519Key()
Drsa_key.h32 RsaKey(AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, const KeyFactory* factory) in RsaKey() argument
33 : AsymmetricKey(std::move(hw_enforced), std::move(sw_enforced), factory) {} in RsaKey()
34 RsaKey(AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, const KeyFactory* factory, in RsaKey() argument
36 : AsymmetricKey(std::move(hw_enforced), std::move(sw_enforced), factory), in RsaKey()
50 RsaKey(RSA* rsa, AuthorizationSet hw_enforced, AuthorizationSet sw_enforced, in RsaKey() argument
52 : AsymmetricKey(std::move(hw_enforced), std::move(sw_enforced), key_factory), rsa_key_(rsa) in RsaKey()
/system/keymaster/contexts/
Dsoft_keymaster_context.cpp145 AuthorizationSet* sw_enforced) { in SetAuthorizations() argument
146 sw_enforced->Clear(); in SetAuthorizations()
169 if (hw_enforced->GetTagCount(entry.tag) == 0) sw_enforced->push_back(entry); in SetAuthorizations()
174 sw_enforced->push_back(TAG_CREATION_DATETIME, java_time(time(nullptr))); in SetAuthorizations()
175 sw_enforced->push_back(TAG_ORIGIN, origin); in SetAuthorizations()
176 sw_enforced->push_back(TAG_OS_VERSION, os_version); in SetAuthorizations()
177 sw_enforced->push_back(TAG_OS_PATCHLEVEL, os_patchlevel); in SetAuthorizations()
179 return TranslateAuthorizationSetError(sw_enforced->is_valid()); in SetAuthorizations()
187 AuthorizationSet* sw_enforced) const { in CreateKeyBlob()
189 os_patchlevel_, hw_enforced, sw_enforced); in CreateKeyBlob()
[all …]
Dkeymaster1_passthrough_context.cpp121 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) { in parseKeymaster1HwBlob() argument
139 sw_enforced->Reinitialize(characteristics->sw_enforced); in parseKeymaster1HwBlob()
149 AuthorizationSet sw_enforced; in ParseKeyBlob() local
159 DeserializeIntegrityAssuredBlob(blob, hidden, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob()
164 &hw_enforced, &sw_enforced); in ParseKeyBlob()
171 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
177 std::move(sw_enforced), key); in ParseKeyBlob()
186 AuthorizationSet hw_enforced, sw_enforced; in DeleteKey() local
188 blob, &key_material, &hw_enforced, &sw_enforced); in DeleteKey()
219 AuthorizationSet* sw_enforced) const { in CreateKeyBlob()
[all …]
/system/keymaster/km_openssl/
Dsymmetric_key.cpp41 AuthorizationSet* sw_enforced, in GenerateKey() argument
43 if (!key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in GenerateKey()
64 hw_enforced, sw_enforced); in GenerateKey()
74 AuthorizationSet* sw_enforced, in ImportKey() argument
76 if (!output_key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in ImportKey()
99 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
110 AuthorizationSet&& sw_enforced, const KeyFactory* key_factory) in SymmetricKey() argument
111 : Key(std::move(hw_enforced), std::move(sw_enforced), key_factory) { in SymmetricKey()
Dec_key_factory.cpp89 AuthorizationSet* sw_enforced, in GenerateKey() argument
91 if (!key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in GenerateKey()
170 hw_enforced, sw_enforced); in GenerateKey()
180 key.reset(new (std::nothrow) Ed25519Key(*hw_enforced, *sw_enforced, this, key_material)); in GenerateKey()
182 key.reset(new (std::nothrow) X25519Key(*hw_enforced, *sw_enforced, this, key_material)); in GenerateKey()
184 key.reset(new (std::nothrow) EcKey(*hw_enforced, *sw_enforced, this, std::move(ec_key))); in GenerateKey()
210 AuthorizationSet* sw_enforced, in ImportKey() argument
214 issuer_subject, output_key_blob, hw_enforced, sw_enforced, cert_chain); in ImportKey()
217 if (!output_key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in ImportKey()
226 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
[all …]
Dcurve25519_key.cpp23 bool IsEd25519Key(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced) { in IsEd25519Key() argument
24 AuthProxy proxy(hw_enforced, sw_enforced); in IsEd25519Key()
31 bool IsX25519Key(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced) { in IsX25519Key() argument
32 AuthProxy proxy(hw_enforced, sw_enforced); in IsX25519Key()
Drsa_key_factory.cpp59 AuthorizationSet* sw_enforced, in GenerateKey() argument
61 if (!key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in GenerateKey()
101 hw_enforced, sw_enforced); in GenerateKey()
107 RsaKey key(*hw_enforced, *sw_enforced, this, std::move(rsa_key)); in GenerateKey()
129 AuthorizationSet* sw_enforced, in ImportKey() argument
131 if (!output_key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in ImportKey()
141 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
154 RsaKey key(*hw_enforced, *sw_enforced, this, std::move(rsa_key)); in ImportKey()
219 AuthorizationSet&& sw_enforced, in CreateEmptyKey() argument
221 key->reset(new (std::nothrow) RsaKey(std::move(hw_enforced), std::move(sw_enforced), this)); in CreateEmptyKey()
Dattestation_utils.cpp52 const AuthorizationSet& sw_enforced, in build_attestation_extension() argument
61 keymaster_error_t error = build_attestation_record(attest_params, sw_enforced, tee_enforced, in build_attestation_extension()
83 const AuthorizationSet& sw_enforced, in build_eat_extension() argument
94 build_eat_record(attest_params, sw_enforced, tee_enforced, context, &eat_bytes); in build_eat_extension()
115 const AuthorizationSet& sw_enforced, in add_attestation_extension() argument
119 if (auto error = build_attestation_extension(attest_params, tee_enforced, sw_enforced, context, in add_attestation_extension()
136 const AuthorizationSet& sw_enforced, in make_attestation_cert() argument
146 if (auto error = add_attestation_extension(attest_params, tee_enforced, sw_enforced, context, in make_attestation_cert()
270 return generate_attestation(pkey.get(), key.sw_enforced(), key.hw_enforced(), attest_params, in generate_attestation()
275 const AuthorizationSet& sw_enforced, // in generate_attestation() argument
[all …]
/system/keymaster/include/keymaster/key_blob_utils/
Dsoftware_keyblobs.h41 AuthorizationSet* sw_enforced);
46 AuthorizationSet* sw_enforced);
52 AuthorizationSet* sw_enforced);
57 AuthorizationSet* sw_enforced,
61 AuthorizationSet* sw_enforced,
/system/keymaster/legacy_support/
Dkeymaster_passthrough_engine.cpp88 AuthorizationSet* sw_enforced) const override;
94 AuthorizationSet* sw_enforced) const override;
201 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) { in ConvertCharacteristics() argument
203 if (sw_enforced) sw_enforced->Reinitialize(characteristics.sw_enforced); in ConvertCharacteristics()
209 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in GenerateKey()
221 ConvertCharacteristics(*characteristics, hw_enforced, sw_enforced); in GenerateKey()
229 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in GenerateKey()
241 ConvertCharacteristics(characteristics, hw_enforced, sw_enforced); in GenerateKey()
250 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in ImportKey()
265 ConvertCharacteristics(*characteristics, hw_enforced, sw_enforced); in ImportKey()
[all …]
Dec_keymaster1_key.cpp71 AuthorizationSet* sw_enforced, in GenerateKey() argument
84 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced); in GenerateKey()
95 AuthorizationSet* sw_enforced, in ImportKey() argument
100 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
106 AuthorizationSet&& sw_enforced, in LoadKey() argument
117 std::move(sw_enforced), this)); in LoadKey()
Drsa_keymaster1_key.cpp91 AuthorizationSet* sw_enforced, in GenerateKey() argument
95 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced); in GenerateKey()
106 AuthorizationSet* sw_enforced, in ImportKey() argument
111 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
117 AuthorizationSet&& sw_enforced, in LoadKey() argument
126 RsaKeymaster1Key(rsa.release(), std::move(hw_enforced), std::move(sw_enforced), in LoadKey()
/system/keymaster/include/keymaster/
Dkey.h48 const AuthorizationSet& sw_enforced() const { return sw_enforced_; } in sw_enforced() function
50 AuthorizationSet& sw_enforced() { return sw_enforced_; } in sw_enforced() function
69 Key(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in Key() argument
71 : hw_enforced_(std::move(hw_enforced)), sw_enforced_(std::move(sw_enforced)), in Key()

123