Home
last modified time | relevance | path

Searched refs:hw_enforced (Results 1 – 25 of 65) 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()
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()
67 buf = hw_enforced.Serialize(buf, end); in BuildAesGcmInfo()
79 Buffer DeriveAesGcmKeyEncryptionKey(const AuthorizationSet& hw_enforced, in DeriveAesGcmKeyEncryptionKey() argument
94 Buffer info = BuildAesGcmInfo(hw_enforced, sw_enforced, hidden, error); in DeriveAesGcmKeyEncryptionKey()
114 EncryptedKey AesGcmEncryptKey(const AuthorizationSet& hw_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()
207 const AuthorizationSet& hw_enforced, in SerializeAuthEncryptedBlob() argument
215 hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in SerializeAuthEncryptedBlob()
[all …]
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()
/system/keymaster/include/keymaster/legacy_support/
Dkeymaster1_legacy_support.h70 AuthorizationSet* hw_enforced, // in GenerateKey() argument
75 issuer_subject, key_blob, hw_enforced, in GenerateKey()
79 issuer_subject, key_blob, hw_enforced, in GenerateKey()
90 AuthorizationSet* hw_enforced, // 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.h46 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, in GenerateKey() argument
49 return engine_->GenerateKey(key_description, key_blob, hw_enforced, sw_enforced); in GenerateKey()
57 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced, in ImportKey() argument
61 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
66 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
83 KeymasterPassthroughKey(KeymasterKeyBlob&& key_material, AuthorizationSet&& hw_enforced, in KeymasterPassthroughKey() argument
87 : Key(move(hw_enforced), move(sw_enforced), key_factory), in KeymasterPassthroughKey()
Dec_keymaster1_key.h48 AuthorizationSet* hw_enforced, //
58 AuthorizationSet* hw_enforced, //
64 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
78 EcdsaKeymaster1Key(EC_KEY* ecdsa_key, AuthorizationSet&& hw_enforced, in EcdsaKeymaster1Key() argument
80 : EcKey(ecdsa_key, move(hw_enforced), move(sw_enforced), key_factory) {} in EcdsaKeymaster1Key()
Drsa_keymaster1_key.h48 AuthorizationSet* hw_enforced, //
58 AuthorizationSet* hw_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()
91 virtual Operation* InstantiateOperation(AuthorizationSet&& hw_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 …]
Daes_key.h38 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced,
53 AesKey(KeymasterKeyBlob&& key_material, AuthorizationSet&& hw_enforced, in AesKey() argument
55 : SymmetricKey(move(key_material), move(hw_enforced), move(sw_enforced), key_factory) {} in AesKey()
/system/keymaster/contexts/
Dsoft_keymaster_context.cpp141 uint32_t os_patchlevel, AuthorizationSet* hw_enforced, in SetAuthorizations() argument
166 if (hw_enforced->GetTagCount(entry.tag) == 0) sw_enforced->push_back(entry); in SetAuthorizations()
183 AuthorizationSet* hw_enforced, in CreateKeyBlob() argument
186 os_patchlevel_, hw_enforced, sw_enforced); in CreateKeyBlob()
193 return SerializeIntegrityAssuredBlob(key_material, hidden, *hw_enforced, *sw_enforced, blob); in CreateKeyBlob()
215 if (km1_dev_ && key->hw_enforced().Contains(TAG_PURPOSE) && in UpgradeKeyBlob()
216 !key->hw_enforced().Contains(TAG_OS_PATCHLEVEL)) in UpgradeKeyBlob()
258 AuthorizationSet hw_enforced; in ParseKeyBlob() local
268 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
273 return factory->LoadKey(move(key_material), additional_params, move(hw_enforced), in ParseKeyBlob()
[all …]
Dkeymaster1_passthrough_context.cpp108 if (key->hw_enforced().Contains(TAG_PURPOSE) && in UpgradeKeyBlob()
109 !key->hw_enforced().Contains(TAG_OS_PATCHLEVEL)) { in UpgradeKeyBlob()
119 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) { in parseKeymaster1HwBlob() argument
136 hw_enforced->Reinitialize(characteristics->hw_enforced); in parseKeymaster1HwBlob()
146 AuthorizationSet hw_enforced; in ParseKeyBlob() local
157 DeserializeIntegrityAssuredBlob(blob, hidden, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob()
162 &hw_enforced, &sw_enforced); in ParseKeyBlob()
168 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
174 return factory->LoadKey(move(key_material), additional_params, move(hw_enforced), in ParseKeyBlob()
184 AuthorizationSet hw_enforced, sw_enforced; in DeleteKey() local
[all …]
/system/keymaster/km_openssl/
Dsymmetric_key.cpp37 AuthorizationSet* hw_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()
70 AuthorizationSet* hw_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()
106 SymmetricKey::SymmetricKey(KeymasterKeyBlob&& key_material, AuthorizationSet&& hw_enforced, in SymmetricKey() argument
108 : Key(move(hw_enforced), move(sw_enforced), key_factory) { in SymmetricKey()
Daes_key.cpp44 AuthorizationSet&& hw_enforced, in LoadKey() argument
50 if (hw_enforced.Contains(TAG_BLOCK_MODE, KM_MODE_GCM) || in LoadKey()
53 if (!hw_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.cpp55 AuthorizationSet* hw_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()
126 AuthorizationSet* hw_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()
214 keymaster_error_t RsaKeyFactory::CreateEmptyKey(AuthorizationSet&& hw_enforced, in CreateEmptyKey() argument
217 key->reset(new (std::nothrow) RsaKey(move(hw_enforced), move(sw_enforced), this)); in CreateEmptyKey()
Dec_key_factory.cpp83 AuthorizationSet* hw_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()
155 AuthorizationSet* hw_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()
285 keymaster_error_t EcKeyFactory::CreateEmptyKey(AuthorizationSet&& hw_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.h39 keymaster_error_t FakeKeyAuthorizations(EVP_PKEY* pubkey, AuthorizationSet* hw_enforced,
44 AuthorizationSet* hw_enforced,
50 AuthorizationSet* hw_enforced,
55 uint32_t os_patchlevel, AuthorizationSet* hw_enforced,
58 keymaster_error_t ExtendKeyBlobAuthorizations(AuthorizationSet* hw_enforced,
Dintegrity_assured_key_blob.h30 const AuthorizationSet& hw_enforced,
37 AuthorizationSet* hw_enforced,
42 AuthorizationSet* hw_enforced,
/system/keymaster/include/keymaster/
Dkey.h45 const AuthorizationSet& hw_enforced() const { return hw_enforced_; } in hw_enforced() function
47 AuthorizationSet& hw_enforced() { return hw_enforced_; } in hw_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.cpp85 KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced,
91 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced,
199 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) { in ConvertCharacteristics() argument
200 if (hw_enforced) hw_enforced->Reinitialize(characteristics.hw_enforced); in ConvertCharacteristics()
207 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in GenerateKey() argument
219 ConvertCharacteristics(*characteristics, hw_enforced, sw_enforced); in GenerateKey()
227 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in GenerateKey() argument
239 ConvertCharacteristics(characteristics, hw_enforced, sw_enforced); in GenerateKey()
248 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in ImportKey() argument
263 ConvertCharacteristics(*characteristics, hw_enforced, sw_enforced); in ImportKey()
[all …]
Drsa_keymaster1_key.cpp87 AuthorizationSet* hw_enforced, in GenerateKey() argument
92 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced); in GenerateKey()
102 AuthorizationSet* hw_enforced, // in ImportKey() argument
108 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
113 AuthorizationSet&& hw_enforced, in LoadKey() argument
123 RsaKeymaster1Key(rsa.release(), move(hw_enforced), move(sw_enforced), this)); in LoadKey()
Dec_keymaster1_key.cpp69 AuthorizationSet* hw_enforced, in GenerateKey() argument
83 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced); in GenerateKey()
93 AuthorizationSet* hw_enforced, // in ImportKey() argument
99 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
104 AuthorizationSet&& hw_enforced, in LoadKey() argument
115 EcdsaKeymaster1Key(ecdsa.release(), move(hw_enforced), move(sw_enforced), this)); in LoadKey()

123