High-security Bluetooth digital key storage management method based on mobile terminal TEE

By generating and storing asymmetric key pairs in mobile TEE, combining secure storage and access control, the security risks of traditional Bluetooth digital key storage methods are solved, significantly improving the security and resistance of sensitive data, and suitable for multiple A mobile application scenario.

CN118921661APending Publication Date: 2024-11-08SHENZHEN LANYOU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410967907.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Traditional Bluetooth digital key storage methods have security risks and are vulnerable to device loss, malware attacks, reverse engineering and memory attacks. They lack hardware-level security protection, which leads to the risk of illegal access to sensitive data.

Method used

采用基于移动端TEE的高安全性蓝牙数字钥匙存储管理方法,通过硬件安全模块在可信执行环境中生成非对称密钥对,使用公钥加密蓝牙数字钥匙数据,并在安全存储区域进行存储和解密,结合安全随机数生成器、访问控制模块和数据生命周期管理,确保数据的安全性。

Benefits of technology

Significantly improves the security of Bluetooth digital keys, prevents unauthorized access and data leakage, enhances resistance to advanced attacks, simplifies the complexity of developers to achieve high-security storage, and is suitable for a variety of needs. mobile application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921661A_ABST
    Figure CN118921661A_ABST
Patent Text Reader

Abstract

The invention discloses a high-security Bluetooth digital key storage management method based on a mobile terminal TEE, and relates to the technical field of Bluetooth digital key security. The method comprises the steps that Secure Enclave is utilized on an iOS platform, the TrustZone technology is utilized on an Android platform, asymmetric encryption, secure storage and strict access control are combined, and a high-security digital key management system and high-security key generation, storage and management are achieved. Through hardware-level security isolation, a dual encryption mechanism and strict access control, the security of the Bluetooth digital key is remarkably improved, and meanwhile, good user experience and system performance are kept. The method is not only suitable for management of the Bluetooth digital key, but also can be expanded to other mobile application scenes requiring high security, such as the fields of financial transactions, identity authentication and the like, so that unauthorized access and data leakage are effectively prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of digital key security technology, and in particular relates to a high-security Bluetooth digital key storage and management method based on mobile terminal TEE. Background Art

[0002] With the popularity of the Internet of Things and smart devices, Bluetooth digital keys are increasingly used in mobile applications. However, traditional data storage methods have many security risks:

[0003] A: Ordinary mobile applications usually store sensitive data directly in the device's local storage, which is vulnerable to security threats such as device loss and malware attacks;

[0004] B: Although some applications use simple encryption methods, the keys are often stored together with the encrypted data, which still poses a risk of theft.

[0005] C: Traditional storage methods are vulnerable to advanced reverse engineering and memory attacks, putting sensitive data at risk of unauthorized access.

[0006] D: Lack of hardware-level security protection, and software-level security measures can be easily bypassed or cracked.

[0007] For example, Chinese patent CN112396735A provides a method and device for secure authentication of digital keys for connected vehicles, including remote unlocking and close unlocking. Based on PKI technology, during the verification process between the two parties, a signature algorithm is used to extract a summary of the digital key. The summary and digital key are encrypted and decrypted using the keys of both parties, respectively. The correspondence between the summary obtained through authentication and decryption and the digital key is then compared with the digital key recorded in the party's database to achieve the purpose of identity security authentication. Double mandatory authentication of digital keys can effectively prevent replay attacks, man-in-the-middle attacks, or password attacks. Even if a third party knows the digital key, it is still necessary to be able to detect illegal objects based on the correspondence between the summary and the digital key, greatly improving the security of authentication.

[0008] For example, Chinese patent CN115967920A discloses a method, system, device and medium for secure management of automobile Bluetooth keys. The method includes: generating a Bluetooth key activation request in response to a request operation of a user terminal and outputting it to the cloud; obtaining a digital key corresponding to the vehicle in the cloud according to the Bluetooth key activation request, wherein the digital key is generated by the cloud according to a pre-stored vehicle master key, and the vehicle master key is associated with the vehicle information; generating a session key based on the digital key to conduct an encrypted session with the vehicle.

[0009] Therefore, there is an urgent need for a safer and more reliable method for storing and managing Bluetooth digital keys. Summary of the Invention

