Home
last modified time | relevance | path

Searched refs:hw_enforced (Results 1 – 25 of 71) sorted by relevance

123

/system/keymaster/key_blob_utils/
Dsoftware_keyblobs.cpp93 keymaster_error_t FakeKeyAuthorizations(EVP_PKEY* pubkey, AuthorizationSet* hw_enforced, in FakeKeyAuthorizations() argument
95 hw_enforced->Clear(); in FakeKeyAuthorizations()
100 hw_enforced->push_back(TAG_ALGORITHM, KM_ALGORITHM_RSA); in FakeKeyAuthorizations()
101 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_NONE); in FakeKeyAuthorizations()
102 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_MD5); in FakeKeyAuthorizations()
103 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_SHA1); in FakeKeyAuthorizations()
104 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_SHA_2_224); in FakeKeyAuthorizations()
105 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_SHA_2_256); in FakeKeyAuthorizations()
106 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_SHA_2_384); in FakeKeyAuthorizations()
107 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_SHA_2_512); in FakeKeyAuthorizations()
[all …]
Docb_utils.cpp46 static keymaster_error_t BuildDerivationData(const AuthorizationSet& hw_enforced, in BuildDerivationData() argument
52 hidden.SerializedSize() + hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in BuildDerivationData()
59 buf = hw_enforced.Serialize(buf, end); in BuildDerivationData()
65 static keymaster_error_t InitializeKeyWrappingContext(const AuthorizationSet& hw_enforced, in InitializeKeyWrappingContext() argument
72 keymaster_error_t error = BuildDerivationData(hw_enforced, sw_enforced, hidden, in InitializeKeyWrappingContext()
112 keymaster_error_t OcbEncryptKey(const AuthorizationSet& hw_enforced, in OcbEncryptKey() argument
126 InitializeKeyWrappingContext(hw_enforced, sw_enforced, hidden, master_key, &ctx); in OcbEncryptKey()
144 keymaster_error_t OcbDecryptKey(const AuthorizationSet& hw_enforced, in OcbDecryptKey() argument
158 InitializeKeyWrappingContext(hw_enforced, sw_enforced, hidden, master_key, &ctx); in OcbDecryptKey()
Dintegrity_assured_key_blob.cpp77 const AuthorizationSet& hw_enforced, in SerializeIntegrityAssuredBlob() argument
82 hw_enforced.SerializedSize() + // in SerializeIntegrityAssuredBlob()
91 p = hw_enforced.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob()
100 AuthorizationSet* hw_enforced, in DeserializeIntegrityAssuredBlob() argument
115 return DeserializeIntegrityAssuredBlob_NoHmacCheck(key_blob, key_material, hw_enforced, in DeserializeIntegrityAssuredBlob()
121 AuthorizationSet* hw_enforced, in DeserializeIntegrityAssuredBlob_NoHmacCheck() argument
132 !hw_enforced->Deserialize(&p, end) || // in DeserializeIntegrityAssuredBlob_NoHmacCheck()
Dauth_encrypted_key_blob.cpp52 const AuthorizationSet& hw_enforced, // in BuildDerivationInfo() argument
59 hidden.SerializedSize() + hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in BuildDerivationInfo()
74 buf = hw_enforced.Serialize(buf, end); in BuildDerivationInfo()
93 const AuthorizationSet& hw_enforced, // in DeriveAesGcmKeyEncryptionKey() argument
106 BuildDerivationInfo(format, hw_enforced, sw_enforced, hidden, secure_deletion_data); in DeriveAesGcmKeyEncryptionKey()
124 KmErrorOr<EncryptedKey> AesGcmEncryptKey(const AuthorizationSet& hw_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()
206 const AuthorizationSet& hw_enforced, in SerializeAuthEncryptedBlob() argument
213 hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in SerializeAuthEncryptedBlob()
[all …]
/system/keymaster/include/keymaster/legacy_support/
Dkeymaster1_legacy_support.h71 AuthorizationSet* hw_enforced, // in GenerateKey() argument
76 issuer_subject, key_blob, hw_enforced, in GenerateKey()
80 issuer_subject, key_blob, hw_enforced, in GenerateKey()
91 AuthorizationSet* hw_enforced, // 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.h48 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, in GenerateKey() argument
51 return engine_->GenerateKey(key_description, key_blob, hw_enforced, sw_enforced); in GenerateKey()
59 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced, in ImportKey() argument
63 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
68 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
85 KeymasterPassthroughKey(KeymasterKeyBlob&& key_material, AuthorizationSet&& hw_enforced, in KeymasterPassthroughKey() argument
89 : Key(std::move(hw_enforced), std::move(sw_enforced), key_factory), in KeymasterPassthroughKey()
Dec_keymaster1_key.h50 AuthorizationSet* hw_enforced, //
60 AuthorizationSet* hw_enforced, //
66 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
80 EcdsaKeymaster1Key(EC_KEY* ecdsa_key, AuthorizationSet&& hw_enforced, in EcdsaKeymaster1Key() argument
82 : EcKey(ecdsa_key, std::move(hw_enforced), std::move(sw_enforced), key_factory) {} in EcdsaKeymaster1Key()
Drsa_keymaster1_key.h50 AuthorizationSet* hw_enforced, //
60 AuthorizationSet* hw_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()
114 virtual Operation* InstantiateOperation(AuthorizationSet&& hw_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/km_openssl/
Dsymmetric_key.cpp40 AuthorizationSet* hw_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()
73 AuthorizationSet* hw_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()
109 SymmetricKey::SymmetricKey(KeymasterKeyBlob&& key_material, AuthorizationSet&& hw_enforced, in SymmetricKey() argument
111 : Key(std::move(hw_enforced), std::move(sw_enforced), key_factory) { in SymmetricKey()
Dec_key_factory.cpp88 AuthorizationSet* hw_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()
209 AuthorizationSet* hw_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.cpp58 AuthorizationSet* hw_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()
128 AuthorizationSet* hw_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()
218 keymaster_error_t RsaKeyFactory::CreateEmptyKey(AuthorizationSet&& hw_enforced, in CreateEmptyKey() argument
221 key->reset(new (std::nothrow) RsaKey(std::move(hw_enforced), std::move(sw_enforced), this)); in CreateEmptyKey()
Daes_key.cpp46 AuthorizationSet&& hw_enforced, in LoadKey() argument
52 if (hw_enforced.Contains(TAG_BLOCK_MODE, KM_MODE_GCM) || in LoadKey()
55 if (!hw_enforced.GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length) && in LoadKey()
65 AesKey(std::move(key_material), std::move(hw_enforced), std::move(sw_enforced), in LoadKey()
/system/keymaster/contexts/
Dkeymaster1_passthrough_context.cpp110 if (key->hw_enforced().Contains(TAG_PURPOSE) && in UpgradeKeyBlob()
111 !key->hw_enforced().Contains(TAG_OS_PATCHLEVEL)) { in UpgradeKeyBlob()
121 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) { in parseKeymaster1HwBlob() argument
138 hw_enforced->Reinitialize(characteristics->hw_enforced); in parseKeymaster1HwBlob()
148 AuthorizationSet hw_enforced; in ParseKeyBlob() local
159 DeserializeIntegrityAssuredBlob(blob, hidden, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob()
164 &hw_enforced, &sw_enforced); in ParseKeyBlob()
170 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
176 return factory->LoadKey(std::move(key_material), additional_params, std::move(hw_enforced), in ParseKeyBlob()
186 AuthorizationSet hw_enforced, sw_enforced; in DeleteKey() local
[all …]
Dsoft_keymaster_context.cpp144 uint32_t os_patchlevel, AuthorizationSet* hw_enforced, in SetAuthorizations() argument
169 if (hw_enforced->GetTagCount(entry.tag) == 0) sw_enforced->push_back(entry); in SetAuthorizations()
186 AuthorizationSet* hw_enforced, in CreateKeyBlob() argument
189 os_patchlevel_, hw_enforced, sw_enforced); in CreateKeyBlob()
196 return SerializeIntegrityAssuredBlob(key_material, hidden, *hw_enforced, *sw_enforced, blob); in CreateKeyBlob()
218 if (km1_dev_ && key->hw_enforced().Contains(TAG_PURPOSE) && in UpgradeKeyBlob()
219 !key->hw_enforced().Contains(TAG_OS_PATCHLEVEL)) in UpgradeKeyBlob()
261 AuthorizationSet hw_enforced; in ParseKeyBlob() local
271 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
276 return factory->LoadKey(std::move(key_material), additional_params, std::move(hw_enforced), in ParseKeyBlob()
[all …]
/system/keymaster/include/keymaster/key_blob_utils/
Dsoftware_keyblobs.h40 keymaster_error_t FakeKeyAuthorizations(EVP_PKEY* pubkey, AuthorizationSet* hw_enforced,
45 AuthorizationSet* hw_enforced,
51 AuthorizationSet* hw_enforced,
56 uint32_t os_patchlevel, AuthorizationSet* hw_enforced,
60 keymaster_error_t ExtendKeyBlobAuthorizations(AuthorizationSet* hw_enforced,
/system/keymaster/legacy_support/
Dkeymaster_passthrough_engine.cpp87 KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced,
93 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced,
201 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) { in ConvertCharacteristics() argument
202 if (hw_enforced) hw_enforced->Reinitialize(characteristics.hw_enforced); in ConvertCharacteristics()
209 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in GenerateKey() argument
221 ConvertCharacteristics(*characteristics, hw_enforced, sw_enforced); in GenerateKey()
229 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in GenerateKey() argument
241 ConvertCharacteristics(characteristics, hw_enforced, sw_enforced); in GenerateKey()
250 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in ImportKey() argument
265 ConvertCharacteristics(*characteristics, hw_enforced, sw_enforced); in ImportKey()
[all …]
Dec_keymaster1_key.cpp70 AuthorizationSet* hw_enforced, in GenerateKey() argument
84 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced); in GenerateKey()
94 AuthorizationSet* hw_enforced, // in ImportKey() argument
100 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
105 AuthorizationSet&& hw_enforced, in LoadKey() argument
116 EcdsaKeymaster1Key(ecdsa.release(), std::move(hw_enforced), in LoadKey()
Drsa_keymaster1_key.cpp90 AuthorizationSet* hw_enforced, in GenerateKey() argument
95 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced); in GenerateKey()
105 AuthorizationSet* hw_enforced, // in ImportKey() argument
111 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
116 AuthorizationSet&& hw_enforced, in LoadKey() argument
126 RsaKeymaster1Key(rsa.release(), std::move(hw_enforced), std::move(sw_enforced), in LoadKey()
/system/keymaster/include/keymaster/
Dkey.h47 const AuthorizationSet& hw_enforced() const { return hw_enforced_; } in hw_enforced() function
49 AuthorizationSet& hw_enforced() { return hw_enforced_; } in hw_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