A method for securely starting an application based on hardware cryptographic equipment

By adopting the application secure startup method based on hardware password devices on the smart terminal, the security risks existing in the startup process of existing applications are solved, the secure startup and identity identification of application data are realized, and the security level of user application data is improved.

CN114840883BActive Publication Date: 2025-04-15ZHONGYITONG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210552193.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2025-04-15
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

There are security risks during the startup process of existing smart terminal applications, which are prone to malicious attacks, resulting in user privacy data leakage. The existing application authentication methods are easy to be cracked, the framework is complex and difficult to deploy.

Method used

The application secure startup method based on hardware password devices is adopted, and local signature data is sent to the hardware password device through the smart terminal for verification, ensuring that the application is identity identification and securely launched at startup, leaving the server, and completing verification through light frameworks.

Benefits of technology

It effectively solves the problem of insecure application startup, ensures application data security, improves user application data security level, and prevents illegal startup and data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114840883B_ABST
    Figure CN114840883B_ABST
Patent Text Reader

Abstract

The present invention provides a method for securely starting an application based on a hardware cryptographic device, comprising the following steps: when the application of the smart terminal is started, the first initialized local signature data is sent to the hardware cryptographic device; the hardware cryptographic device checks whether the local signature data is consistent with the internally stored verification data; if yes, the business verification data and the message signature are calculated; if not, the smart terminal checks whether the initialization random verification data signature file exists, if not, the following is executed: the hardware verification fails and the application cannot be opened; if yes, the following is executed: the smart terminal starts the application and assembles the obtained message signature and business verification data. The beneficial effects of the present invention are: when the APP application is used, there is business identity authentication, and when it is started, environmental detection and integrity detection are performed to prevent root influence, improve the security level of application data, and solve the problem of unsafe application startup.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security technology, and in particular to a method for securely starting an application based on a hardware cryptographic device. Background Art

[0002] With the continuous development of science and technology and smart terminal technology, various applications have emerged. People have installed more and more applications on smart terminals, which have provided convenience for people's lives and work and enriched people's work and life. As people use them more and more, the applications contain a large amount of user privacy data. However, malicious attacks on applications in smart terminals have occurred repeatedly, and user privacy data leakage often occurs. At present, in order to prevent applications from being maliciously attacked, the Android system will perform application verification during the startup process to ensure the safe startup of the application. Users can also set application startup passwords or patterns to prevent criminals from starting applications and stealing important data in applications.

[0003] Currently, most of the application authentication of mobile terminals on the market is through application locks, which are very easy to crack. Criminals can easily enter the smart terminal application and obtain important user information, causing user information leakage. In addition, most applications require server participation to start, have a heavy framework, and have requirements for certificates, which are inconvenient and difficult to deploy. Summary of the invention

[0004] In view of the defects of the prior art, the present invention designs an application security startup method with identity recognition based on hardware password devices, which has the characteristics of being unable to be verified and skipped through reverse engineering and root, being able to be separated from the server, and completing application identity recognition and secure startup with a light framework. Through the hardware password device, application security startup detection is performed, and user identity recognition is added, and the characteristics of adapting to the mainstream Android operating system can protect the data security of regular smart terminal applications on the market. It is achieved through the following technical solutions.

[0005] A method for securely starting an application based on a hardware cryptographic device comprises the following steps:

[0006] When the application of the smart terminal is started, the first initialized local signature data is sent to the hardware cryptographic device;

[0007] The hardware cryptographic device checks whether the local signature data is consistent with the internally stored verification data;

[0008] If yes, then calculate the service verification data and message signature;

[0009] If not, the smart terminal checks whether the initialization random verification data signature file exists. If not, the following is executed: hardware signature verification fails and the application cannot be opened;

[0010] If it exists, execute: the intelligent terminal starts the application and assembles the obtained message signature and business verification data.

[0011] The beneficial effects of the present invention are:

[0012] Solve the problem of unsafe application startup and ensure the security of application data. When using the APP, there is business identity verification, and when it is started, it will perform environmental detection, integrity detection, and prevent root influence, thereby improving the security level of user application data. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is an overall structural block diagram of an embodiment of the present invention.

[0014] Figure 2 It is an application usage sequence diagram of an embodiment of the present invention.

[0015] Figure 3 This is an application startup flow chart of an embodiment of the present invention.

[0016] Figure 4 This is a flow chart of the trusted root authentication startup process of an embodiment of the present invention.

[0017] Figure 5 This is a flow chart of APK packaging signature according to an embodiment of the present invention. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] like Figure 1It is the overall structural diagram of the present invention. The method of the present invention is based on a mobile terminal, and the terminal composition includes a terminal hardware environment and an Android system. The hardware environment includes a main control module, a hardware password module, a power module, a display module, a storage module, a sensor module, a multimedia module and a communication module. The main control module has control and computing capabilities, issues instructions to each module, and performs computing and logical processing on the data of each module. The hardware password device is a chip or an external hardware password device with cryptographic algorithm computing, random number generation, and secure storage capabilities. The power module is a module that supplies power to the terminal. The display module is a module that displays the system and application interface and provides interactive operations. The storage module is used for storing temporary or long-term data for the system and application. The sensor module is a sensor device integrated in the terminal, such as a gyroscope, a pedometer, a light sensor and a distance sensor, etc. The multimedia module includes a media function realization module such as audio and video playback and video recording. The communication module is a module for the terminal to realize network functions, including baseband communication, WiFi, Bluetooth, etc. The hardware module provides a basic hardware environment for the operation of the system and application.

