Home
last modified time | relevance | path

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

123

/system/keymaster/legacy_support/
Dec_keymaster0_key.cpp38 AuthorizationSet* hw_enforced, in GenerateKey() argument
40 if (!key_blob || !hw_enforced || !sw_enforced) in GenerateKey()
44 return super::GenerateKey(key_description, key_blob, hw_enforced, sw_enforced); in GenerateKey()
59 hw_enforced->push_back(TAG_ALGORITHM, KM_ALGORITHM_EC); in GenerateKey()
60 hw_enforced->push_back(TAG_KEY_SIZE, key_size); in GenerateKey()
61 hw_enforced->push_back(TAG_EC_CURVE, ec_curve); in GenerateKey()
62 hw_enforced->push_back(TAG_ORIGIN, KM_ORIGIN_UNKNOWN); in GenerateKey()
65 hw_enforced, sw_enforced); in GenerateKey()
71 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in ImportKey() argument
72 if (!output_key_blob || !hw_enforced || !sw_enforced) in ImportKey()
[all …]
Drsa_keymaster0_key.cpp38 AuthorizationSet* hw_enforced, in GenerateKey() argument
40 if (!key_blob || !hw_enforced || !sw_enforced) in GenerateKey()
61 hw_enforced->push_back(TAG_ALGORITHM, KM_ALGORITHM_RSA); in GenerateKey()
62 hw_enforced->push_back(TAG_RSA_PUBLIC_EXPONENT, public_exponent); in GenerateKey()
63 hw_enforced->push_back(TAG_KEY_SIZE, key_size); in GenerateKey()
64 hw_enforced->push_back(TAG_ORIGIN, KM_ORIGIN_UNKNOWN); in GenerateKey()
67 hw_enforced, sw_enforced); in GenerateKey()
73 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in ImportKey() argument
74 if (!output_key_blob || !hw_enforced || !sw_enforced) in ImportKey()
92 hw_enforced->push_back(TAG_ALGORITHM, KM_ALGORITHM_RSA); in ImportKey()
[all …]
Dec_keymaster1_key.cpp66 AuthorizationSet* hw_enforced, in GenerateKey() argument
79 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced); in GenerateKey()
85 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in ImportKey() argument
89 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
94 AuthorizationSet&& hw_enforced, in LoadKey() argument
107 EcdsaKeymaster1Key(ecdsa.release(), move(hw_enforced), move(sw_enforced), this)); in LoadKey()
Dkeymaster_passthrough_engine.cpp86 KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced,
92 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced,
203 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) { in ConvertCharacteristics() argument
204 if (hw_enforced) in ConvertCharacteristics()
205 hw_enforced->Reinitialize(characteristics.hw_enforced); in ConvertCharacteristics()
214 AuthorizationSet* hw_enforced, in GenerateKey() argument
228 ConvertCharacteristics(*characteristics, hw_enforced, sw_enforced); in GenerateKey()
237 AuthorizationSet* hw_enforced, in GenerateKey() argument
251 ConvertCharacteristics(characteristics, hw_enforced, sw_enforced); in GenerateKey()
262 AuthorizationSet* hw_enforced, in ImportKey() argument
[all …]
Drsa_keymaster1_key.cpp84 AuthorizationSet* hw_enforced, in GenerateKey() argument
88 return engine_->GenerateKey(key_params_copy, key_blob, hw_enforced, sw_enforced); in GenerateKey()
94 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in ImportKey() argument
98 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
103 AuthorizationSet&& hw_enforced, in LoadKey() argument
115 RsaKeymaster1Key(rsa.release(), move(hw_enforced), move(sw_enforced), this)); in LoadKey()
/system/keymaster/key_blob_utils/
Dsoftware_keyblobs.cpp95 AuthorizationSet* hw_enforced, in FakeKeyAuthorizations() argument
97 hw_enforced->Clear(); in FakeKeyAuthorizations()
102 hw_enforced->push_back(TAG_ALGORITHM, KM_ALGORITHM_RSA); in FakeKeyAuthorizations()
103 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_NONE); in FakeKeyAuthorizations()
104 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_MD5); in FakeKeyAuthorizations()
105 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_SHA1); in FakeKeyAuthorizations()
106 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_SHA_2_224); in FakeKeyAuthorizations()
107 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_SHA_2_256); in FakeKeyAuthorizations()
108 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_SHA_2_384); in FakeKeyAuthorizations()
109 hw_enforced->push_back(TAG_DIGEST, KM_DIGEST_SHA_2_512); in FakeKeyAuthorizations()
[all …]
Dauth_encrypted_key_blob.cpp30 const AuthorizationSet& hw_enforced, in SerializeAuthEncryptedBlob() argument
37 hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in SerializeAuthEncryptedBlob()
49 buf = hw_enforced.Serialize(buf, end); in SerializeAuthEncryptedBlob()
59 AuthorizationSet* hw_enforced, in DeserializeUnversionedBlob() argument
72 !hw_enforced->Deserialize(buf_ptr, end) || // in DeserializeUnversionedBlob()
84 AuthorizationSet* hw_enforced, in DeserializeAuthEncryptedBlob() argument
102 !hw_enforced->Deserialize(buf_ptr, end) || // in DeserializeAuthEncryptedBlob()
131 return DeserializeUnversionedBlob(key_blob, encrypted_key_material, hw_enforced, in DeserializeAuthEncryptedBlob()
Docb_utils.cpp48 static keymaster_error_t BuildDerivationData(const AuthorizationSet& hw_enforced, in BuildDerivationData() argument
54 hidden.SerializedSize() + hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in BuildDerivationData()
62 buf = hw_enforced.Serialize(buf, end); in BuildDerivationData()
68 static keymaster_error_t InitializeKeyWrappingContext(const AuthorizationSet& hw_enforced, in InitializeKeyWrappingContext() argument
75 keymaster_error_t error = BuildDerivationData(hw_enforced, sw_enforced, hidden, in InitializeKeyWrappingContext()
118 keymaster_error_t OcbEncryptKey(const AuthorizationSet& hw_enforced, in OcbEncryptKey() argument
133 InitializeKeyWrappingContext(hw_enforced, sw_enforced, hidden, master_key, &ctx); in OcbEncryptKey()
154 keymaster_error_t OcbDecryptKey(const AuthorizationSet& hw_enforced, in OcbDecryptKey() argument
169 InitializeKeyWrappingContext(hw_enforced, sw_enforced, hidden, master_key, &ctx); in OcbDecryptKey()
Dintegrity_assured_key_blob.cpp81 const AuthorizationSet& hw_enforced, in SerializeIntegrityAssuredBlob() argument
86 hw_enforced.SerializedSize() + // in SerializeIntegrityAssuredBlob()
96 p = hw_enforced.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob()
105 AuthorizationSet* hw_enforced, in DeserializeIntegrityAssuredBlob() argument
122 return DeserializeIntegrityAssuredBlob_NoHmacCheck(key_blob, key_material, hw_enforced, in DeserializeIntegrityAssuredBlob()
128 AuthorizationSet* hw_enforced, in DeserializeIntegrityAssuredBlob_NoHmacCheck() argument
141 !hw_enforced->Deserialize(&p, end) || // in DeserializeIntegrityAssuredBlob_NoHmacCheck()
/system/keymaster/include/keymaster/legacy_support/
Dkeymaster1_legacy_support.h72 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, in GenerateKey() argument
75 return software_digest_factory_.GenerateKey(key_description, key_blob, hw_enforced, in GenerateKey()
78 return passthrough_factory_.GenerateKey(key_description, key_blob, hw_enforced, in GenerateKey()
86 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced, in ImportKey() argument
91 hw_enforced, sw_enforced); in ImportKey()
95 hw_enforced, sw_enforced); in ImportKey()
101 AuthorizationSet&& hw_enforced, in LoadKey() argument
110 AuthProxy(hw_enforced, sw_enforced))) { in LoadKey()
112 move(hw_enforced), move(sw_enforced), key); in LoadKey()
115 move(hw_enforced), move(sw_enforced), key); in LoadKey()
[all …]
Dkeymaster_passthrough_key.h44 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced, in GenerateKey() argument
46 return engine_->GenerateKey(key_description, key_blob, hw_enforced, sw_enforced); in GenerateKey()
52 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced, in ImportKey() argument
55 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
60 AuthorizationSet&& hw_enforced,
78 KeymasterPassthroughKey(KeymasterKeyBlob&& key_material, AuthorizationSet&& hw_enforced, in KeymasterPassthroughKey() argument
83 : Key(move(hw_enforced), move(sw_enforced), key_factory), in KeymasterPassthroughKey()
Drsa_keymaster0_key.h41 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced,
47 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced,
52 AuthorizationSet&& hw_enforced,
62 RsaKeymaster0Key(RSA* rsa_key, AuthorizationSet&& hw_enforced, in RsaKeymaster0Key() argument
65 : RsaKey(rsa_key, move(hw_enforced), move(sw_enforced), key_factory) {} in RsaKeymaster0Key()
Dec_keymaster0_key.h41 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced,
47 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced,
52 AuthorizationSet&& hw_enforced,
62 EcKeymaster0Key(EC_KEY* ec_key, AuthorizationSet&& hw_enforced, in EcKeymaster0Key() argument
64 : EcKey(ec_key, move(hw_enforced), move(sw_enforced), key_factory) {} in EcKeymaster0Key()
Dec_keymaster1_key.h45 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced,
51 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced,
56 AuthorizationSet&& hw_enforced,
71 EcdsaKeymaster1Key(EC_KEY* ecdsa_key, AuthorizationSet&& hw_enforced, in EcdsaKeymaster1Key() argument
73 : EcKey(ecdsa_key, move(hw_enforced), move(sw_enforced), key_factory) {} in EcdsaKeymaster1Key()
Drsa_keymaster1_key.h46 KeymasterKeyBlob* key_blob, AuthorizationSet* hw_enforced,
52 KeymasterKeyBlob* output_key_blob, AuthorizationSet* hw_enforced,
57 AuthorizationSet&& hw_enforced,
74 RsaKeymaster1Key(RSA* rsa_key, AuthorizationSet&& hw_enforced, in RsaKeymaster1Key() argument
77 : RsaKey(rsa_key, move(hw_enforced), move(sw_enforced), key_factory) {} in RsaKeymaster1Key()
/system/keymaster/contexts/
Dsoft_keymaster_context.cpp157 uint32_t os_patchlevel, AuthorizationSet* hw_enforced, in SetAuthorizations() argument
182 if (hw_enforced->GetTagCount(entry.tag) == 0) in SetAuthorizations()
200 AuthorizationSet* hw_enforced, in CreateKeyBlob() argument
203 os_patchlevel_, hw_enforced, sw_enforced); in CreateKeyBlob()
212 return SerializeIntegrityAssuredBlob(key_material, hidden, *hw_enforced, *sw_enforced, blob); in CreateKeyBlob()
235 if (km1_dev_ && key->hw_enforced().Contains(TAG_PURPOSE) && in UpgradeKeyBlob()
236 !key->hw_enforced().Contains(TAG_OS_PATCHLEVEL)) in UpgradeKeyBlob()
278 AuthorizationSet hw_enforced; in ParseKeyBlob() local
288 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
293 return factory->LoadKey(move(key_material), additional_params, move(hw_enforced), in ParseKeyBlob()
[all …]
Dkeymaster1_passthrough_context.cpp102 if (key->hw_enforced().Contains(TAG_PURPOSE) && in UpgradeKeyBlob()
103 !key->hw_enforced().Contains(TAG_OS_PATCHLEVEL)) { in UpgradeKeyBlob()
114 AuthorizationSet* hw_enforced, in parseKeymaster1HwBlob() argument
135 hw_enforced->Reinitialize(characteristics->hw_enforced); in parseKeymaster1HwBlob()
143 AuthorizationSet hw_enforced; in ParseKeyBlob() local
154 … error = DeserializeIntegrityAssuredBlob(blob, hidden, &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob()
160 &key_material, &hw_enforced, &sw_enforced); in ParseKeyBlob()
166 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
172 return factory->LoadKey(move(key_material), additional_params, move(hw_enforced), in ParseKeyBlob()
182 AuthorizationSet hw_enforced, sw_enforced; in DeleteKey() local
[all …]
/system/keymaster/include/keymaster/km_openssl/
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()
158 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 …]
Dec_key.h31 EcKey(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in EcKey() argument
33 : AsymmetricKey(move(hw_enforced), move(sw_enforced), key_factory) {} 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.h28 RsaKey(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaKey() argument
30 : AsymmetricKey(move(hw_enforced), move(sw_enforced), key_factory) {} 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()
/system/keymaster/km_openssl/
Dsymmetric_key.cpp35 AuthorizationSet* hw_enforced, in GenerateKey() argument
37 if (!key_blob || !hw_enforced || !sw_enforced) in GenerateKey()
61 hw_enforced, sw_enforced); in GenerateKey()
68 AuthorizationSet* hw_enforced, in ImportKey() argument
70 if (!output_key_blob || !hw_enforced || !sw_enforced) in ImportKey()
94 output_key_blob, hw_enforced, sw_enforced); in ImportKey()
105 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in SymmetricKey() argument
107 : Key(move(hw_enforced), move(sw_enforced), key_factory) { in SymmetricKey()
Daes_key.cpp46 AuthorizationSet&& hw_enforced, in LoadKey() argument
53 if (hw_enforced.Contains(TAG_BLOCK_MODE, KM_MODE_GCM) || in LoadKey()
56 if (!hw_enforced.GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length) && in LoadKey()
65 key->reset(new (std::nothrow) AesKey(move(key_material), move(hw_enforced), move(sw_enforced), in LoadKey()
/system/keymaster/include/keymaster/key_blob_utils/
Dsoftware_keyblobs.h39 AuthorizationSet* hw_enforced,
44 AuthorizationSet* hw_enforced,
50 AuthorizationSet* hw_enforced,
55 uint32_t os_patchlevel, 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()

123