/aosp12/system/keymaster/key_blob_utils/ |
H A D | software_keyblobs.cpp | 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() 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() 224 keymaster_error_t error = FakeKeyAuthorizations(pkey.get(), sw_enforced, sw_enforced); in ParseOldSoftkeymasterBlob() 247 *sw_enforced = move(key.sw_enforced); in ParseAuthEncryptedBlob() 255 sw_enforced->Clear(); in SetKeyBlobAuthorizations() [all …]
|
H A D | auth_encrypted_key_blob.cpp | 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 208 const AuthorizationSet& sw_enforced, in SerializeAuthEncryptedBlob() argument 215 hw_enforced.SerializedSize() + sw_enforced.SerializedSize(); in SerializeAuthEncryptedBlob() 231 buf = sw_enforced.Serialize(buf, end); in SerializeAuthEncryptedBlob() 262 !retval.sw_enforced.Deserialize(buf_ptr, end) || // in DeserializeAuthEncryptedBlob() 304 *error = OcbEncryptKey(hw_enforced, sw_enforced, hidden, master_key, plaintext, in EncryptKey() [all …]
|
H A D | ocb_utils.cpp | 47 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()
|
H A D | integrity_assured_key_blob.cpp | 78 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()
|
/aosp12/system/keymaster/contexts/ |
H A D | soft_keymaster_context.cpp | 143 sw_enforced->Clear(); 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() 259 AuthorizationSet sw_enforced; in ParseKeyBlob() local 274 move(sw_enforced), key); in ParseKeyBlob() 298 &sw_enforced); in ParseKeyBlob() 311 AuthorizationSet hw_enforced, sw_enforced; in DeleteKey() local 313 blob, &key_material, &hw_enforced, &sw_enforced); in DeleteKey() 338 AuthorizationSet* sw_enforced) const { in ParseKeymaster1HwBlob() [all …]
|
H A D | keymaster1_passthrough_context.cpp | 119 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 …]
|
/aosp12/system/keymaster/include/keymaster/km_openssl/ |
H A D | rsa_operation.h | 36 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 116 RsaVerifyOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaVerifyOperation() argument 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 180 RsaDecryptOperation(AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in RsaDecryptOperation() argument 211 AuthorizationSet&& sw_enforced, [all …]
|
H A D | ecdsa_operation.h | 32 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 …]
|
H A D | ec_key.h | 30 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()
|
H A D | rsa_key.h | 30 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()
|
/aosp12/system/keymaster/include/keymaster/legacy_support/ |
H A D | keymaster1_legacy_support.h | 71 AuthorizationSet* sw_enforced, in GenerateKey() argument 76 sw_enforced, cert_chain); in GenerateKey() 80 sw_enforced, cert_chain); in GenerateKey() 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() 152 AuthorizationSet* sw_enforced, // [all …]
|
H A D | keymaster_passthrough_key.h | 47 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()
|
H A D | ec_keymaster1_key.h | 49 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()
|
H A D | rsa_keymaster1_key.h | 49 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()
|
/aosp12/system/keymaster/km_openssl/ |
H A D | symmetric_key.cpp | 38 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()
|
H A D | attestation_utils.cpp | 50 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 283 const AuthorizationSet& sw_enforced, // in generate_attestation() argument 295 AuthProxy proxy(tee_enforced, sw_enforced); in generate_attestation() [all …]
|
H A D | rsa_key_factory.cpp | 56 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() 126 AuthorizationSet* sw_enforced, in ImportKey() argument 128 if (!output_key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in ImportKey() 138 output_key_blob, hw_enforced, sw_enforced); in ImportKey() 151 RsaKey key(*hw_enforced, *sw_enforced, this, move(rsa_key)); in ImportKey() 213 AuthorizationSet&& sw_enforced, in CreateEmptyKey() argument 215 key->reset(new (std::nothrow) RsaKey(move(hw_enforced), move(sw_enforced), this)); in CreateEmptyKey()
|
H A D | ec_key_factory.cpp | 84 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() 155 AuthorizationSet* sw_enforced, in ImportKey() argument 157 if (!output_key_blob || !hw_enforced || !sw_enforced) return KM_ERROR_OUTPUT_PARAMETER_NULL; in ImportKey() 166 output_key_blob, hw_enforced, sw_enforced); in ImportKey() 179 EcKey key(*hw_enforced, *sw_enforced, this, move(ec_key)); in ImportKey() 284 AuthorizationSet&& sw_enforced, in CreateEmptyKey() argument 286 key->reset(new (std::nothrow) EcKey(move(hw_enforced), move(sw_enforced), this)); in CreateEmptyKey()
|
/aosp12/system/keymaster/legacy_support/ |
H A D | keymaster_passthrough_engine.cpp | 86 AuthorizationSet* sw_enforced) const override; 92 AuthorizationSet* sw_enforced) const override; 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() 273 AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const { in ImportKey() [all …]
|
H A D | ec_keymaster1_key.cpp | 70 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()
|
H A D | rsa_keymaster1_key.cpp | 88 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()
|
H A D | keymaster1_legacy_support.cpp | 228 AuthorizationSet* sw_enforced, // in GenerateKey() argument 233 sw_enforced, cert_chain); in GenerateKey() 256 issuer_subject, key_blob, hw_enforced, sw_enforced, in GenerateKey() 264 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, UniquePtr<Key>* key) const { in LoadKey() argument 270 legacy_support_.RequiresSoftwareDigesting(digest, AuthProxy(hw_enforced, sw_enforced)); in LoadKey() 272 move(hw_enforced), move(sw_enforced), key); in LoadKey() 283 AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, UniquePtr<Key>* key) const { in LoadKey() argument 289 legacy_support_.RequiresSoftwareDigesting(digest, AuthProxy(hw_enforced, sw_enforced)); in LoadKey() 291 move(hw_enforced), move(sw_enforced), key); in LoadKey()
|
/aosp12/hardware/interfaces/security/keymint/aidl/vts/functional/ |
H A D | AttestKeyTest.cpp | 83 AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics); in TEST_P() local 84 EXPECT_TRUE(verify_attestation_record("foo", "bar", sw_enforced, hw_enforced, SecLevel(), in TEST_P() 115 sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics); in TEST_P() 154 sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics); in TEST_P() 159 EXPECT_TRUE(sw_enforced.Contains(TAG_CREATION_DATETIME, timestamp)) in TEST_P() 160 << "expected CREATION_TIMESTAMP in sw_enforced:" << sw_enforced in TEST_P() 219 AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attest_key_characteristics); in TEST_P() local 221 sw_enforced, hw_enforced, SecLevel(), in TEST_P() 314 AuthorizationSet sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics); in TEST_P() local 619 sw_enforced = SwEnforcedAuthorizations(attested_key_characteristics); in TEST_P() [all …]
|
/aosp12/system/keymaster/include/keymaster/key_blob_utils/ |
H A D | software_keyblobs.h | 40 AuthorizationSet* sw_enforced); 45 AuthorizationSet* sw_enforced); 51 AuthorizationSet* sw_enforced); 56 AuthorizationSet* sw_enforced); 59 AuthorizationSet* sw_enforced,
|
/aosp12/system/keymaster/include/keymaster/ |
H A D | key.h | 46 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()
|