[0010] The present invention aims to provide a method for securely storing and managing Bluetooth digital keys based on mobile TEE technology. On iOS platforms, this method generates and stores key pairs through the Secure Enclave, and uses the Keychain to store encrypted data. On Android platforms, this method generates and stores key pairs through the Android Keystore, and uses secure storage to store encrypted data, thereby addressing security risks existing in existing technologies.

[0011] To solve the above technical problems, the present invention is achieved through the following technical solutions:

[0012] The present invention is a high-security Bluetooth digital key storage management method based on mobile terminal TEE, comprising the following steps:

[0013] Step S01: Using the hardware security module of the mobile device as a trusted execution environment (TEE); using asymmetric encryption technology to generate a key pair in the trusted execution environment (TEE);

[0014] Step S02: Encrypting the Bluetooth digital key data using the public key;

[0015] Step S03: storing the encrypted data in a secure storage area of ​​the mobile device;

[0016] Step S04: when data needs to be used, the encrypted data is read from the secure storage area;

[0017] Step S05: Decrypt the encrypted data using the private key in the trusted execution environment TEE.

[0018] Furthermore, the hardware security module is a Secure Enclave on the iOS platform and a KeyStore based on TrustZone on the Android platform.

[0019] Furthermore, in step S01, the key pair generated by using asymmetric encryption technology is an RSA key pair with a key length of 2048 bits; before encrypting the Bluetooth digital key data, the Bluetooth digital key data is OAEP-padded; and the SHA256 algorithm is used as the hash function for OAEP padding.

[0020] Furthermore, the method further comprises the following steps:

[0021] Step B01: Deploy a secure random number generator in the trusted execution environment (TEE);

[0022] Step B02: Generate a unique identifier for each Bluetooth digital key using a secure random number generator;

[0023] Step B03: storing the unique identifier together with the encrypted Bluetooth digital key data;

[0024] Step B04: When retrieving and using the Bluetooth digital key, first verify the validity of the unique identifier. If the unique identifier is invalid, access to the corresponding Bluetooth digital key data is denied.

[0025] Furthermore, the secure storage area is Keychain on the iOS platform and EncryptedSharedPreferences on the Android platform; on the iOS platform, when storing encrypted data in Keychain, the kSecAttrAccessible attribute is set to kSecAttrAccessibleWhenUnlockedThisDeviceOnly.

[0026] Furthermore, the method further comprises the following steps:

[0027] Step G01: triggering key rotation periodically or based on set conditions;

[0028] Step G02: Generate a new key pair within the trusted execution environment (TEE);

[0029] Step G03: re-encrypt the Bluetooth digital key data using the new public key;

[0030] Step G04: Safely destroy the old private key.

[0031] Furthermore, the method further comprises the following steps:

[0032] Step F01: Deploy an access control module outside the trusted execution environment (TEE) to manage access rights to the encrypted Bluetooth digital key data;

[0033] Step F02: The access control module determines whether to allow the application to request data decryption according to a predefined policy.

[0034] Furthermore, in step S03:

[0035] When encrypting data, metadata associated with the encrypted data is also stored;

[0036] Metadata includes information such as the creation time, last access time, and number of accesses of the data;

[0037] Implement data lifecycle management based on metadata, including automatic deletion of expired data.

[0038] Furthermore, the method further comprises the following steps:

[0039] A secure log system records all key operations, including key generation, data encryption and decryption, and access control decisions.

[0040] The security logs recorded by the security log system are stored in the storage area protected by the Trusted Execution Environment (TEE) to prevent tampering or deletion.

[0041] Furthermore, the following steps are also included: through a secure backup and recovery mechanism, users are allowed to securely migrate encrypted Bluetooth digital key data when changing mobile devices; during the backup process, an additional encryption layer is used to protect data, and users are required to provide additional authentication information.

[0042] The definitions of the terms involved in the present invention are:

[0043] Trusted Execution Environment (TEE): A secure area running independently within a device's main processor, providing increased security for processing sensitive data and executing critical code. The TEE prevents unauthorized access and modification.

[0044] Secure Enclave: A hardware security module introduced by Apple on iOS devices to protect highly sensitive user data and encryption keys.