[0020] The Android system runs on the basis of the hardware environment, schedules various modules and resources of the terminal, and is also the basis for the operation of applications. Applications depend on the system. Under normal circumstances, the application can be started normally and the corresponding functions can be implemented as long as the hardware and software environment support it. The Android system supports the installation and startup of external applications, so security cannot be guaranteed. In order to achieve the secure startup of applications, new application scenarios are optimized, and the application startup is combined with the hardware password module. Through a new identity recognition mechanism, the secure startup of applications is achieved to prevent illegal startup. The technical solution can support the secure startup of multiple applications (such as application (APK) 1, application (APK) 2, and application (APK) 3).

[0021] Based on the architecture of the mobile terminal, a method for securely starting an application based on a hardware cryptographic device is provided, comprising the following steps:

[0022] When the application of the smart terminal is started, the first initialized local signature data is sent to the hardware password device;

[0023] The hardware cryptographic device checks whether the local signature data is consistent with the internally stored verification data;

[0024] If yes, then calculate the service verification data and message signature;

[0025] If not, the smart terminal checks whether the initialization random verification data signature file exists. If not, the following is executed: hardware signature verification fails and the application cannot be opened;

[0026] If it exists, execute: the intelligent terminal starts the application and assembles the obtained message signature and business verification data.

[0027] like Figure 2 As shown, it is an application startup initialization timing diagram of the present invention. Before executing the above method, when the application of the mobile terminal is used for the first time, it interacts with the hardware cryptographic device for the first time, verifies the birth certificate first, and after the verification is passed, the hardware cryptographic device then generates an asymmetric key, the application generates a random verification data original text, sends it to the hardware cryptographic device, the hardware cryptographic device generates a verification data signature value, and stores it in the application private space. The hardware module saves this set of random verification data original text for secure startup verification.

[0028] Whenever an application is installed for the first time, a set of random verification data will be generated. The uninitialized hardware cryptographic device randomly generates a set of asymmetric keys, signs the random verification data, and the signature data is stored in the corresponding location by the application, and a signature file (integrity check) is generated for the key file.

[0029] like Figure 3 The application startup flow chart of the present invention is shown. When the application is used for the first time, it interacts with the hardware for the first time, verifies the birth certificate first, and after the verification is passed, the hardware module then generates an asymmetric key, the application generates a random verification data original text, sends it to the hardware module, the hardware module generates a verification data signature value, and stores it in the application private space. The hardware module saves this set of random verification data original text for secure startup verification.

[0030] Then, to package the APK, you need to install the Android specification first. Since Android applications are basically developed based on Android Studio, all tool specifications are based on Android Studio. Android Studio is the official integrated development environment (IDE) for developing Android applications, built on the basis of IntelliJ IDEA. In addition to IntelliJ's powerful code editor and developer tools, Android Studio also provides more features that can improve the efficiency of building Android applications.

[0031] It packages the signature by itself. When starting the application and application-related business operations, the message needs to contain business verification data. This business verification data and message signature need to be calculated by the hardware module. Before calculation, the application needs to initialize the signature verification data stored locally for the first time and send it to the corresponding hardware module. The hardware module verifies it according to the random verification data stored internally. After the verification is passed, the message signature and verification data are calculated.

[0032] When the application is started, you must first check whether the initialization random verification data signature file exists. If it does not exist, or the corresponding hardware signature verification fails, the application cannot be opened. If the key file signature file verification (integrity check) fails, the application cannot be started either.

[0033] After the application is started, the obtained message signature and business verification data are assembled before the function can be used, thus preventing the function from being used without being separated from the hardware module in the middle.

[0034] Currently, when starting applications on mobile smart terminals, a production system is required to build a trusted root hardware module and write it into the system. Figure 4 As shown in the figure, this is the trusted root verification startup process for application startup of the current mainstream security chip. The system is very cumbersome and requires multiple steps. The operation process is extremely complicated. It is difficult to form a complete or even partial verification benchmark value. The integrity of the rules cannot be guaranteed in engineering, and false positives and missed positives cannot be controlled, which seriously affects security and user experience.

[0035] One of the beneficial effects of the embodiment of the present invention is that the startup does not require a production system, only a built-in initialization verification birth certificate is required. The birth certificate will be removed during the initialization phase and replaced with a random verification data signature. Once an application is installed, a new hardware is matched, a random asymmetric key is generated, and a set of random verification data plaintext is generated to complete the first initialization process. The matching and binding is simple, the framework is light, easy to deploy, and the security is also very high.

[0036] In the prior art, APK packaging requires that each time an intelligent terminal packages an APK, the relevant files need to be signed. However, if the files have not been modified, the signature of the old files can also be used to verify the signature, which poses a security risk and can cause leakage of application data.

