1e41f4b71Sopenharmony_ci# Introduction to Asset Store Kit
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciAsset Store Kit provides a set of asset store service (ASSET) APIs, which implement secure storage and management of sensitive data less than 1024 bytes in size, including passwords, app tokens, and other critical data (such as bank card numbers).
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci## Basic Concepts
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciThe secure storage of assets depends on the underlying HUKS. Specifically, HUKS implements the asset encryption, decryption, and access control in a secure environment (such as a TEE). The sensitive user data will never be disclosed even if the system is attacked.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ciThe AES256-GCM algorithm is used to encrypt and decrypt assets. The following access control mechanisms are used to protect assets against unauthorized access:
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci* Owner-based access control: All assets are protected by this mechanism by default.
12e41f4b71Sopenharmony_ci  * An asset can be accessed only by its owner (service that writes the asset).
13e41f4b71Sopenharmony_ci  * ASSET obtains the asset owner identity from the system service. Even if the service identity is spoofed, the spoofer cannot obtain the data of other services.
14e41f4b71Sopenharmony_ci  * The asset encryption/decryption also protects the integrity of the asset owner identity. Even if the owner of the asset is tampered with, attackers cannot obtain data of other services.
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci* Access control based on the lock screen status: This mechanism provides the following protection levels in ascending order of security. You can set it based on site requirements. If no protection level is set, assets are accessible only after the device is unlocked for the first time.
17e41f4b71Sopenharmony_ci  * **DEVICE_POWERED_ON**: allows access to assets after the device is powered on.
18e41f4b71Sopenharmony_ci  * **DEVICE_FIRST_UNLOCKED**: allows access to assets after the device is unlocked for the first time.
19e41f4b71Sopenharmony_ci  * **DEVICE_UNLOCKED**: allows access to assets only when the device is unlocked.
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci* Access control based on the setting of the lock screen password: This mechanism allows assets to be accessed only after a lock screen password is set. By default, it is disabled.
22e41f4b71Sopenharmony_ci  * If this mechanism is enabled, assets can be accessed only after the user sets a screen lock password.
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ci* Access control based on user authentication: This mechanism allows assets to be accessed only after a successful user identity authentication. By default, it is disabled.
25e41f4b71Sopenharmony_ci  * If this mechanism is enabled, assets can be accessed only after a successful user identity authentication.
26e41f4b71Sopenharmony_ci  * The user authentication can be fingerprint, facial, or PIN authentication.
27e41f4b71Sopenharmony_ci  * You can set an authentication validity period, which allows access to multiple assets within the validity period. The maximum authentication validity period is 10 minutes.
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci## Constraints
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci* Alias-based access
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci  Assets are stored in the ASSET database in ciphertext and uniquely identified by the service identity and alias. The alias of each asset must be unique.
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci* Batch asset query
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci  The assets queried are transmitted to the service through an IPC channel. Due to the limitation of the IPC buffer size, the maximum number of assets to be queried at a time cannot exceed 40.
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ci* Custom service data storage
40e41f4b71Sopenharmony_ci  ASSET provides 12 custom asset attributes starting with **DATA_LABEL** for services. If the 12 custom attributes are used, you can combine multiple data segments in a certain format (for example, JSON) into an ASSET attribute.
41e41f4b71Sopenharmony_ci
42e41f4b71Sopenharmony_ci  ASSET protects the integrity of the attributes starting with **DATA_LABEL_CRITICAL**. These attributes cannot be changed once written.
43e41f4b71Sopenharmony_ci
44e41f4b71Sopenharmony_ci## Relationship with Other Kits
45e41f4b71Sopenharmony_ci
46e41f4b71Sopenharmony_ciAsset Store Kit provides secure storage of sensitive data less than 1 KB in size. To protect data greater than 1 KB, use [HUKS](../UniversalKeystoreKit/huks-overview.md) or [Crypto Framework](../CryptoArchitectureKit/crypto-architecture-kit-intro.md).
47