[0045] Keychain: A secure storage service provided by iOS and macOS for storing passwords, keys, and other sensitive data.

[0046] Android Keystore: A system-level service on the Android platform that generates and stores cryptographic keys, ensuring their security and non-exportability.

[0047] TrustZone: A TEE technology developed by ARM that separates the standard operating system (non-secure world) from the secure operating system (secure world) to ensure the security of sensitive data and operations.

[0048] Public key: A public key in asymmetric encryption, used to encrypt data and available to anyone.

[0049] Private key: A secret key in asymmetric encryption, used to decrypt data. Only the party holding the private key can decrypt the corresponding encrypted data.

[0050] Bluetooth Digital Key: A digital key generated and managed using Bluetooth technology to enable secure communication and authentication between devices.

[0051] The present invention has the following beneficial effects:

[0052] This invention leverages the hardware security features of iOS and Android platforms, combined with asymmetric encryption, secure storage, and strict access control, to achieve a highly secure digital key management system. This significantly improves the security of sensitive data in mobile applications while maintaining a positive user experience and system performance. This method is not only applicable to Bluetooth digital key management but can also be extended to other mobile application scenarios requiring high security, such as financial transactions and identity authentication.

[0053] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0055] Figure 1 This is the left half of the flowchart of the high-security Bluetooth digital key storage management method based on mobile TEE of the present invention;

[0056] Figure 2 This is the right half of the flowchart of the high-security Bluetooth digital key storage management method based on mobile TEE of the present invention. DETAILED DESCRIPTION

[0057] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0058] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0059] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0060] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0061] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0062] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0063] Example 1:

[0064] See also Figure 1-2 As shown in the figure, the present invention is a high-security Bluetooth digital key storage and management method based on mobile TEE. This method uses Secure Enclave on the iOS platform and TrustZone technology on the Android platform to achieve highly secure key generation, storage, and management. Through hardware-level security isolation, dual encryption mechanism, and strict access control, the present invention significantly improves the security of Bluetooth digital keys and effectively prevents unauthorized access and data leakage. The present invention includes the following steps:

[0065] Step S01: Using the hardware security module of the mobile device as a trusted execution environment (TEE); using asymmetric encryption technology to generate a key pair in the trusted execution environment (TEE); by using the hardware security module of the mobile device (such as iOS's Secure Enclave and Android's TrustZone) as a trusted execution environment (TEE), secure key generation and storage are achieved; as an embodiment provided by the present invention, preferably, the hardware security module is a SecureEnclave on the iOS platform and a KeyStore based on TrustZone on the Android platform;

[0066] Step S02: Use the public key to encrypt the Bluetooth digital key data; using asymmetric encryption technology, a key pair is generated in the TEE. The private key never leaves the TEE, ensuring the highest level of security;

[0067] Step S03: Storing the encrypted data in a secure storage area of ​​the mobile device, encrypting the Bluetooth digital key data using the public key, and storing the encrypted data in a secure storage area of ​​the device (such as iOS's Keychain or Android's EncryptedSharedPreferences);

[0068] Step S04: When data needs to be used, the encrypted data is read from the secure storage area. All encryption and decryption operations are completed within the TEE. The encrypted data cannot be decrypted outside the TEE.

[0069] Step S05: Use the private key in the trusted execution environment TEE to decrypt the encrypted data, implementing a double encryption mechanism. Even if the encrypted data is stolen, it cannot be decrypted without the private key inside the TEE.

[0070] This high-security Bluetooth digital key storage management method, based on mobile TEE, significantly improves the security of Bluetooth digital keys, effectively preventing unauthorized access and data leakage. Leveraging hardware-level security isolation, it enhances resistance to advanced attacks. It simplifies the complexity of implementing high-security storage for developers, improving application security and reliability. It is suitable for a variety of mobile application scenarios requiring high security, such as smart homes and car sharing.

[0071] As an embodiment provided by the present invention, preferably, the secure storage area is Keychain on the iOS platform and is EncryptedSharedPreferences on the Android platform; on the iOS platform, when storing encrypted data in the Keychain, the kSecAttrAccessible attribute is set to kSecAttrAccessibleWhenUnlockedThisDeviceOnly.

