CN111666564A - Application program safe starting method and device, computer equipment and storage medium - Google Patents

Application program safe starting method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111666564A
CN111666564A CN202010405714.6A CN202010405714A CN111666564A CN 111666564 A CN111666564 A CN 111666564A CN 202010405714 A CN202010405714 A CN 202010405714A CN 111666564 A CN111666564 A CN 111666564A
Authority
CN
China
Prior art keywords
check code
application program
resource file
decompression
decompressed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010405714.6A
Other languages
Chinese (zh)
Other versions
CN111666564B (en
Inventor
何兵
吴春海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202010405714.6A priority Critical patent/CN111666564B/en
Priority to PCT/CN2020/098856 priority patent/WO2021114614A1/en
Publication of CN111666564A publication Critical patent/CN111666564A/en
Application granted granted Critical
Publication of CN111666564B publication Critical patent/CN111666564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The application relates to the technical field of artificial intelligence, in particular to a method and a device for safely starting an application program, computer equipment and a storage medium. The method comprises the following steps: receiving an application program starting request, wherein the application program starting request carries an application program identifier; inquiring whether the application program corresponding to the application program identification is operated for the first time; when the application program does not run for the first time, acquiring a decompressed resource file corresponding to the application program identifier; calculating an actual decompression check code of the decompression resource file; acquiring a downloading decompression check code of the decompressed resource file, wherein the downloading decompression check code is a check code which is downloaded from a server in advance and used for identifying the decompressed resource file; judging whether the actual decompression check code is consistent with the downloaded decompression check code; when the actual decompression check code is consistent with the downloaded decompression check code, the application program is started, and the data security of the application program can be ensured by adopting the method. The private information such as the download decompression check code can be stored in the block chain.

Description

Application program safe starting method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method and an apparatus for secure starting of an application program, a computer device, and a storage medium.
Background
With the development of computer technology, the requirement for downloading files over the network is increasing, so how to ensure the security of downloading files from the network becomes more and more important.
In the conventional technology, an application program file is downloaded from a network according to an acquired download address, but the security of the acquired application program file cannot be guaranteed, for example, when an applet resource is downloaded from the network, the applet resource needs to be decompressed into a host sandbox, but the applet resource cannot be guaranteed not to be tampered in the host sandbox, so that the security of the file is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an application program secure booting method, an apparatus, a computer device, and a storage medium capable of improving application program data security.
A method for safely starting an application program comprises the following steps:
receiving an application program starting request, wherein the application program starting request carries an application program identifier;
inquiring whether the application program corresponding to the application program identification is operated for the first time;
when the application program does not run for the first time, acquiring a decompressed resource file corresponding to the application program identifier;
calculating an actual decompression check code of the decompression resource file;
acquiring a download decompression check code of the decompressed resource file, wherein the download decompression check code is a check code which is downloaded from a server in advance and used for identifying the decompressed resource file;
judging whether the actual decompression check code is consistent with the downloaded decompression check code;
and when the actual decompression check code is consistent with the downloaded decompression check code, starting the application program.
In one embodiment, the decompressing resource file includes a plurality of decompressed subfiles, and the calculating an actual decompressed check code of the decompressed resource file includes:
acquiring subfile identifications and subfile check codes corresponding to the decompressed subfiles;
and combining the subfile identifications and the subfile check codes according to a preset rule to obtain the actual decompression check codes corresponding to the decompression resource files.
In one embodiment, after the querying the application program to identify whether the corresponding application program is executed for the first time, the method further includes:
when the application program runs for the first time, acquiring a compressed resource file corresponding to the application program identifier;
calculating an actual compression check code of the compressed resource file;
acquiring a download compression check code of a compression resource file corresponding to an application program downloaded from a server in advance;
judging whether the actual compression check code is consistent with the download compression check code;
when the actual compression check code is consistent with the downloaded compression check code, the compressed resource file is judged to be a safe compressed file;
and when the compressed resource file is a safe compressed file, decompressing the safe compressed file to obtain a decompressed resource file, and starting an application program according to the decompressed compressed file.
In one embodiment, when the application program is run for the first time, acquiring a compressed resource file corresponding to the application program identifier includes:
when the application program runs for the first time, generating an encrypted symmetric key, and sending the symmetric key to the server, wherein the symmetric key is used for indicating the server to encrypt a download address, a download decompression check code and a download compression check code of the application program to generate an encrypted service file;
receiving an encrypted service file returned by the server; decrypting the encrypted service file through the symmetric key to obtain a service file;
acquiring a download address corresponding to the application program from the business file;
and downloading according to the download address to obtain the compressed resource file.
In one embodiment, the obtaining method of the download decompression check code and the download compression check code includes:
and extracting a download decompression check code and a download compression check code from the service file obtained by decrypting the encrypted service file through the symmetric key, wherein the download decompression check code and the download compression check code are stored in the block chain.
In one embodiment, sending the symmetric key to the server includes:
the symmetric secret key is encrypted through the public key of the asymmetric secret key and then sent to the server, so that the server decrypts through the private key corresponding to the public key of the asymmetric secret key to obtain the symmetric secret key.
In one embodiment, after determining whether the actual compression check code is consistent with the downloaded compression check code, the method further includes:
when the actual compression check code is inconsistent with the downloaded compression check code, the compressed resource file is judged to be an unsafe compressed resource file; generating warning information aiming at unsafe compressed resource files;
after judging whether the actual decompression check code is consistent with the download decompression check code, the method further comprises the following steps:
when the actual decompression check code is inconsistent with the downloaded decompression check code, the decompressed resource file is judged to be an unsafe decompressed resource file; and generating warning information aiming at unsafe decompressed resource files.
An apparatus for secure launching of an application, the apparatus comprising:
the request receiving module is used for receiving an application program starting request, and the application program starting request carries an application program identifier;
the query module is used for querying whether the application program corresponding to the application program identifier is operated for the first time;
the decompressed file acquisition module is used for acquiring a decompressed resource file corresponding to the application program identifier when the application program does not run for the first time;
the actual decompression check code calculation module is used for calculating the actual decompression check code of the decompression resource file;
the download decompression check code acquisition module is used for acquiring a download decompression check code of the decompression resource file, wherein the download decompression check code is a check code which is downloaded from a server in advance and is used for identifying the decompression resource file;
the judging module is used for judging whether the actual decompression check code is consistent with the downloaded decompression check code or not;
and the starting module is used for starting the application program when the actual decompression check code is consistent with the downloaded decompression check code.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the above method when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The application program safe starting method, the device, the computer equipment and the storage medium receive an application program starting request, wherein the application program starting request carries an application program identifier; inquiring whether the application program corresponding to the application program identification is operated for the first time; when the application program does not run for the first time, acquiring a resource file corresponding to the application program identifier; calculating an actual decompression check code of the resource file; acquiring a download decompression check code of a decompressed resource file corresponding to an application program downloaded from a server in advance; and when the actual decompression check code is consistent with the downloaded decompression check code, starting the application program. When the application program is not operated for the first time, safety verification is carried out on the decompressed resource file, and the application program is operated on the premise of ensuring the safety of the resource file, so that the safety of data is ensured.
Drawings
FIG. 1 is a diagram of an application environment for a method for application startup in one embodiment;
FIG. 2 is a flowchart illustrating a method for application launching according to one embodiment;
FIG. 3 is a flowchart illustrating a method for launching an application in accordance with another embodiment;
FIG. 4 is a timing diagram of an application startup method in another embodiment;
FIG. 5 is a block diagram showing the structure of an application startup device according to one embodiment;
fig. 6 is an internal configuration diagram of a terminal device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The application program safe starting method provided by the application program safe starting method can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 receives an application program starting request, wherein the application program starting request carries an application program identifier; inquiring whether the application program corresponding to the application program identification is operated for the first time; when the application program does not run for the first time, acquiring a decompressed resource file corresponding to the application program identifier; calculating an actual decompression check code of the decompression resource file; acquiring a download decompression check code of the decompressed resource file, wherein the download decompression check code is a check code which is downloaded from the server 104 in advance and is used for identifying the decompressed resource file; judging whether the actual decompression check code is consistent with the downloaded decompression check code; and when the actual decompression check code is consistent with the downloaded decompression check code, starting the application program. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In an embodiment, as shown in fig. 2, a method for securely starting an application program is provided, which is described by taking the method as an example for being applied to the terminal in fig. 1, and includes the following steps:
step 210, receiving an application program starting request, where the application program starting request carries an application program identifier.
Specifically, a user can perform a trigger operation on an application program on the terminal to generate an application program starting request, and after receiving the application program starting request sent by the user, the terminal extracts an application program identifier carried in the application program starting request to locate the corresponding application program according to the application program identifier. The application identifier is used to uniquely identify an application, such as a program name or an application number of the application, and is not limited herein. In one embodiment, the application may be an applet, and the like, without limitation.
In another embodiment, the application start request may also be automatically generated in the terminal, for example, the application start request may be adapted to operation services such as periodic verification or periodic security check of the application, and specifically, a preset start time for starting the application may be preset, and when the preset start time is reached, the application start request is automatically triggered, so as to ensure that the periodic security check of the application is completed by periodically executing the start service of the application.
Step 220, inquiring whether the application program corresponding to the application program identifier is operated for the first time.
The first run may refer to the first run of the application in the terminal, or may refer to the absence of history data related to the application in the terminal although the application is not first run in the terminal. Specifically, the terminal may search corresponding history data in the terminal according to the obtained application identifier, determine that the application is not operated for the first time when the history data corresponding to the application identifier is found, and determine that the application is operated for the first time when the history data corresponding to the application identifier is not found by the terminal.
When the application program is the small program, the terminal downloads the small program resource file corresponding to the small program from the server through the network, and then decompresses the downloaded small program resource file into the host sandbox so as to execute the operation of the small program in the host sandbox. Specifically, when the terminal receives a starting request about the applet, whether historical download data about the applet exist is searched in the host sandbox, when the historical download data are searched, the applet is judged not to be operated for the first time, and when the historical download data cannot be searched, the applet is judged to be operated for the first time. In other embodiments, the resource file downloaded from the server may also be stored in a database corresponding to the terminal, for example, the resource file may be a local database or a cloud database, which is not limited herein.
And step 230, when the application program does not run for the first time, acquiring the decompressed resource file corresponding to the application program identifier.
The decompressed resource file may be a data resource corresponding to the running application. Specifically, after the terminal finds the historical download data corresponding to the application program identifier in the database corresponding to the terminal according to the application program identifier, the terminal determines that the application program is not operated for the first time, and then obtains the decompressed resource file corresponding to the application program identifier from the database corresponding to the terminal. When the application program corresponds to the applet, the terminal database may be a host sandbox in the terminal, and the host sandbox stores resource files for running the applet, which may include compressed resource files and decompressed resource files obtained by decompressing the compressed resource files.
Specifically, when the applet does not run in the terminal for the first time, the compressed resource file or the decompressed resource file related to the applet may be stored in the host sandbox of the terminal, so that the compressed resource file corresponding to the application program does not need to be downloaded from the server through the network again, the corresponding compressed resource file may be directly searched from the host sandbox, and then the terminal may decompress the compressed resource file to obtain the decompressed resource file, or the corresponding decompressed resource file may be directly searched from the host sandbox.
It should be noted that, when the terminal determines that the application program is not run for the first time after receiving the application program start request, the corresponding application program may be started first, or the decompressed resource file corresponding to the application program is acquired while the application program is started, the security check is performed on the decompressed resource file, when the check is passed, the application program is continuously started, and when the check fails, it is determined that the decompressed resource file is not the security file, and a security alert prompt may be sent to the terminal, or the terminal is directly prohibited from continuously executing the corresponding application program.
Step 240, calculating the actual decompression check code of the decompressed resource file.
Specifically, the check code may be used to uniquely identify a resource file, for example, the check code may be an MD5 check code, and MD5 is a 32-bit character string, which may be used as a unique characteristic value of the resource file to determine the uniqueness of the resource file, so that the MD5 check code may be used to determine the security of the resource file, for example, to determine whether the resource file is modified. Specifically, after the terminal acquires the decompressed resource file, the actual decompressed check code corresponding to the decompressed resource file may be acquired by using a preset check algorithm, for example, when the check code corresponds to the MD5 check code, the actual decompressed check code corresponding to the decompressed resource file may be locally acquired by using a preset MD5 verification algorithm. In other embodiments, the actual decompression check code of the decompression resource file can be calculated by utilizing the characteristic recognition technology in the field of artificial intelligence.
And step 250, acquiring a download decompression check code of the decompressed resource file, wherein the download decompression check code is a check code which is downloaded from the server in advance and is used for identifying the decompressed resource file.
The server stores the check code of the decompressed resource file in advance, and the check code is marked as a download decompressed check code so as to uniquely identify the decompressed resource file by using the download decompressed check code. Specifically, the terminal obtains a corresponding decompressed resource file in a local host sandbox, then calculates an actual decompressed check code corresponding to the decompressed resource file locally, then obtains a downloaded decompressed check code related to the decompressed resource file from the server, and then can compare the actual decompressed check code with the downloaded decompressed check code to verify whether the decompressed resource file in the server and the locally stored decompressed resource file obtained by the terminal from the host sandbox are the same decompressed resource file.
Specifically, the server performs one-time MD5 on a decompressed resource file to be uploaded to obtain a download compressed MD5 value so as to uniquely identify the resource file to be uploaded, then the server returns a download decompressed MD5 value to the terminal, so that when the terminal downloads the decompressed resource file from the server, the MD5 is performed locally, then the server returns the download decompressed MD5 to be matched with the locally generated actual decompressed MD5, if the character strings are the same, the decompressed resource file acquired by the terminal is correct, and if the character strings are different, the decompressed resource file is modified, and the decompressed resource file acquired by the terminal is unsafe.
Step 260, judging whether the actual decompression check code is consistent with the downloaded decompression check code.
Specifically, the terminal compares the characters in the actual decompression check code with the characters in the downloaded decompression check code one by one, when all the characters are the same, the actual decompression check code is judged to be consistent with the downloaded decompression check code, and when any character of the characters in the actual decompression check code is inconsistent with any character of the characters in the downloaded decompression check code, the actual decompression check code is judged to be inconsistent with the downloaded decompression check code. In specific implementation, the characters in the actual decompression check code and the characters in the downloaded decompression check code can be compared in sequence according to a certain sequence, and when any one character is inconsistent, the inconsistent conclusion can be directly obtained without comparing all the characters and then obtaining the inconsistent conclusion.
And step 270, starting the application program when the actual decompression check code is consistent with the downloaded decompression check code.
Specifically, when the actual decompression check code is consistent with the downloaded decompression check code, it is indicated that the decompressed resource file acquired by the terminal is consistent with the decompressed resource file uploaded by the server, that is, the decompressed resource file acquired by the terminal is the decompressed resource file uploaded by the server in advance, and the step of starting the application program can be executed at this time. On the contrary, when the actual decompression check code is inconsistent with the downloaded decompression check code, it indicates that the decompressed resource file acquired by the terminal is not the same file as the decompressed resource file uploaded in advance by the server, that is, the decompressed resource file is tampered or lost in the data transmission between the server and the terminal, or the decompressed resource file is tampered in the host sandbox, and at this time, a warning message should be sent to prompt the terminal that the application program is at risk or directly prohibit the terminal from starting the corresponding application program.
In this embodiment, security check is performed on the decompressed resource file to ensure security of the decompressed resource file, and when it is determined that the decompressed resource is safe data, the corresponding application program is executed again to ensure security of the data. Furthermore, the actual compression check code obtained by the terminal is compared with the downloaded compression check code downloaded from the server, so that the safety of the decompressed data corresponding to the application program is ensured, man-in-the-middle attack or data tampering is prevented, and the cost and difficulty of malicious attack by hackers are improved. And when the application program does not run for the first time, the decompression resource file corresponding to the application program is directly obtained, the compressed resource file does not need to be downloaded from the server for multiple times and then decompressed, the starting speed of the application program such as an applet is improved, and the network resources of the terminal are saved.
In one embodiment, the decompressing resource file comprises a plurality of decompressed subfiles, and the calculating of the actual decompressed check code of the decompressed resource file comprises: acquiring subfile identifications and subfile check codes corresponding to the decompressed subfiles; and combining the subfile identifications and the subfile check codes according to a preset rule to obtain the actual decompression check codes corresponding to the decompression resource files.
The resource file is a data file corresponding to a corresponding application program, and specifically, the resource file after being decompressed may be a folder, and the folder may further include a plurality of subfolders and a plurality of decompressed subfolders. When the security of the plurality of files is checked, the subfile identifications, such as file names, corresponding to the decompressed subfiles can be obtained, the subfile check codes corresponding to the decompressed subfiles are obtained, and then the subfile identifications and the subfile check codes are combined by using a preset algorithm to obtain the actual decompressed check codes corresponding to the decompressed resource files. For example, a preset algorithm may count all individual files in a folder, sort the names of the files in ascending order, and after sorting, compare "file 1 name: MD5 of document 1, name of document 2: the MD5, … "of file 2 are concatenated into strings to obtain MD5 corresponding to the decompressed resource file, and then MD5 is performed on the strings. It should be noted that the preset algorithm is predetermined by the terminal and the server in advance, that is, the download decompression check code for decompressing the resource file is generated in the server in advance according to the preset algorithm, then when the terminal acquires the decompression resource file, the MD5 for decompressing the resource is locally performed to obtain the actual decompression resource file, and then the consistency check between the actual decompression check code and the download decompression check code is performed. Moreover, the preset algorithm may also be other algorithms agreed in advance, and is not limited herein.
In this embodiment, considering that the decompressed resource file contains a plurality of files and each file has a corresponding file check code, in order to implement the security check on the plurality of files, the check codes corresponding to the plurality of files are generated by a preset algorithm, and the preset algorithm is pre-agreed by the terminal and the server, and has various forms, so that the resource file is prevented from being stolen, and the security of the decompressed resource file is further ensured. And whether the internal file of the decompressed folder is modified or not can be known by checking the security of the decompressed resource file.
As shown in fig. 3, there is provided another flowchart of a method for starting an application, including: after inquiring whether the application program corresponding to the application program identification is operated for the first time, the method further comprises the following steps:
in step 310, when the application program is run for the first time, the compressed resource file corresponding to the application program identifier is obtained.
Specifically, an application program starting request is received, the application program starting request carries an application program identifier, whether an application program corresponding to the application program identifier is operated for the first time is inquired, and when the application program is operated for the first time, a compressed resource file corresponding to the application program identifier is obtained.
Specifically, when the terminal does not find the historical download data corresponding to the application program identifier from the corresponding host sandbox or other databases, it is determined that the application program is operated for the first time, and then the terminal downloads the compressed resource file corresponding to the application program identifier from the server. If the terminal can locate the resource to be downloaded according to the acquired download address and the download address, the resource to be downloaded is subjected to file downloading to obtain the compressed resource file.
Step 320, calculating an actual compression check code of the compressed resource file.
Specifically, after the terminal acquires the compressed resource file, the actual compressed check code corresponding to the compressed resource file may be acquired by using a preset check algorithm, for example, when the check code corresponds to the MD5 check code, the actual compressed check code corresponding to the compressed resource file may be locally acquired by using a preset MD5 verification algorithm. It should be noted that the compressed resource file may be a file with a zip suffix, which corresponds to a file, and may be directly checked by MD 5.
Step 330, acquiring the download compression check code of the compressed resource file corresponding to the application program downloaded from the server in advance.
The server stores the check code of the compressed resource file in advance, and marks the check code as a download compressed check code so as to uniquely identify the compressed resource file by using the download compressed check code. Specifically, after the corresponding compressed resource file is downloaded in the terminal server, the actual compressed check code corresponding to the compressed resource file is locally calculated, then the terminal obtains the downloaded compressed check code related to the compressed resource file from the server, and then the actual compressed check code and the downloaded compressed check code can be compared to verify whether the compressed resource file in the server and the compressed resource file obtained by the terminal are the same compressed resource file.
Specifically, the server performs one-time MD5 on a compressed resource file to be uploaded to obtain a download compressed MD5 value so as to uniquely identify the resource file to be uploaded, then the server returns the download compressed MD5 value to the terminal, so that when the terminal downloads the compressed resource file from the server, one-time MD5 is performed locally, then the server returns the download compressed MD5 to be matched with the locally generated actual compressed MD5, if the character strings are the same, the compressed resource file acquired by the terminal is correct, and if the character strings are different, the compressed resource file is modified, and the compressed resource file acquired by the terminal is unsafe.
Step 340, determine whether the actual compression check code is consistent with the downloaded compression check code.
Specifically, the terminal compares the actual compression check code with the characters in the downloaded compression check code one by one, when all the characters are the same, the actual compression check code is judged to be consistent with the downloaded compression check code, and when any one character of the characters in the actual compression check code is inconsistent with any one character of the characters in the downloaded compression check code, the actual compression check code is judged to be inconsistent with the downloaded compression check code. In specific implementation, the characters in the actual compression check code and the downloaded compression check code can be compared in sequence according to a certain sequence, and when any one character is inconsistent, the inconsistent conclusion can be directly obtained without comparing all the characters and then obtaining the inconsistent conclusion.
And step 350, when the actual compression check code is consistent with the downloaded compression check code, judging that the compressed resource file is a safe compressed file.
Specifically, when the actual compression check code is consistent with the downloaded compression check code, it is indicated that the compressed resource file acquired by the terminal is consistent with the compressed resource file uploaded by the server, that is, the compressed resource file acquired by the terminal is the compressed resource file uploaded by the server in advance, and the compressed resource file that has not been tampered with, at this time, the step of starting the application program may be executed. On the contrary, when the actual compression check code is not consistent with the downloaded compression check code, it is indicated that the compressed resource file acquired by the terminal is not the same file as the compressed resource file uploaded in advance by the server, that is, the compressed resource file is tampered or lost in the data transmission between the server and the terminal, and at this time, a warning message should be sent to prompt the terminal that the application program has a risk or directly forbid the terminal from starting the corresponding application program.
And step 360, when the compressed resource file is a safe compressed file, decompressing the safe compressed file to obtain a decompressed resource file, and starting an application program according to the decompressed compressed file.
Specifically, when the terminal judges that the compressed resource file is a safe compressed file, the safe compressed file is decompressed to obtain a decompressed resource file, then security verification of the decompressed resource file is executed, and when the decompressed resource file is also a safe decompressed file, the application program is started.
In this embodiment, after the terminal downloads the compressed resource file corresponding to the application program for the first time, security check is performed on the compressed resource file, for example, MD5 verification is performed, when the security verification passes, the compressed resource file is decompressed and operated to obtain a decompressed resource file, if the security verification of the compressed resource file does not pass, the compressed resource file is modified, and if an error is made, the user terminal may be rejected from starting the application program, so that the security of data is ensured.
In one embodiment, after determining whether the actual compression check code is consistent with the downloaded compression check code, the method further includes: when the actual compression check code is inconsistent with the downloaded compression check code, the compressed resource file is judged to be an unsafe compressed resource file; and generating warning information aiming at the unsafe compressed resource file.
In one embodiment, after determining whether the actual decompression check code is consistent with the downloaded decompression check code, the method further includes: when the actual decompression check code is inconsistent with the downloaded decompression check code, the decompressed resource file is judged to be an unsafe decompressed resource file; and generating warning information aiming at unsafe decompressed resource files.
In one embodiment, when the application program is run for the first time, acquiring a compressed resource file corresponding to the application program identifier includes: when the application program runs for the first time, an encrypted symmetric key is generated and sent to the server, and the symmetric key is used for indicating the server to encrypt a download address, a download decompression check code and a download compression check code of the application program to generate an encrypted service file. Receiving an encrypted service file returned by the server; decrypting the encrypted service file through the symmetric key to obtain a service file; acquiring a download address corresponding to the application program from the business file; and downloading according to the download address to obtain the compressed resource file.
Specifically, when the terminal determines that the application program is operated for the first time, the terminal needs to acquire a compressed resource file related to starting the application program from the server through the network, and specifically, the terminal needs to provide a download address for downloading the compressed resource file, a download compression check code of the compressed resource file, and a decompression resource check code from the server. The download address is used for downloading a corresponding compressed resource file, the download compression check code is used for checking the security of the downloaded compressed resource file, and the download decompression check code is used for checking the security of a decompressed resource file generated after the compressed resource file is decompressed, such as checking whether the decompressed resource file is modified in a host sandbox.
Further, the terminal communicates with the server through the network, and in the process of sending the download address and the check code to the terminal by the server, the security of the network data transmission process needs to be ensured, that is, the transmitted data is not tampered. Specifically, the terminal can generate a symmetric key according to a preset rule, and the symmetric key is sent to the server, so that the server encrypts a download address, a download decompression check code and a download compression check code of the application program according to the received symmetric key to generate an encrypted service file, and the encrypted service file is sent to the terminal by encrypting the service file, thereby improving the security of the data transmission process. The symmetric encryption is characterized in that the encryption key and the decryption key are the same, so that the encryption efficiency and the decryption efficiency are high, and the data transmission efficiency is not influenced. It should be noted that, in other embodiments, the terminal may also generate the encrypted service file by using other encryption algorithms, for example, an asymmetric encryption algorithm, which is not limited in this embodiment.
Specifically, the symmetric key may be an AES encryption algorithm, specifically, the symmetric key may be dynamically and randomly generated, and the step of generating the symmetric key may include: firstly, a character string abcdefghijklmnopqrstuvwxyz is randomly generated, then a certain letter in the character string is randomly taken each time by using a cyclic algorithm such as a code algorithm which can be cyclic 16 times, the taken letters are spliced together to generate a character string, and the character string is used as a randomly generated 16-bit symmetric key. And then the terminal sends the symmetric key to the server to instruct the server to encrypt the service data by using the symmetric key to generate an encrypted service file, then the terminal decrypts the encrypted service data according to the symmetric key to generate service data, and then the step of starting an application program is executed by using the service data. The symmetric key is used for encryption, the encrypted file is sent to the terminal to ensure the security of data transmission, and the symmetric key algorithm is simple and does not influence the efficiency of data transmission.
In order to further ensure that the symmetric key is not tampered in the network transmission process, the symmetric key may be encrypted again, for example, the symmetric key may be encrypted and transmitted by using an RSA encryption technology, where the RSA encryption technology is an asymmetric encryption technology, that is, the keys corresponding to encryption and decryption are different, specifically, the RSA has two key public keys and a private key, and the public key is used for encryption and the private key is used for decryption.
In one embodiment, sending the symmetric key to the server includes: the symmetric secret key is encrypted through the public key of the asymmetric secret key and then sent to the server, so that the server decrypts through the private key corresponding to the public key of the asymmetric secret key to obtain the symmetric secret key.
Specifically, the public key of the asymmetric key is stored in the terminal code, and because the public key is only used for encryption and is stored in the terminal code or is transmitted through a network, even if a hacker takes the public key, the public key can only be used for encryption and cannot be used for decryption, so that the public key does not need to be obtained by illegal personnel through decompilation, and the private key of the asymmetric key is not needed to be obtained in a background server. Specifically, the terminal encrypts a symmetric key, such as an AES key, with a public key of the asymmetric key, sends the encrypted data to the background server, and the background server decrypts the data with a private key corresponding to the public key of the asymmetric key to obtain a symmetric key corresponding to the AES, thereby completing transfer of the AES keys of the terminal and the background server. The AES is encrypted through RSA and then data transmission is carried out, only a small data volume such as a key symmetric secret key is encrypted, and the data transmission efficiency is not influenced.
In one embodiment, the obtaining method of the download decompression check code and the download compression check code includes: and extracting a download decompression check code and a download compression check code from the service file obtained by decrypting the encrypted service file through the symmetric key, wherein the download decompression check code and the download compression check code are stored in the block chain.
Specifically, the obtaining of the download decompression check code of the decompression resource file corresponding to the application program downloaded from the server in advance includes: acquiring a download decompression check code corresponding to the application program from the decompressed service file; the method for acquiring the download compression check code of the compressed resource file corresponding to the application program downloaded from the server in advance comprises the following steps: and acquiring a download compression check code corresponding to the application program from the decompressed service file.
If the download address returned by the background server is http:// fcloud. pad. com. cn/f/ios _ app. zip, the download compression MD5 returned is 6ea84e6330f55248cbb5b06fbcf95d 59. After the terminal receives the download address and the MD5 data, the terminal downloads the compressed resource file to the terminal such as a mobile phone by using the download address, then verifies the downloaded compressed resource file and MD5 to obtain a corresponding actual compressed MD5, for example, the actual compressed MD5 may be 6ea84e6330f55248cbb5b06fbcf95d59, and then compares the actual compressed MD5 with the downloaded compressed MD5 returned by the background server, if the comparison result is consistent, it indicates that the downloaded compressed resource file can be used without being modified, if the value of the MD5 is not up, it indicates that the download packet does not conform to the expected result, and the local flow is terminated.
It should be emphasized that, in order to further ensure the privacy and security of the downloaded decompressed check code and the downloaded compressed check code, the downloaded decompressed check code and the downloaded compressed check code may also be stored in a node of a block chain, and when the downloaded decompressed check code and the downloaded compressed check code are required to be used for security check of an application program, the downloaded decompressed check code and the downloaded compressed check code are directly obtained from the corresponding node of the block chain, so as to ensure the security of the obtained information.
As shown in fig. 4, a timing diagram of an application startup method is provided. Specifically, the method comprises the following steps:
the terminal, such as a mobile phone, randomly generates an AES key result A, and then the terminal encrypts the key A by using an RSA public key to obtain a decryption result B. The terminal sends the B to the background server, the background server decrypts the B by using a private key of RSA to obtain a result A, the background server encrypts the to-be-sent service data by using the A to obtain C, the C is sent to the terminal, the terminal decrypts the C by using the A to obtain decrypted service data, and meanwhile, the to-be-sent service data is encrypted by using the A to obtain encrypted service data and is sent to the background server.
When the application program corresponds to the applet, the resource file of the applet package is generally downloaded through the network and decompressed into the host sandbox, because the hosts are more, the host developer is not excluded from modifying the applet resource, or the resource is modified due to the host code. In order to ensure the correctness of the resources, the MD5 verification is generally performed after downloading, but it is impossible to prevent the MD5 in the interface from being modified, and even impossible to prevent the decompressed resources from being modified, which may result in insecurity of the applet package resources. In the embodiment, the security check is performed on the compressed resource file and the decompressed resource file through the check code, so that the security of the files is ensured, and the security of data is further ensured. And the data encryption is carried out in the data transmission process between the terminal and the server, so that the data transmission safety is further ensured, and the safety of the small program resources is improved.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 5, there is provided a block diagram of an apparatus for secure launching an application, including: a request receiving module 510, a query module 520, a decompressed file acquiring module 530, an actual decompressed check code calculating module 540, a downloaded decompressed check code acquiring module 550, a judging module 560 and a starting module 570, wherein:
the request receiving module 510 is configured to receive an application start request, where the application start request carries an application identifier.
The query module 520 is configured to query whether the application corresponding to the application identifier is first run.
And a decompressed file obtaining module 530, configured to obtain a decompressed resource file corresponding to the application identifier when the application is not run for the first time.
And the actual decompressed check code calculating module 540 is configured to calculate an actual decompressed check code of the decompressed resource file.
The download decompressing check code obtaining module 550 is configured to obtain a download decompressing check code of the decompressed resource file, where the download decompressing check code is a check code that is downloaded from the server in advance and is used to identify the decompressed resource file.
A judging module 560, configured to judge whether the actual decompression check code is consistent with the downloaded decompression check code;
the first starting module 570 is configured to start the application program when the actual decompression check code is consistent with the downloaded decompression check code.
In one embodiment, the actual decompressed check code calculation module 540 includes:
and the file check acquisition unit is used for acquiring the subfile identifier and the subfile check code corresponding to each decompressed subfile.
And the actual decompression check code calculating unit is used for combining the subfile identifications and the subfile check codes according to a preset rule to obtain the actual decompression check codes corresponding to the decompression resource files.
In one embodiment, the device for safely starting the application program further comprises:
and the compressed resource file acquisition module is used for acquiring a compressed resource file corresponding to the application program identifier when the application program is operated for the first time.
And the actual compression check code calculating module is used for calculating the actual compression check code of the compressed resource file.
And the download compression check code acquisition module is used for acquiring the download compression check code of the compressed resource file corresponding to the application program downloaded from the server in advance.
And the compressed file judgment module is used for judging whether the actual compression check code is consistent with the download compression check code.
And the compressed file judging module is used for judging that the compressed resource file is a safe compressed file when the actual compression check code is consistent with the downloaded compression check code.
And the second starting module is used for decompressing the safe compressed file to obtain a decompressed resource file when the compressed resource file is the safe compressed file, and starting the application program according to the decompressed compressed file.
In one embodiment, the compressed resource file obtaining module includes:
and the encrypted service file generating unit is used for generating an encrypted symmetric key when the application program runs for the first time, and sending the symmetric key to the server, wherein the symmetric key is used for indicating the server to encrypt a download address, a download decompression check code and a download compression check code of the application program to generate an encrypted service file.
And the encrypted service file receiving unit is used for receiving the encrypted service file returned by the server.
And the service file acquisition unit is used for decrypting the encrypted service file through the symmetric secret key to obtain the service file.
And the download address acquisition unit is used for acquiring a download address corresponding to the application program from the service file.
And the compressed file downloading unit is used for downloading according to the downloading address to obtain the compressed resource file.
In one embodiment, the device for safely starting the application program comprises:
the verification code extraction module is used for extracting a download decompression check code and a download compression check code from the service file obtained by decrypting the encrypted service file through the symmetric key, wherein the download decompression check code and the download compression check code are stored in the block chain.
In one embodiment, the encrypted service file generating unit includes:
and the symmetric key obtaining subunit is used for encrypting the symmetric key through the public key of the asymmetric key and then sending the encrypted symmetric key to the server, so that the server decrypts through the private key corresponding to the public key of the asymmetric key to obtain the symmetric key.
In one embodiment, the device for safely starting the application program further comprises:
the first warning module is used for judging the compressed resource file to be an unsafe compressed resource file when the actual compressed check code is inconsistent with the downloaded compressed check code; and generating warning information aiming at the unsafe compressed resource file.
The second warning module is used for judging that the decompressed resource file is an unsafe decompressed resource file when the actual decompressed check code is inconsistent with the downloaded decompressed check code; and generating warning information aiming at unsafe decompressed resource files.
For specific limitations of the application program safe starting device, reference may be made to the above limitations of the application program safe starting method, which are not described herein again. The modules in the above-mentioned application program safety starting device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a secure launch method for an application. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: receiving an application program starting request, wherein the application program starting request carries an application program identifier; inquiring whether the application program corresponding to the application program identification is operated for the first time; when the application program does not run for the first time, acquiring a decompressed resource file corresponding to the application program identifier; calculating an actual decompression check code of the decompression resource file; acquiring a downloading decompression check code of the decompressed resource file, wherein the downloading decompression check code is a check code which is downloaded from a server in advance and used for identifying the decompressed resource file; judging whether the actual decompression check code is consistent with the downloaded decompression check code; and when the actual decompression check code is consistent with the downloaded decompression check code, starting the application program.
In one embodiment, the decompressed resource file comprises a plurality of decompressed subfiles, and the processor when executing the computer program further performs the step of calculating an actual decompressed check code of the decompressed resource file: acquiring subfile identifications and subfile check codes corresponding to the decompressed subfiles; and combining the subfile identifications and the subfile check codes according to a preset rule to obtain the actual decompression check codes corresponding to the decompression resource files.
In one embodiment, the step of querying whether the application program identifies the corresponding application program as being run for the first time when the processor executes the computer program is further configured to: when the application program runs for the first time, acquiring a compressed resource file corresponding to the application program identifier; calculating an actual compression check code of the compressed resource file; acquiring a download compression check code of a compression resource file corresponding to an application program downloaded from a server in advance; judging whether the actual compression check code is consistent with the download compression check code; when the actual compression check code is consistent with the downloaded compression check code, the compressed resource file is judged to be a safe compressed file; and when the compressed resource file is a safe compressed file, decompressing the safe compressed file to obtain a decompressed resource file, and starting an application program according to the decompressed compressed file.
In one embodiment, the processor, when executing the computer program, further performs the step of obtaining a compressed resource file corresponding to the application identifier when the application is first run: when the application program runs for the first time, generating an encrypted symmetric key, and sending the symmetric key to the server, wherein the symmetric key is used for indicating the server to encrypt a download address, a download decompression check code and a download compression check code of the application program to generate an encrypted service file; receiving an encrypted service file returned by the server; decrypting the encrypted service file through the symmetric key to obtain a service file; acquiring a download address corresponding to the application program from the business file; and downloading according to the download address to obtain the compressed resource file.
In one embodiment, the step of implementing the manner of obtaining the downloaded decompression check code and the downloaded compression check code when the processor executes the computer program is further configured to: and extracting a download decompression check code and a download compression check code from the service file obtained by decrypting the encrypted service file through the symmetric key, wherein the download decompression check code and the download compression check code are stored in the block chain.
In one embodiment, the step of sending the symmetric key to the server is further performed when the processor executes the computer program to: the symmetric secret key is encrypted through the public key of the asymmetric secret key and then sent to the server, so that the server decrypts through the private key corresponding to the public key of the asymmetric secret key to obtain the symmetric secret key.
In one embodiment, the step of determining whether the actual compression check code is consistent with the downloaded compression check code is further performed when the processor executes the computer program: when the actual compression check code is inconsistent with the downloaded compression check code, the compressed resource file is judged to be an unsafe compressed resource file; generating warning information aiming at unsafe compressed resource files;
when the processor executes the computer program, the step after judging whether the actual decompression check code is consistent with the downloaded decompression check code is further used for: when the actual decompression check code is inconsistent with the downloaded decompression check code, the decompressed resource file is judged to be an unsafe decompressed resource file; and generating warning information aiming at unsafe decompressed resource files.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving an application program starting request, wherein the application program starting request carries an application program identifier; inquiring whether the application program corresponding to the application program identification is operated for the first time; when the application program does not run for the first time, acquiring a decompressed resource file corresponding to the application program identifier; calculating an actual decompression check code of the decompression resource file; acquiring a downloading decompression check code of the decompressed resource file, wherein the downloading decompression check code is a check code which is downloaded from a server in advance and used for identifying the decompressed resource file; judging whether the actual decompression check code is consistent with the downloaded decompression check code; and when the actual decompression check code is consistent with the downloaded decompression check code, starting the application program.
In one embodiment, the decompressed resource file comprises a plurality of decompressed subfiles, and the computer program when executed by the processor further performs the step of calculating an actual decompressed check code of the decompressed resource file by: acquiring subfile identifications and subfile check codes corresponding to the decompressed subfiles; and combining the subfile identifications and the subfile check codes according to a preset rule to obtain the actual decompression check codes corresponding to the decompression resource files.
In one embodiment, the computer program when executed by the processor further performs the step of querying whether the application identifies the corresponding application as being run for the first time further comprises: when the application program runs for the first time, acquiring a compressed resource file corresponding to the application program identifier; calculating an actual compression check code of the compressed resource file; acquiring a download compression check code of a compression resource file corresponding to an application program downloaded from a server in advance; judging whether the actual compression check code is consistent with the download compression check code; when the actual compression check code is consistent with the downloaded compression check code, the compressed resource file is judged to be a safe compressed file; and when the compressed resource file is a safe compressed file, decompressing the safe compressed file to obtain a decompressed resource file, and starting an application program according to the decompressed compressed file.
In one embodiment, the computer program when executed by the processor further performs the step of obtaining a compressed resource file corresponding to the application identification when the application is first run: when the application program runs for the first time, generating an encrypted symmetric key, and sending the symmetric key to the server, wherein the symmetric key is used for indicating the server to encrypt a download address, a download decompression check code and a download compression check code of the application program to generate an encrypted service file; receiving an encrypted service file returned by the server; decrypting the encrypted service file through the symmetric key to obtain a service file; acquiring a download address corresponding to the application program from the business file; and downloading according to the download address to obtain the compressed resource file.
In one embodiment, the computer program when executed by the processor further performs the steps of downloading the decompression check code and downloading the compressed check code according to the obtaining manner, further: and extracting a download decompression check code and a download compression check code from the service file obtained by decrypting the encrypted service file through the symmetric key, wherein the download decompression check code and the download compression check code are stored in the block chain.
In one embodiment, the computer program when executed by the processor further performs the step of sending the symmetric key to the server by: the symmetric secret key is encrypted through the public key of the asymmetric secret key and then sent to the server, so that the server decrypts through the private key corresponding to the public key of the asymmetric secret key to obtain the symmetric secret key.
In one embodiment, the computer program when executed by the processor further performs the steps after determining whether the actual compression check code is consistent with the downloaded compression check code by: when the actual compression check code is inconsistent with the downloaded compression check code, the compressed resource file is judged to be an unsafe compressed resource file; and generating warning information aiming at the unsafe compressed resource file. When the computer program is executed by the processor, the steps after judging whether the actual decompression check code is consistent with the downloaded decompression check code are further used for: when the actual decompression check code is inconsistent with the downloaded decompression check code, the decompressed resource file is judged to be an unsafe decompressed resource file; and generating warning information aiming at unsafe decompressed resource files.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile memory may include Read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for secure startup of an application, the method comprising:
receiving an application program starting request, wherein the application program starting request carries an application program identifier;
inquiring whether the application program corresponding to the application program identification is operated for the first time;
when the application program does not run for the first time, acquiring a decompressed resource file corresponding to the application program identifier;
calculating an actual decompression check code of the decompression resource file;
acquiring a download decompression check code of the decompressed resource file, wherein the download decompression check code is a check code which is downloaded from a server in advance and used for identifying the decompressed resource file;
judging whether the actual decompression check code is consistent with the download decompression check code or not;
and when the actual decompression check code is consistent with the downloaded decompression check code, starting the application program.
2. The method of claim 1, wherein the decompressed resource file comprises a plurality of decompressed subfiles; the calculating the actual decompression check code of the decompressed resource file includes:
acquiring subfile identifications and subfile check codes corresponding to the decompressed subfiles;
and combining the identifiers of the subfiles and the check codes of the subfiles according to a preset rule to obtain the actual decompression check codes corresponding to the decompression resource files.
3. The method of claim 1, wherein querying the application to identify whether the corresponding application is running for the first time further comprises:
when the application program runs for the first time, acquiring a compressed resource file corresponding to the application program identifier;
calculating an actual compression check code of the compressed resource file;
acquiring a downloading compression check code of a compression resource file corresponding to the application program downloaded from a server in advance;
judging whether the actual compression check code is consistent with the download compression check code;
when the actual compression check code is consistent with the download compression check code, the compressed resource file is judged to be a safe compressed file;
and when the compressed resource file is a safe compressed file, decompressing the safe compressed file to obtain a decompressed resource file, and starting an application program according to the decompressed compressed file.
4. The method according to any one of claims 1 to 3, wherein the obtaining the compressed resource file corresponding to the application program identifier when the application program is run for the first time comprises:
when the application program runs for the first time, generating an encrypted symmetric key, and sending the symmetric key to a server, wherein the symmetric key is used for instructing the server to encrypt a download address of the application program, the download decompression check code and the download compression check code to generate an encrypted service file;
receiving the encrypted service file returned by the server;
decrypting the encrypted service file through the symmetric secret key to obtain a service file;
acquiring a downloading address corresponding to the application program from the service file;
and downloading according to the download address to obtain a compressed resource file.
5. The method of claim 4, wherein the obtaining of the downloaded decompressed checksum and the downloaded compressed checksum comprises:
and extracting a download decompression check code and the download compression check code from the service file obtained by decrypting the encrypted service file through the symmetric key, wherein the download decompression check code and the download compression check code are stored in the block chain.
6. The method of claim 4, wherein sending the symmetric key to a server comprises:
the symmetric secret key is encrypted through the public key of the asymmetric secret key and then sent to the server, so that the server decrypts through the private key corresponding to the public key of the asymmetric secret key to obtain the symmetric secret key.
7. The method of claim 3, wherein after determining whether the actual compression check code is consistent with the downloaded compression check code, the method further comprises:
when the actual compression check code is inconsistent with the download compression check code, judging that the compressed resource file is an unsafe compressed resource file;
generating warning information for the unsafe compressed resource file;
after judging whether the actual decompression check code is consistent with the download decompression check code, the method further comprises the following steps:
when the actual decompression check code is inconsistent with the download decompression check code, judging that the decompressed resource file is an unsafe decompressed resource file;
and generating warning information aiming at the unsafe decompressed resource file.
8. An apparatus for secure launching of an application, the apparatus comprising:
the device comprises a request receiving module, a request sending module and a request receiving module, wherein the request receiving module is used for receiving an application program starting request, and the application program starting request carries an application program identifier;
the query module is used for querying whether the application program corresponding to the application program identifier is operated for the first time;
the decompressed file acquisition module is used for acquiring a decompressed resource file corresponding to the application program identifier when the application program does not run for the first time;
the actual decompression check code calculation module is used for calculating the actual decompression check code of the decompression resource file;
the download decompression check code acquisition module is used for acquiring a download decompression check code of the decompressed resource file, wherein the download decompression check code is a check code which is downloaded from a server in advance and is used for identifying the decompressed resource file;
the judging module is used for judging whether the actual decompression check code is consistent with the download decompression check code or not;
and the starting module is used for starting the application program when the actual decompression check code is consistent with the downloaded decompression check code.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010405714.6A 2020-05-14 2020-05-14 Application program safe starting method and device, computer equipment and storage medium Active CN111666564B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010405714.6A CN111666564B (en) 2020-05-14 2020-05-14 Application program safe starting method and device, computer equipment and storage medium
PCT/CN2020/098856 WO2021114614A1 (en) 2020-05-14 2020-06-29 Application program secure startup method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010405714.6A CN111666564B (en) 2020-05-14 2020-05-14 Application program safe starting method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111666564A true CN111666564A (en) 2020-09-15
CN111666564B CN111666564B (en) 2024-02-02

Family

ID=72382589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010405714.6A Active CN111666564B (en) 2020-05-14 2020-05-14 Application program safe starting method and device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN111666564B (en)
WO (1) WO2021114614A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112163412A (en) * 2020-09-30 2021-01-01 平安普惠企业管理有限公司 Data verification method and device, electronic equipment and storage medium
CN112182584A (en) * 2020-09-28 2021-01-05 广东小天才科技有限公司 Security verification method and device, electronic equipment and storage medium
CN112379905A (en) * 2020-11-20 2021-02-19 惠州Tcl移动通信有限公司 Kernel upgrading method and device, terminal and storage medium
CN112597485A (en) * 2021-03-01 2021-04-02 腾讯科技(深圳)有限公司 Information checking method, device and equipment based on block chain and storage medium
CN112732365A (en) * 2021-01-28 2021-04-30 北京字跳网络技术有限公司 Method and device for starting pre-installed application program, electronic equipment and storage medium
CN115022091A (en) * 2022-08-04 2022-09-06 亿次网联(杭州)科技有限公司 Digital certificate-based autonomous authorization method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6711709B1 (en) * 1998-06-24 2004-03-23 Unisys Corporation Integrated block checking system for rapid file transfer of compressed data
US20090158430A1 (en) * 2005-10-21 2009-06-18 Borders Kevin R Method, system and computer program product for detecting at least one of security threats and undesirable computer files
CN106778099A (en) * 2016-11-29 2017-05-31 北京奇虎科技有限公司 The generation method and device of anti-tamper APK, install and operation method and device
CN108647041A (en) * 2018-04-02 2018-10-12 金证财富南京科技有限公司 A kind of hot update mechanism of the locals mixed type APP web resource
CN108810894A (en) * 2018-05-31 2018-11-13 康键信息技术(深圳)有限公司 Authorization terminal method, apparatus, computer equipment and storage medium
CN110308924A (en) * 2019-05-24 2019-10-08 平安银行股份有限公司 Application program update method, apparatus, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778060A (en) * 2015-04-07 2015-07-15 珠海全志科技股份有限公司 Rapid and safe starting method for embedded Linux system
CN106815135B (en) * 2015-11-30 2021-04-06 阿里巴巴集团控股有限公司 Vulnerability detection method and device
US10303899B2 (en) * 2016-08-11 2019-05-28 Intel Corporation Secure public cloud with protected guest-verified host control
CN107273172A (en) * 2017-07-14 2017-10-20 银联商务有限公司 A kind of data handling system based on business packet, method and device
CN110162964B (en) * 2019-05-29 2021-09-24 中国银行股份有限公司 Method, device and system for checking file tampering

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6711709B1 (en) * 1998-06-24 2004-03-23 Unisys Corporation Integrated block checking system for rapid file transfer of compressed data
US20090158430A1 (en) * 2005-10-21 2009-06-18 Borders Kevin R Method, system and computer program product for detecting at least one of security threats and undesirable computer files
CN106778099A (en) * 2016-11-29 2017-05-31 北京奇虎科技有限公司 The generation method and device of anti-tamper APK, install and operation method and device
CN108647041A (en) * 2018-04-02 2018-10-12 金证财富南京科技有限公司 A kind of hot update mechanism of the locals mixed type APP web resource
CN108810894A (en) * 2018-05-31 2018-11-13 康键信息技术(深圳)有限公司 Authorization terminal method, apparatus, computer equipment and storage medium
CN110308924A (en) * 2019-05-24 2019-10-08 平安银行股份有限公司 Application program update method, apparatus, electronic equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182584A (en) * 2020-09-28 2021-01-05 广东小天才科技有限公司 Security verification method and device, electronic equipment and storage medium
CN112163412A (en) * 2020-09-30 2021-01-01 平安普惠企业管理有限公司 Data verification method and device, electronic equipment and storage medium
CN112163412B (en) * 2020-09-30 2024-02-09 善恒展创(深圳)发展合伙企业(有限合伙) Data verification method and device, electronic equipment and storage medium
CN112379905A (en) * 2020-11-20 2021-02-19 惠州Tcl移动通信有限公司 Kernel upgrading method and device, terminal and storage medium
CN112732365A (en) * 2021-01-28 2021-04-30 北京字跳网络技术有限公司 Method and device for starting pre-installed application program, electronic equipment and storage medium
CN112597485A (en) * 2021-03-01 2021-04-02 腾讯科技(深圳)有限公司 Information checking method, device and equipment based on block chain and storage medium
CN112597485B (en) * 2021-03-01 2021-06-08 腾讯科技(深圳)有限公司 Information checking method, device and equipment based on block chain and storage medium
CN115022091A (en) * 2022-08-04 2022-09-06 亿次网联(杭州)科技有限公司 Digital certificate-based autonomous authorization method and system

Also Published As

Publication number Publication date
WO2021114614A1 (en) 2021-06-17
CN111666564B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
CN111666564B (en) Application program safe starting method and device, computer equipment and storage medium
CN109684790B (en) Software starting method, software authorization verification method, device and storage medium
US11539690B2 (en) Authentication system, authentication method, and application providing method
CN109194625B (en) Client application protection method and device based on cloud server and storage medium
KR101744747B1 (en) Mobile terminal, terminal and method for authentication using security cookie
CN112257086B (en) User privacy data protection method and electronic equipment
CN109462602B (en) Login information storage method, login verification method, device, equipment and medium
CN112559993B (en) Identity authentication method, device and system and electronic equipment
TW201324225A (en) System and method for temporary secure boot of an electronic device
CN110688660B (en) Method and device for safely starting terminal and storage medium
CN107148010B (en) Multi-operator implementation method, device, storage medium and computer equipment
WO2016019790A1 (en) Verification method, client, server and system for installation package
US20160330030A1 (en) User Terminal For Detecting Forgery Of Application Program Based On Hash Value And Method Of Detecting Forgery Of Application Program Using The Same
CN111401901B (en) Authentication method and device of biological payment device, computer device and storage medium
JP4226556B2 (en) Program execution control device, OS, client terminal, server, program execution control system, program execution control method, program execution control program
EP3206329A1 (en) Security check method, device, terminal and server
CN109117643B (en) System processing method and related equipment
CN107548542B (en) User authentication method with enhanced integrity and security
CN111224826B (en) Configuration updating method, device, system and medium based on distributed system
US20160352522A1 (en) User Terminal For Detecting Forgery Of Application Program Based On Signature Information And Method Of Detecting Forgery Of Application Program Using The Same
CN111371755B (en) Voiceprint data processing method and device, computer equipment and storage medium
CN112632573A (en) Intelligent contract execution method, device and system, storage medium and electronic equipment
CN111898101A (en) Application security equipment verification method and device
CN111400771A (en) Target partition checking method and device, storage medium and computer equipment
CN111818087A (en) Block chain node access method, device, equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant