Password input method and system
By generating and encrypting random keyboard vector graphics in consumer devices, dynamically adjusting the keyboard security level, and combining the collaborative design of security application modules and ordinary application modules, the hardware security deficiencies and software vulnerability issues of consumer devices are solved, achieving highly secure and autonomous password input.
Patent Information
- Application Number
- CN202511659895.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-10
AI Technical Summary
Consumer devices lack hardware security foundations such as SE chips, making it difficult to achieve high-strength key storage and encryption operations. Software protection measures are vulnerable to interface hijacking or malicious attacks, and the inability to customize security policies and interfaces limits overall protection capabilities.
A security application module generates random keyboard vector graphics and encrypts them, dynamically determining the keyboard security level. Through the collaborative operation of the security application module and the ordinary application module, a trusted execution environment is constructed, achieving a balance between password input security and operational efficiency.
It effectively resists interface hijacking attacks, improves the security and autonomy of password input, builds a dynamically adjustable password input protection system, avoids the risk of key leakage and tampering, and adapts to different security needs.
Smart Images

Figure CN121502806A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of password input, in particular to a password input method and system. BACKGROUND
[0002] In the password input scene of consumer devices, the existing security measures have obvious deficiencies. On the one hand, most consumer devices lack hardware security foundation such as SE chip, and it is difficult to realize high-strength key storage and encryption operation. On the other hand, software protection means such as password keyboard disorder can only run in a non-secure environment, such as REE, which is easy to be subjected to interface hijacking or malicious attacks. In addition, since consumer devices cannot preinstall device-level root keys, the encryption protection level of password data is low, and consumer devices are limited by system architecture, so they can only use TEE / SE to protect password data, and cannot customize security policies and security interfaces, resulting in limited overall protection capability. SUMMARY
[0003] The technical problem to be solved by the present application is to provide a password input method and system which can improve the security and autonomy of password input.
[0004] In order to solve the above technical problems, the technical scheme adopted by the present application is: A password input method, comprising: A security application module generates a random keyboard vector diagram according to a password input request, and encrypts the random keyboard vector diagram to obtain security keyboard information corresponding to the password input request; The security application module determines a keyboard security level according to the password input request, and determines a target application module corresponding to the keyboard security level; The target application module displays a keyboard interface of the security keyboard information; The target application module includes the security application module or a normal application module, and the security of the security application module is higher than that of the normal application module.
[0005] In order to solve the above technical problems, another technical scheme adopted by the present application is: A password input system, comprising a secure virtual environment and a normal execution environment, the secure virtual environment comprising a security application module, and the normal execution environment comprising a normal application module; The security application module is configured to perform the steps implemented by the security application module in the above-mentioned password input method; The normal application module is configured to perform the steps implemented by the normal application module in the above-mentioned password input method.
[0006] The application has the beneficial effects that the security application module generates a random keyboard vector diagram according to a password input request, generates different keyboard layouts each time, fundamentally avoids the risk that a fixed keyboard layout is recorded by a malicious program, the security application module performs encryption processing on the random keyboard vector diagram to generate security keyboard information, ensures that the keyboard data cannot be tampered with or stolen in the transmission process, the security application module dynamically determines the keyboard security level according to the password input request, matches the corresponding target application module according to different security requirements, meets the requirement that sensitive operations are directly processed by the security application module in a high-security scenario, and also takes into account the lightweight execution characteristics of the ordinary application module in an ordinary scenario, when the target application module displays the security keyboard information, the security level difference between the security application module and the ordinary application module is distinguished, so that high-security-level operations can be completed in a secure virtual domain with a trusted execution environment, and ordinary operations are retained in a regular execution domain, the balance between security and running efficiency is achieved, through the cooperation of the security application module and the ordinary application module, a password input protection system that can be dynamically adjusted is constructed without relying on hardware security elements such as SE chips, interface hijacking attacks are effectively resisted, and the security and autonomy of password input are improved. BRIEF DESCRIPTION OF DRAWINGS
[0007] Figure 1 A flowchart of a password input method of the application; Figure 2 An interaction flowchart of a method for creating a secure virtual environment of the application; Figure 3 An interaction flowchart of a method for transmitting a password input request of the application; Figure 4 An interaction flowchart of a method for displaying a security keyboard interface of the application; Figure 5 An interaction flowchart of a method for obtaining a real password of a user of the application; Figure 6 A simple architecture diagram of a password input system of the application; Figure 7 A complete architecture diagram of a password input system of the application. DETAILED DESCRIPTION
[0008] To explain the technical content, purposes and effects of the application in detail, the following will be described in conjunction with the embodiments and the accompanying drawings.
[0009] Table 1 Explanation of Professional Names
[0010] With the wide popularity of intelligent terminal devices and the rapid development of mobile payment technology, password input has become a key link for user identity verification and transaction authorization in applications involving sensitive operations such as bank applications and financial applications. Such scenarios are directly related to user fund and information security, and therefore have very high requirements for the security of the password input process.
[0011] Currently, to improve the security of password input, common protection technologies mainly include application layer password keyboard random arrangement, anti-screen capture and anti-recording screen functions, and measures such as encryption storage and processing of password data with the help of trusted execution environment (TEE) or secure element (SE). Consumer devices such as smartphones, tablets, and smartwatches are also constantly enhancing their own security capabilities, trying to build more reliable security barriers at the hardware and system level.
[0012] However, due to the limitations of consumer devices themselves, the existing security mechanisms still have many inherent defects. First, at the hardware level, many devices do not integrate dedicated SE chips due to cost and design considerations, resulting in a lack of hardware-level secure storage and operation support, making it difficult to achieve high-strength password protection equivalent to dedicated security devices such as POS machines. Second, software protection strategies such as password keyboard dynamic randomization usually run in a non-secure environment (REE), which is vulnerable to malicious software attacks or interface disguise threats, and has a weak security foundation. Third, consumer devices usually cannot pre-inject device-specific root keys or hardware keys like professional financial devices, so when encrypting sensitive data such as passwords, the key strength and protection mechanism relied on is insufficient, and the overall security level is limited. In addition, due to the constraints of existing system architecture, the protection of password data relies heavily on TEE or SE solutions, and device manufacturers or application developers cannot independently implement customized security enhancement strategies, nor can they flexibly define security interaction interfaces that meet specific business needs, resulting in inadequate security scheme adaptability and poor scalability.
[0013] To solve the above problems, the embodiments of the present application provide a password input method. Please refer to Figure 1 The method includes steps 110-130.
[0014] Step 110: The secure application module generates a random keyboard vector graph according to the password input request, and encrypts the random keyboard vector graph to obtain secure keyboard information corresponding to the password input request.
[0015] Among them, the random keyboard vector graph refers to a digital position distribution graph dynamically generated each time the password is input, which can define the coordinates of the digital position in a vector graph format and change the layout of the digital elements through a random arrangement algorithm.
[0016] Step 120: The security application module determines the keyboard security level based on the password input request and identifies the target application module corresponding to the keyboard security level.
[0017] Keyboard security level refers to the security strength level divided according to the password input scenario. Specifically, users can choose the password input security level for the current scenario, or it can be determined by analyzing factors such as transaction amount and device environment through a risk assessment model.
[0018] Step 130: The target application module displays the keyboard interface for the secure keyboard information. The target application module includes a secure application module or a normal application module. The security of the secure application module is higher than that of the normal application module.
[0019] The secure application module refers to the trusted application portion running in a secure virtual environment. This can be implemented using an independent process built upon the secure virtual environment, ensuring the security of key storage and computation through isolated runtime environments. The ordinary application module refers to the ordinary application portion running in a normal execution environment, which can also be implemented using an independent process built upon that environment. For example, an application requiring a PIN pad can be divided into two parts: the application portion running in the normal execution environment primarily implements non-security-related interfaces and business logic, while the application portion running in the secure virtual environment primarily implements the PIN pad-related interface and security protection processes.
[0020] In one optional implementation, if the keyboard security level is greater than or equal to the standard security level, the security application module displays the secure keyboard information via the keyboard interface. If the keyboard security level is less than the standard security level, the ordinary application module displays the secure keyboard information via the keyboard interface. For example, the keyboard security levels from highest to lowest are SecLev1, SecLev2, and SecLev3, where SecLev2 is the standard security level. When the keyboard security level is SecLev1 or SecLev2, the security application module displays the keyboard interface; when the keyboard security level is SecLev3, the ordinary application module displays the keyboard interface.
[0021] As described above, the security application module generates a random keyboard vector image based on the password input request. By generating a different keyboard layout for each request, it fundamentally avoids the risk of fixed keyboard layouts being recorded by malicious programs. The security application module encrypts the random keyboard vector image to generate secure keyboard information, ensuring that keyboard data cannot be tampered with or stolen during transmission. The security application module dynamically determines the keyboard security level based on the password input request and matches the corresponding target application module to different security requirements. This satisfies the need for the security application module to directly handle sensitive operations in high-security scenarios while also taking into account the lightweight execution characteristics of ordinary application modules in ordinary scenarios. When the target application module displays secure keyboard information, by distinguishing the security level differences between the security application module and the ordinary application module, high-security level operations can be completed in a secure virtual domain with a trusted execution environment, while ordinary operations remain in the regular execution domain, achieving a balance between security and operational efficiency. Through the collaborative cooperation of the security application module and the ordinary application module, a dynamically adjustable password input protection system is constructed without relying on hardware security components such as SE chips, effectively resisting interface hijacking attacks and thus improving the security and autonomy of password input.
[0022] In a specific application scenario, upon receiving a password input request, the security application module draws a customized random keyboard vector image based on the request. Compared to directly drawing a random keyboard vector image in a normal execution environment, the secure virtual environment running within the security application module effectively prevents the random keyboard vector image from being illegally tampered with or the password from being cracked and intercepted. After the random keyboard vector image is drawn, the security application module encrypts and stores the relationship data between the vector graphics containing the numerical arrangement and the coordinate information, preventing the stolen data from being used to crack passwords. After the encrypted relationship data is stored, the system selects either the normal application module or the security application module to display the keyboard interface generated by the vector graphics containing the numerical arrangement, based on the selected keyboard security level. In this way, by dynamically adjusting the type of the target application module, strict protection can be enabled in high-security scenarios, while ensuring interface rendering in normal scenarios.
[0023] In some embodiments of this application, the method further includes steps 210-220.
[0024] Step 210: When the target application module receives a user input event from the keyboard interface, it decrypts and verifies the secure keyboard information through the security application module.
[0025] User input events refer to the coordinate positions and operation timing data triggered by the user on the touch screen interface. Specifically, the coordinate sequence can be captured by the underlying event listening mechanism of the operating system and then passed to the application layer for processing through the event queue.
[0026] Step 220: If the security keyboard information verification is successful, the security application module obtains the real password entered by the user based on the user input event and the security keyboard information.
[0027] As described above, when the target application module captures a user input event, it calls the security application module to decrypt and verify the encrypted secure keyboard information. This centralizes decryption authority within the security application module, avoiding the risk of key leakage that might occur if the ordinary application module runs in an insecure environment. After successful decryption verification, the security application module parses the real password based on the user input event and the secure keyboard information. During this process, because the relevant information on the keyboard interface is encrypted, attackers cannot obtain the real password through interface hijacking. Through this dual verification mechanism, the consistency between the password input interface display and the secure keyboard information is ensured, and the immutability of the user input behavior and the encrypted data is also achieved.
[0028] In a specific application scenario, when a user taps the screen to enter a password, the target application module encapsulates the captured tap coordinates and operation sequence into a user input event. This event is then passed to the security application module, triggering a decryption and verification process for the secure keyboard information. The security application module decrypts the encrypted keyboard layout data using a preset key, restoring the coordinate mapping relationship of the random keyboard vector image. During verification, the integrity of the secure keyboard information and the legitimacy of the request identifier are double-checked to ensure it has not been tampered with. After successful verification, the security application module matches the user's tap coordinates with the decrypted keyboard layout, parses out the actual input numeric elements, and generates the true password sequence according to the tap order. This application forcibly restricts decryption and verification permissions to the security application module, blocking malicious programs from stealing key data through a physical isolation mechanism between the secure and ordinary environments. Simultaneously, the dynamic generation mechanism of the random keyboard vector image and the encrypted storage of the coordinate mapping relationship ensure that even if an attacker hijacks the interface display content, they cannot reverse-engineer the actual key positions.
[0029] In some embodiments of this application, after step 220, the method further includes steps 310-320.
[0030] Step 310: The security application module symmetrically encrypts the real password using the preset protection key to obtain the real password ciphertext, and then sends the real password ciphertext to the ordinary application module.
[0031] The protection key refers to a dynamically generated symmetric encryption key, which can employ symmetric key algorithms such as DES, AES, and SM4. Furthermore, the security application module can embed a specified protection key through a security subprocess, or the security operating system can generate a specified protection key according to the aforementioned key algorithm. If the device supports a secure element, the protection key can be generated by the secure element, resulting in a higher level of security.
[0032] Step 320: The ordinary application module verifies the real password ciphertext using the protection key and sends the verified real password to the user password verification party.
[0033] As can be seen from the above implementation method, the security application module uses symmetric encryption to process the real password, which ensures both encryption efficiency and the high strength of symmetric algorithms to ensure ciphertext security. The ordinary application module verifies the real password through a protection key, preventing the password from being intercepted and leaked during transmission and cutting off the path for malicious programs to steal passwords in ordinary environments. The entire solution, through multi-layered cooperation of encryption isolation and transmission division of labor, builds a software-defined security protection system on devices lacking hardware security components, effectively making up for the deficiencies of insufficient encryption levels and exposure of intermediate links in traditional password transmission.
[0034] In a specific application scenario, after the security application module obtains the user's real password, it first requests the security operating system to generate a specified protection key according to the aforementioned key algorithm. Then, it uses the protection key to symmetrically encrypt the user's plaintext password. The encrypted password is then transmitted to the regular application module via inter-process communication. After decrypting and verifying the password, the regular application module sends the password to the password verification party via an HTTPS connection.
[0035] In some embodiments of this application, if the keyboard security level is the highest level, steps 410-420 are included before step 110.
[0036] Step 410: The ordinary application module uses the target private key of the application backend service to sign the received password input request to obtain signature data, and then sends the signature data to the security application module.
[0037] The target private key refers to the asymmetric encryption private key used to digitally sign password input requests, and this private key is pre-installed in the application's backend service.
[0038] Step 420: The security application module verifies the legitimacy of the password input request using the certificate chain and signature data of the preset target private key. If the password input request is verified, a random keyboard vector image is generated based on the password input request.
[0039] In this context, the certificate chain refers to a verification sequence containing the public key certificate corresponding to the target private key and its superior issuing certificates. The security application module first verifies the legitimacy of the signature data through the certificate chain, and then uses the signing working certificate in the signature data to complete the signature verification. If the signature verification passes, the password input request is deemed to have been successfully verified.
[0040] As described above, when the keyboard security level is detected to be at its highest level, the ordinary application module needs to digitally sign the password input request using the target private key of the application backend service, generating signature data with immutable characteristics. This signing process binds the request content to the device identity, ensuring the trustworthiness of the request source. Before generating the random keyboard vector image, the secure application module performs chain-like verification of the signature data through a pre-set certificate chain. Only when the certificate chain verification passes and the signature data matches will the system allow the generation of the random keyboard vector image. This request verification mechanism based on digital certificates effectively prevents man-in-the-middle attacks and illegal request injection, establishing a trusted request initiation environment for the highest security level password input operation.
[0041] In a specific application scenario, when the keyboard security level is detected to be at its highest level, the ordinary application module, after initiating a password input request, immediately calls the target private key from the application's backend service to hash the request content and uses the private key to encrypt the hash value to generate a digital signature. The signature data and the original request are synchronously transmitted to the secure application module. Upon receiving the data, the secure application module first extracts the root certificate public key from the certificate chain and verifies the validity of lower-level certificates level by level until the legitimacy of the target public key certificate is confirmed. Then, it uses the target public key to decrypt the signature data, obtaining the hash value of the original request, and compares it with the recalculated hash value of the actually received request content. If the two match and the certificate chain verification passes, the request is deemed legitimate, triggering the generation process of the random keyboard vector image.
[0042] In some embodiments of this application, the method by which the security application module encrypts the random keyboard vector image to obtain secure keyboard information corresponding to the password input request in step 110 includes steps 510-540.
[0043] Step 510: The security application module detects whether the device is equipped with a security element. If yes, proceed to step 520; otherwise, proceed to step 530.
[0044] Among them, the security element refers to a hardware security module with physical isolation characteristics, which can be implemented using an SE chip or a trusted platform module, and is used to generate highly secure random keys.
[0045] Step 520: The security application module requests the security element to generate a random key. Step 530: The security application module requests the security operating system to generate a random key. The security operating system runs in the security virtual environment where the security application module resides.
[0046] Among them, a secure operating system refers to a trusted execution system running in a secure virtual environment. Specifically, it can be implemented in an isolated environment based on virtualization framework technology, providing alternative key generation capabilities when there are no hardware security elements.
[0047] Step 540: The security application module encrypts the coordinate data corresponding to each number element in the random keyboard vector image using a random key to obtain the secure keyboard information, and binds the request identifier of the password input request with the secure keyboard information and the key identifier of the random key.
[0048] The coordinate data refers to the position information of each number element in the random keyboard vector image on the screen, specifically represented by pixel values in a two-dimensional coordinate system. Encryption is used to prevent malicious interception of the interface layout. The request identifier is a unique marker identifying the password input request, which can be generated using a unique identifier or a timestamp combined with a hash algorithm, used to associate the key with the corresponding input event. The key identifier is metadata used to index the random key, specifically implemented using hash values or encrypted tags. The mapping relationship between the key identifier and the random key enables indirect access to the key.
[0049] As described above, when a secure element is detected in the device, a random key is generated using this hardware-level security module, fully leveraging the tamper-proof characteristics of physical isolation. In scenarios without a secure element, a random key is generated through a secure operating system running in a secure virtual environment, utilizing virtualization technology to construct a trusted execution environment. By encrypting the coordinate data corresponding to the numerical elements in the random keyboard vector diagram with a key, the keyboard layout information is made resistant to interception during transmission. Binding the password input request identifier with the secure keyboard information and key identifier establishes a dynamic mapping relationship among the three, preventing key confusion or replay attacks between different requests. By constructing a layered key generation system, it not only accommodates the hardware advantages of high-security devices but also provides an alternative software-level security solution for ordinary devices, achieving device-adaptive security protection capabilities.
[0050] In a specific application scenario, when the device has a secure element, the security application module calls the secure element to generate a random key. If the device does not have a secure element, the security application module requests the secure operating system to generate a random key. The coordinate data of the random keyboard vector image is encrypted to form secure keyboard information, making it impossible for attackers to reconstruct the keyboard layout by intercepting data. The binding mechanism between the request identifier and the key identifier ensures that each password input request uses a corresponding key independently, avoiding the risk of key reuse across requests. For example, in a mobile payment scenario, after a user triggers password input, the system automatically detects whether the device supports an SE chip. If not, it switches to a secure virtual environment to generate a key, and finally associates and stores the encrypted keyboard coordinate data with the unique request identifier.
[0051] In some embodiments of this application, the method by which the target application module decrypts and verifies the security keyboard information through the security application module in step 210 includes steps 610-630.
[0052] Step 610: The target application module determines the user request identifier based on the user input event and sends the user request identifier to the security application module.
[0053] The user request identifier refers to the request identifier of the user performing the current password input operation.
[0054] Step 620: The security application module obtains the key identifier and security keyboard information based on the user request identifier.
[0055] Step 630: The security application module decrypts and verifies the secure keyboard information using a random key corresponding to the key identifier.
[0056] As described above, the target application module determines the user request identifier based on user input events, establishing a correspondence between user operations and key identifiers, thus preventing the key from being directly exposed in the ordinary execution environment. The user request identifier is then sent to the security application module, which obtains the key identifier and secure keyboard information based on the user request identifier. Through the correspondence between the key identifier and a random key, it ensures that the key used for decryption strictly matches the encryption key. Decryption verification is performed using the random key corresponding to the key identifier, maintaining the dynamism of the key while avoiding the security risks associated with storing the key in the ordinary execution environment. The entire process separates input event capture from decryption operations through an identifier association mechanism, maintaining key confidentiality even when the keyboard interface is displayed in the ordinary application module.
[0057] In a specific application scenario, when a user touches the keyboard interface, the target application module captures the click coordinates and extracts a pre-bound request identifier. This request identifier is then transmitted to the security application module via inter-process communication, triggering a key retrieval mechanism that indexes the corresponding key identifier and encrypted data. The security application module then calls the key management service, matching the key identifier with a pre-stored random key to complete the decryption operation. For example, the mapping table between key identifiers and random keys is stored in a secure environment. The security application module can only query the key validity through an interface and cannot obtain the plaintext key, achieving physical isolation between key use and storage.
[0058] In some embodiments of this application, the method further includes step 710 before step 110.
[0059] Step 710: When the ordinary application module receives a user's password input request, it creates a secure virtual environment through the ordinary operating system and establishes a communication channel with the secure application module in the secure virtual environment. The ordinary operating system runs in the ordinary execution environment where the ordinary application module resides.
[0060] In this context, a standard operating system refers to the basic software platform running in a standard execution environment, specifically implemented using Android or OpenHarmony systems, responsible for managing process scheduling and resource allocation for standard application modules. A secure virtual environment refers to an isolated runtime space built within the standard execution environment using virtualization technology, specifically implemented using Android's AVF (Android Virtualization Framework), used to host the execution of secure application modules. A communication channel refers to the data transmission link across environments, specifically implemented using inter-process communication mechanisms or secure socket protocols to ensure secure instruction exchange and data transmission between standard and secure application modules.
[0061] As described above, when a regular application module receives a password input request, it proactively creates a secure virtual environment through its operating system. This overcomes the limitation of traditional devices relying on pre-installed hardware security modules, enabling regular devices without security components to establish a trusted execution environment. A communication channel is created to achieve secure interaction between the two domains, and a controlled communication link ensures the security of data transmission between the secure application module and the regular application module. By confining the regular operating system to run within a regular execution environment, strict isolation between the security domain and the regular domain is achieved at the system architecture level, preventing potential attacks in the regular environment from penetrating the secure virtual environment. Through the synergistic effect of the regular application module, the secure application module, the regular operating system, and the secure operating system, consumer devices can build an end-to-end security protection system without relying on dedicated security hardware.
[0062] In a specific application scenario, when a regular application module receives a password input request triggered by a user, it immediately invokes the virtualization framework of its operating system to create a secure virtual environment. This environment is physically isolated from the regular execution environment through a memory isolation mechanism. Subsequently, a running instance of the secure application module is loaded into the secure virtual environment, and a communication channel is established.
[0063] In some embodiments of this application, in step 220, the method by which the security application module obtains the real password entered by the user based on user input events and security keyboard information includes step 810.
[0064] Step 810: The security application module determines the target numeric element corresponding to the click coordinates of the user input event through the security keyboard information, and obtains the real password entered by the user by arranging the target numeric elements according to the click order of the user input event.
[0065] The target digital element refers to the actual input character after coordinate mapping. Specifically, it can be achieved by using a coordinate matching algorithm to locate the corresponding character in the decrypted vector image. This process is completed in an isolated environment to prevent malicious programs from stealing data.
[0066] As can be seen from the above implementation method, firstly, the secure keyboard information includes encrypted random keyboard vector coordinate data, preventing attackers from obtaining the actual key layout through interface hijacking. The secure application module reconstructs the target numeric elements based on the correspondence between click coordinates and encrypted coordinate data, ensuring that even if a malicious program intercepts the screen click position, it cannot reverse-engineer the actual input value. Secondly, by strictly relying on the click order of user input events for password arrangement, the risk of password leakage caused by the recording of input trajectories, as in traditional password input methods, is avoided. The secure application module performs coordinate mapping and sequence restoration operations in a secure virtual environment, using a secure operating system to isolate potential attacks in ordinary execution environments, achieving complete decoupling of password input events and physical keys, forming a password protection system based on dynamic coordinate mapping.
[0067] In a specific application scenario, when the target application module detects a user click event, the system transmits the click coordinate sequence to a secure virtual environment. The secure application module then calls a decryption component to decrypt the encrypted coordinate data and uses a coordinate matching algorithm to locate the clicked number element in a random keyboard vector map. For example, when the user clicks the screen coordinates (120, 240) and (360, 480) in sequence, the secure application module matches the numbers "5" and "9" in the decrypted vector map, generating the password string "59" according to the click order. The entire process is completed in an isolated environment built by a secure operating system; the ordinary execution environment can only obtain the encrypted coordinate data but cannot know the actual key layout.
[0068] In some embodiments of this application, the method for establishing a communication channel between the ordinary application module and the security application module in step 710 includes steps 910-920.
[0069] Step 910: Establish cross-process communication services between the ordinary operating system and the secure operating system.
[0070] Inter-process communication service refers to the inter-process data interaction mechanism provided by the operating system kernel of different execution environments. Specifically, it can adopt the Binder mechanism of Android system, soft bus communication of OpenHarmony, LiteIPC communication or Linux standard IPC. This service prevents unauthorized processes from intercepting communication data by isolating the process space of the normal execution environment and the secure virtual environment.
[0071] Step 920: The ordinary application module creates a communication channel with the security application module through the inter-process communication service.
[0072] The communication channel refers to the logical data transmission link established based on cross-process communication services.
[0073] As described above, the implementation firstly establishes a cross-process communication service directly between the ordinary operating system and the secure operating system, creating a controlled communication pipeline at the system's underlying layer. This ensures that data interaction between different execution environments is not exposed to untrusted interfaces. This communication mechanism, built upon operating system kernel-level services, effectively resists man-in-the-middle attacks and unauthorized process eavesdropping. Secondly, ordinary application modules establish channels with secure application modules through this cross-process communication service, requiring application calls from the ordinary execution environment to undergo operating system-level security verification. This prevents vulnerabilities that might be introduced by direct access to the secure module from the application layer. This dual-operating system collaborative communication architecture maintains the closed nature of the secure virtual environment while achieving necessary data interaction functions. Given the current lack of hardware security chips in consumer devices, it achieves a security level approaching hardware isolation through software architectural innovation.
[0074] In a specific application scenario, after the ordinary operating system boots up in the ordinary execution environment, it sends an inter-process communication initialization request to the secure operating system. The secure operating system initializes the Binder service in the secure virtual environment and forwards service readiness notifications to ordinary application modules through the ordinary operating system. The ordinary application modules initialize their corresponding Binder services, enabling the ordinary application modules and secure application modules to establish a communication channel through Binder.
[0075] In some embodiments of this application, within the Android system, the security application module includes a secure password keyboard interface, a touch coordinate module, an encryption / decryption module, and a key management module, while the ordinary application module includes a regular password keyboard interface and a password keyboard request module. The complete execution flow of the above method when displaying the secure keyboard interface using the AVF framework specifically includes steps 10-90.
[0076] like Figure 2 As shown in step 10, when the application needs to use the password keyboard, the ordinary application module running in the ordinary execution environment (REE) of the application initiates a password input request, and the ordinary application module sends a request to the ordinary execution system to create a secure virtual environment.
[0077] Step 20: The normal execution system creates a secure virtual environment, namely the Protect VM (hereinafter referred to as PVM), loads the PVM's native shared libraries, and initializes the Binder service. After the PVM's Binder service or communication service is loaded, it notifies the normal application module through the normal execution system.
[0078] It's important to note that in the Android system, the native shared library for PVM is a shared object (.so) library used to implement secure communication between the application's main process and the virtual application's secure process. Here, the Android system uses the Binder mechanism for communication, but it's not limited to Android's Binder mechanism; similar communication mechanisms provided by other systems can also be used, such as OpenHarmony's soft bus communication, LiteIPC communication, or Linux standard IPC.
[0079] Step 30: A communication channel is created between the REE's ordinary application module and the PVM's security application module through the Binder mechanism.
[0080] like Figure 3 As shown, in step 40, the ordinary application module determines the keyboard security level in the password input request. If the keyboard security level is SecLev1, then steps 50-60 are executed; if the keyboard security level is SecLev2 or SecLev3, then the password input request is directly sent to the security application module, and step 70 is executed.
[0081] Step 50: The normal application module signs the password input request using a pre-set backend private key and sends the signature data and password input request to the security application module.
[0082] Step 60: When the security application module receives the signature data and password input request, it first verifies the legality of the signature data through the upper-level CA certificate of the pre-set backend private key certificate. If the signature data is legal, it then verifies the password input request through the signature working certificate of the signature data. If the password input request passes the verification, then proceed to step 70.
[0083] like Figure 4 As shown, in step 70, the security application module draws a customized random keyboard vector image, and after the random keyboard vector image is drawn, it requests the PVM's security operating system to generate a random key.
[0084] If the device supports SE, it requests SE to generate a random key.
[0085] Step 80: The security application module encrypts and stores the mapping relationship between the numerical elements and coordinate data in the random keyboard vector image using a random key, and binds the encrypted mapping relationship and the key identifier of the random key to the request identifier of the password input request.
[0086] Step 90: The security application module determines the keyboard security level in the password input request. If the keyboard security level is SecLev1 or SecLev2, the security application module renders and displays a keyboard interface with a random keyboard vector image. If the keyboard security level is SecLev2 or SecLev3, the normal application module renders and displays a keyboard interface with a random keyboard vector image.
[0087] In some embodiments of this application, the complete execution flow of performing password input operations using the keyboard interface displayed in the security application module in the above embodiments specifically includes step 1100.
[0088] like Figure 4 As shown, in step 1100, the security application module listens to user input events, listens to and collects the click coordinates and click sequence of the user's click operation on the keyboard interface, and triggers the security keyboard information verification process after the user clicks the "Complete Input" button.
[0089] In some embodiments of this application, the complete execution flow of performing password input operation using the keyboard interface displayed in the ordinary application module in the above embodiments specifically includes step 1200.
[0090] like Figure 4 As shown in step 1200, the ordinary application module listens to user input events, listens to and collects the click coordinates and click sequence of the user's click operation on the keyboard interface, and sends the click operation to the security application module after the user clicks the "Complete Input" button to trigger the security keyboard information verification process.
[0091] In some embodiments of this application, such as Figure 5As shown, the complete execution process of obtaining the user's real password using the secure keyboard information verification process of the above embodiment specifically includes steps 1300-1300.
[0092] Step 1300: The security application module obtains the request identifier corresponding to the click coordinates, the encrypted mapping relationship from step 80, and the key identifier.
[0093] Step 1400: The security application module decrypts the mapping relationship using the random key obtained through the key identifier, and verifies the mapping relationship based on the request identifier. If the verification is successful, the module calculates the real password corresponding to the user's click coordinates.
[0094] Step 1500: The security application module encrypts the user's real password using a protection key and sends the encrypted password to the ordinary application module.
[0095] Step 1600: After the general application module decrypts and verifies the encrypted user password, it sends the user password to the user password verifier.
[0096] In summary, the domain isolation design between the secure application module and the ordinary application module in this application achieves secure hosting of the core logic of password processing through the physical isolation between the secure virtual environment and the ordinary execution environment, forming a collaborative protection system between the secure environment and the insecure environment, effectively improving the security and autonomy of password input.
[0097] To address the aforementioned problems, another embodiment of this application provides a password input system. Please refer to... Figure 6 The system includes a secure virtual environment and a normal execution environment. The secure virtual environment includes a secure application module, and the normal execution environment includes a normal application module. The secure application module is configured to execute the steps implemented by the secure application module in the aforementioned password input method. The normal application module is configured to execute the steps implemented by the normal application module in the aforementioned password input method.
[0098] The details of one of the password input methods have already been disclosed in the above sections and will not be repeated here.
[0099] In some embodiments of this application, the system further includes an application background service. The secure virtual environment also includes a secure operating system, and the normal execution environment also includes a normal operating system. The secure application module includes a secure password keyboard interface, a touch coordinate module, an encryption / decryption module, and a key management module, while the normal application module includes a normal password keyboard interface and a password keyboard request module.
[0100] In some embodiments of this application, the system also includes a security element.
[0101] In a specific application scenario, such as Figure 7As shown, the secure virtual environment is a secure virtual machine created based on the AVF framework, i.e., PVM. The normal execution environment is an untrusted execution environment, i.e., REE. The normal operating system is a general-purpose operating system running in the REE environment. The secure operating system refers to a mini version of the general-purpose operating system (i.e., MicroDroidOS) running in the PVM environment.
[0102] The above are merely embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention's specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A password input method, characterized in that, include: The security application module generates a random keyboard vector image based on the password input request, and encrypts the random keyboard vector image to obtain the security keyboard information corresponding to the password input request; The security application module determines the keyboard security level based on the password input request, and determines the target application module corresponding to the keyboard security level; The target application module displays the keyboard interface of the secure keyboard information; The target application module includes either the security application module or the ordinary application module, wherein the security of the security application module is higher than that of the ordinary application module.
2. The password input method according to claim 1, characterized in that, Also includes: When the target application module receives a user input event from the keyboard interface, it decrypts and verifies the secure keyboard information through the security application module. If the security keyboard information is verified, the security application module obtains the user's real password based on the user input event and the security keyboard information.
3. The password input method according to claim 2, characterized in that, After obtaining the user's actual password based on the user input event and the secure keyboard information, the security application module further includes: The security application module symmetrically encrypts the real password using a preset protection key to obtain the real password ciphertext, and then sends the real password ciphertext to the ordinary application module. The general application module verifies the real password ciphertext using the protection key, and sends the verified real password to the user password verification party.
4. The password input method according to claim 1, characterized in that, If the keyboard security level is the highest level, then before the security application module generates a random keyboard vector image based on the password input request, the ordinary application module performs signature processing on the received password input request using the target private key of the application background service to obtain signature data, and sends the signature data to the security application module. The security application module verifies the legitimacy of the password input request by using the certificate chain of the preset target private key and the signature data. If the password input request is verified, a random keyboard vector image is generated based on the password input request.
5. The password input method according to claim 1, characterized in that, The security application module encrypts the random keyboard vector image to obtain secure keyboard information corresponding to the password input request, including: The security application module detects whether the device is equipped with a security element; If so, the security application module requests the security element to generate a random key; Otherwise, the security application module requests the security operating system to generate a random key, and the security operating system runs in the secure virtual environment where the security application module resides; The security application module encrypts the coordinate data corresponding to each number element in the random keyboard vector image using the random key to obtain secure keyboard information, and binds the request identifier of the password input request with the secure keyboard information and the key identifier of the random key.
6. A password input method according to claim 2, characterized in that, The target application module decrypts and verifies the secure keyboard information through the security application module, including: The target application module determines the user request identifier based on the user input event and sends the user request identifier to the security application module; The security application module obtains the key identifier and security keyboard information based on the user request identifier; The security application module decrypts and verifies the secure keyboard information using a random key corresponding to the key identifier.
7. A password input method according to claim 5, characterized in that, Before the security application module generates a random password vector image based on the password input request, the ordinary application module creates the security virtual environment through the ordinary operating system when it receives the user's password input request, and establishes a communication channel with the security application module of the security virtual environment. The ordinary operating system runs in the ordinary execution environment where the ordinary application module is located.
8. A password input method according to claim 2, characterized in that, The security application module obtains the user's real password based on the user input event and the security keyboard information, including: The security application module determines the target numeric element corresponding to the click coordinates of the user input event through the security keyboard information, and obtains the real password entered by the user by arranging the target numeric elements according to the click order of the user input event.
9. A password input method according to claim 7, characterized in that, The establishment of a communication channel between the general application module and the security application module includes: A cross-process communication service is established between the ordinary operating system and the secure operating system; The general application module establishes a communication channel with the security application module through the cross-process communication service.
10. A password input system, characterized in that, It includes a secure virtual environment and a normal execution environment, wherein the secure virtual environment includes a secure application module and the normal execution environment includes a normal application module; The security application module is configured to perform the steps implemented by the security application module in a password input method according to any one of claims 1-9; The general application module is configured to perform the steps implemented by the general application module in a password input method according to any one of claims 1-9.