[0072] A highly secure Bluetooth digital key storage and management method based on mobile TEE, featuring innovative technology:

[0073] Providing a unified cross-platform security architecture: This paper proposes a unified TEE security architecture on iOS and Android platforms for the first time, achieving highly consistent security storage and management methods, greatly simplifying the development and maintenance of cross-platform applications;

[0074] Multi-layered security protection: By combining multiple security mechanisms such as hardware TEE, asymmetric encryption, secure storage, and access control, a comprehensive security protection system has been built, significantly improving the ability to resist various attacks.

[0075] Dynamic key management: A dynamic key generation and management mechanism based on TEE is introduced to avoid the risks of static key storage and enhance the long-term security of the system;

[0076] Performance-optimized encryption scheme: OAEP-padding RSA encryption is used to ensure security while optimizing encryption performance, suitable for the resource constraints of mobile devices.

[0077] Flexible data isolation strategy: Through sophisticated access control strategies, application-level data isolation is achieved, effectively preventing cross-application data leakage.

[0078] Example 2:

[0079] High-security Bluetooth digital key storage management method based on mobile TEE, implementation method on iOS platform:

[0080] Step 1: Generate a key pair

[0081] a. Create a dictionary of key generation parameters:

[0082]

[0083] b. Use the SecKeyCreateRandomKey function to generate a key pair:

[0084]

[0085] c. Get the public key from the private key:

[0086] guard let publicKey=SecKeyCopyPublicKey(privateKey)else{

[0087] throw SomeError.failedToGetPublicKey

[0088] };

[0089] Step 2: Encrypt data using the public key

[0090] a. Prepare encryption parameters:

[0091]

[0092] b. Perform encryption operations:

[0093]

[0094] Step 3: Store the encrypted data in the Keychain

[0095] a. Prepare the Keychain query dictionary:

[0096]

[0097]

[0098] b. Add data to the Keychain:

[0099]

[0100] Step 4: Read encrypted data from the Keychain a. Prepare the Keychain query dictionary:

[0101]

[0102] b. Retrieve data from the Keychain:

[0103]

[0104] Step 5: Decrypt the data using the private key a. Get the private key reference:

[0105]

[0106] b. Perform decryption operations:

[0107]

[0108]

[0109] Example 3:

[0110] High-security Bluetooth digital key storage management method based on mobile TEE, implementation method on Android platform:

[0111] Step 1: Generate a key pair

[0112] a. Create KeyGenParameterSpec:

[0113]

[0114] b. Initialize KeyPairGenerator and generate a key pair:

[0115]

[0116]

[0117] Step 2: Encrypt data using the public key

[0118] a. Get the public key:

[0119] KeyStore keyStore=KeyStore.getInstance("AndroidKeyStore");

[0120] keyStore.load(null);

[0121] PublicKey publicKey=keyStore.getCertificate("bluetooth_key_alias").getPublicKey();

[0122] b. Initialize Cipher and encrypt data:

[0123] Cipher cipher=Cipher.getInstance("RSA / ECB / OAEPWithSHA-256AndMGF1Padding");

[0124] cipher.init(Cipher.ENCRYPT_MODE,publicKey);

[0125] byte[]encryptedData=cipher.doFinal(dataToEncrypt);

[0126] Step 3: Store the encrypted data in a secure location

[0127] a. Use EncryptedSharedPreferences:

[0128]

[0129]

[0130] Step 4: Read encrypted data from a secure location a. Read data from EncryptedSharedPreferences:

[0131]

[0132]

[0133] Step 5: Decrypt the data using the private key

[0134] a. Get the private key:

[0135] KeyStore keyStore=KeyStore.getInstance("AndroidKeyStore");

[0136] keyStore.load(null);

[0137] PrivateKey privateKey=(PrivateKey)keyStore.getKey("bluetooth_key_alias",null);

[0138] b. Initialize Cipher and decrypt data:

[0139] Cipher cipher=

[0140] Cipher.getInstance("RSA / ECB / OAEPWithSHA-256AndMGF1Padding");

[0141] cipher.init(Cipher.DECRYPT_MODE,privateKey);

[0142] byte[]decryptedData=cipher.doFinal(encryptedData).