[0037] The second beneficial effect of the embodiment of the present invention is that each time the APK is packaged, the Android specifications are directly used. The Android specifications include packaging and signing specifications. Only applications developed and produced according to these specifications can be successfully installed and run in the terminal system.

[0038] Signature specifications: The Android system requires that every Android application must be digitally signed before it can be installed into the system. Android uses digital signatures to identify the author of the application and to establish a trust relationship between applications. It is not used to decide which applications the end user can install.

[0039] Signature is a common technology that combines asymmetric key encryption technology with digital summary technology. The object of Android application digital signature is Android application information, including application name, application version, application developer, application hash value and signer custom data.

[0040] Packaging specification: If an Android application code wants to run on an Android device, it must first be compiled and then packaged into a file that can be recognized by the Android system before it can be run. The file format that can be recognized and run by the Android system is "APK (Android application package)". An APK file contains compiled code files (.dex files), file resources (resources), native resource files (assets), certificates (certificates) and manifest files (manifest file).

[0041] Since Android applications are all developed based on Android Studio, all tool specifications are based on Android Studio. Android Studio packages and signs itself, and the process is simple.

[0042] like Figure 5 As shown, in the embodiment of the present invention, in order to achieve the above technical effect, the specific process of packaging signature is as follows:

[0043] S1. Create a new signature file. Select the "Build" tab on the Android Studio toolbar and select "Generate Signed Bundle / Apk".

[0044] S2. Select apk, select "APK", and click the "Next" button.

[0045] S3. Select the main project and then select Module, which is the main project that needs to be packaged.

[0046] S4. Select the keystore and select an existing keystore file. If it does not exist, you need to create one. Create a new keystore and key and fill in the corresponding relevant information, including the keystore storage path, password, key name, key password, alias and other information.

[0047] S5. Enter the keystore information, including the keystore password, alias, key password, etc. The password and alias must be consistent with those set in the keystore.

[0048] S6. Select the signed APK output location and APK signature version type.

[0049] Select the location where the APK is to be stored and the APK signature version type, check V1 and V2. Checking only V1 signature when packaging the signature will not affect anything, but the safer verification method will not be used in 7.0 and above; if only V2 signature is checked, the installation below 7.0 will directly show that it is not installed, and 7.0 and above will use V2 verification; if both V1 and V2 are checked at the same time, all models will be fine.

[0050] S7. Select finish to start packaging. Click Finish and wait for the packaging signature to be completed.

[0051] S8. Packaging is completed. After packaging is completed, you can see the packaged and signed apk package in the set storage path.

[0052] In the prior art, when the trusted root or project changes, the APK and hardware modules need to be changed and need to be returned to the factory for re-production. The process is very complicated and troublesome, and it takes a long time and causes great loss. Figure 5 According to the steps shown, when the trusted root is changed or the project is changed, the APK and the hardware module do not need to be changed or returned to the factory, and there is no loss, thus saving production time and cost.

[0053] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for securely starting an application based on a hardware cryptographic device, characterized in that: The steps include: When the application of the smart terminal is started, the first initialized local signature data is sent to the hardware password device; The hardware cryptographic device checks whether the local signature data is consistent with the internally stored verification data; If yes, then calculate the service verification data and message signature; If not, the smart terminal checks whether the initialization random verification data signature file exists. If not, the following is executed: hardware signature verification fails and the application cannot be opened; If it exists, execute: the intelligent terminal starts the application and assembles the obtained message signature and business verification data; When the application of the smart terminal is used for the first time, it interacts with the hardware password device for the first time. The specific steps are: The hardware cryptographic device first verifies the birth certificate of the application, generates an asymmetric key after verification, and returns the information to the application; The application generates a random verification data original text and sends it to the hardware cryptographic device. The hardware cryptographic device generates a verification data signature value based on the random verification data original text and stores it in the private space of the application. The hardware cryptographic device saves the original text of this set of random verification data for secure boot verification; When an application is installed for the first time, a set of random verification data will be generated. The uninitialized hardware cryptographic device will randomly generate a set of asymmetric keys to sign the random verification data. The signature data is stored in the corresponding location by the application, and a signature file is generated for the key file. During the initialization phase of the hardware cryptographic device, the birth certificate will be removed and replaced with a random verification data signature.

2. The secure boot method according to claim 1, characterized in that: The secure boot method further includes: To package APK on smart terminals, you need to install Android specifications first and use Android specifications to package and sign them yourself.

3. The secure boot method according to claim 2, characterized in that: The method of using Android's specification to package and sign yourself includes the following steps: Create a new signature file, select the "Build" tab above in the Android Studio toolbar, and select "GenerateSigned Bundle / Apk" Select "APK" and click the "Next" button; Select the main project to be packaged; Select an existing keystore file. If it does not exist, you need to create one. Create a new keystore and key, and enter the keystore password, alias, and key password information. Select the signed APK output location and APK signature version type, and start packaging.

Citation Information

Patent Citations

  • Data integrity protection method and device

    CN113779652A

  • Program protection method and device based on code signature, equipment and storage medium

    CN114168909A