[0143] Example 4:

[0144] As an embodiment provided by the present invention, preferably, based on embodiment one, in step S01, the key pair generated by using asymmetric encryption technology is an RSA key pair with a key length of 2048 bits; before encrypting the Bluetooth digital key data, the Bluetooth digital key data is OAEP-padded; and the SHA256 algorithm is used as the hash function for OAEP padding.

[0145] As an embodiment provided by the present invention, preferably, based on the first embodiment, the following steps are further included:

[0146] Step B01: Deploy a secure random number generator in the trusted execution environment (TEE);

[0147] Step B02: Generate a unique identifier for each Bluetooth digital key using a secure random number generator;

[0148] Step B03: storing the unique identifier together with the encrypted Bluetooth digital key data;

[0149] Step B04: When retrieving and using the Bluetooth digital key, first verify the validity of the unique identifier. If the unique identifier is invalid, access to the corresponding Bluetooth digital key data is denied.

[0150] As an embodiment provided by the present invention, preferably, based on the first embodiment, the following steps are further included:

[0151] Step G01: triggering key rotation periodically or based on set conditions;

[0152] Step G02: Generate a new key pair within the trusted execution environment (TEE);

[0153] Step G03: re-encrypt the Bluetooth digital key data using the new public key;

[0154] Step G04: Safely destroy the old private key.

[0155] As an embodiment provided by the present invention, preferably, based on the first embodiment, the following steps are further included:

[0156] Step F01: Deploy an access control module outside the trusted execution environment (TEE) to manage access rights to the encrypted Bluetooth digital key data;

[0157] Step F02: The access control module determines whether to allow the application to request data decryption according to a predefined policy.

[0158] As an embodiment provided by the present invention, preferably, based on the first embodiment, in step S03:

[0159] When encrypting data, metadata associated with the encrypted data is also stored;

[0160] Metadata includes information such as the creation time, last access time, and number of accesses of the data;

[0161] Implement data lifecycle management based on metadata, including automatic deletion of expired data.

[0162] As an embodiment provided by the present invention, preferably, based on the first embodiment, the following steps are further included:

[0163] A secure log system records all key operations, including key generation, data encryption and decryption, and access control decisions.

[0164] The security logs recorded by the security log system are stored in the storage area protected by the Trusted Execution Environment (TEE) to prevent tampering or deletion.

[0165] As an embodiment provided by the present invention, preferably, based on embodiment one, the following steps are also included: through a secure backup and recovery mechanism, the user is allowed to securely migrate the encrypted Bluetooth digital key data when replacing the mobile device; during the backup process, an additional encryption layer is used to protect the data, and the user is required to provide additional authentication information.

[0166] Embodiment 5:

[0167] As an embodiment provided by the present invention, preferably, based on the first embodiment, the following steps are further included:

[0168] Implement a key management module outside the TEE to coordinate the generation, use, and rotation of keys;

[0169] The key management module communicates with the TEE through a secure channel but does not directly access the private key inside the TEE.

[0170] Example 6:

[0171] Also included is a mobile device based on embodiment 1, including:

[0172] a) processor;

[0173] b) memory;

[0174] c) Communication interface;

[0175] d) Trusted Execution Environment (TEE);

[0176] The memory stores a computer program, and when the computer program is executed by the processor, the method described above is implemented.

[0177] Also included is a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the methods described in embodiments one to five are implemented.

[0178] The implementation of this invention provides developers with a powerful and flexible security framework, greatly simplifying the complexity of implementing high-security applications. As the Internet of Things and smart devices become more popular, this invention will play an important role in protecting user privacy and data security.

[0179] This invention significantly improves the security of sensitive data in mobile applications while maintaining a good user experience and system performance. This method is not only applicable to Bluetooth digital key management but can also be extended to other mobile application scenarios requiring high security, such as financial transactions and identity authentication.

[0180] This high-security Bluetooth digital key storage management method based on mobile TEE leverages the hardware security features of iOS and Android platforms, combined with asymmetric encryption, secure storage, and strict access control to achieve a highly secure digital key management system. This significantly improves the security of sensitive data in mobile applications while maintaining a good user experience and system performance. This method is not only applicable to Bluetooth digital key management but can also be extended to other mobile application scenarios requiring high security, such as financial transactions and identity authentication.

[0181] Throughout this specification, references to terms such as "one embodiment," "example," or "specific example" indicate that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0182] The preferred embodiments of the present invention disclosed above are intended only to help illustrate the present invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the present invention to the specific embodiments described. Obviously, many modifications and variations are possible based on the content of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better understand and utilize the present invention. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A high-security Bluetooth digital key storage management method based on mobile terminal TEE, characterized in that: The following steps are involved: Step S01: Using the hardware security module of the mobile device as a trusted execution environment TEE; using asymmetric encryption technology to generate a key pair in the trusted execution environment TEE; Step S02: Encrypting Bluetooth digital key data using a public key; Step S03: storing the encrypted data in a secure storage area of ​​the mobile device; Step S04: when data needs to be used, the encrypted data is read from the secure storage area; Step S05: Decrypt the encrypted data using the private key in the trusted execution environment TEE.

2. The high-security Bluetooth digital key storage management method based on mobile terminal TEE according to claim 1 is characterized in that: The hardware security module is a Secure Enclave on the iOS platform and a KeyStore based on TrustZone on the Android platform.

3. The high-security Bluetooth digital key storage management method based on mobile terminal TEE according to claim 1 is characterized in that: In the step S01, asymmetric encryption technology is used to generate a key pair, which is an RSA key pair with a key length of 2048 bits; before encrypting the Bluetooth digital key data, OAEP padding is performed on the Bluetooth digital key data; and the SHA256 algorithm is used as the hash function for OAEP padding.

4. The high-security Bluetooth digital key storage management method based on mobile terminal TEE according to claim 1 is characterized in that: The following steps are also included: Step B01: Deploy a secure random number generator in the trusted execution environment TEE; Step B02: Generate a unique identifier for each Bluetooth digital key using a secure random number generator; Step B03: storing the unique identifier together with the encrypted Bluetooth digital key data; Step B04: When retrieving and using the Bluetooth digital key, first verify the validity of the unique identifier. If the unique identifier is invalid, access to the corresponding Bluetooth digital key data is denied.

5. The high-security Bluetooth digital key storage management method based on mobile terminal TEE according to claim 1 is characterized in that: The secure storage area is Keychain on the iOS platform and EncryptedSharedPreferences on the Android platform. On the iOS platform, when the encrypted data is stored in the Keychain, the kSecAttrAccessible attribute is set to kSecAttrAccessibleWhenUnlockedThisDeviceOnly.

6. The high-security Bluetooth digital key storage management method based on mobile terminal TEE according to claim 1 is characterized in that: The following steps are also included: Step G01: triggering key rotation periodically or based on set conditions; Step G02: Generate a new key pair inside the trusted execution environment TEE; Step G03: re-encrypt the Bluetooth digital key data using the new public key; Step G04: Safely destroy the old private key.

7. The high-security Bluetooth digital key storage management method based on mobile terminal TEE according to claim 1 is characterized in that: The following steps are also included: Step F01: deploy an access control module outside the trusted execution environment TEE to manage access rights to the encrypted Bluetooth digital key data; Step F02: The access control module determines whether to allow the application to request data decryption according to a predefined policy.

8. The high-security Bluetooth digital key storage management method based on mobile terminal TEE according to claim 1 is characterized in that: In step S03: When the encrypted data is stored, metadata associated with the encrypted data is also stored; Metadata includes the creation time, last access time, and access count of the data; Implement data lifecycle management based on metadata.

9. The high-security Bluetooth digital key storage management method based on mobile terminal TEE according to claim 1 is characterized in that: The following steps are also included: All key operations are recorded through a security log system, including key generation, data encryption and decryption, and access control decisions; The security logs recorded by the security log system are stored in the storage area protected by the trusted execution environment TEE to prevent tampering or deletion.

10. The high-security Bluetooth digital key storage management method based on mobile terminal TEE according to claim 1 is characterized in that: The following steps are also included: Through a secure backup and restore mechanism, users can safely migrate encrypted Bluetooth digital key data when changing mobile devices; During the backup process, an additional layer of encryption is used to protect data and users are required to provide additional authentication information.