Authentication method and system for Android platform application software on mobile internetTechnical Field
The invention relates to the field of information security of mobile internet, in particular to an authentication method and system for Android platform application software on the mobile internet.
Background
With the increasing popularization of mobile terminals based on the Android system, the number of application software based on the Android system is rapidly increased, and business functions of various aspects such as games, entertainment, social contact, business, travel and the like can be provided for users. However, it can be seen that the Android system is open, only self-signature is required for authentication of application software, and authentication of authenticity and legality of a source of the application software is not provided, so that a multiplier is provided for distribution of various malicious software, and benefits of users are lost. Therefore, in order to ensure the security of the terminal application and the service, it is necessary to authenticate the authenticity and the validity of the application software, and ensure that only authorized legal software can perform service access.
Currently, the authentication of application software by using an application ID is generally as follows: the service platform allocates a unique string ID representing the identity of the application software to the application software, and the application software developer writes the application ID into the application software package. When a user uses the application software to access the service platform, the application software carries the application ID to initiate a service request to the service platform, the service platform verifies whether the application ID is valid, if so, the application software is considered to be real, and the subsequent service requests are all associated with the application ID. However, the method for performing application software authentication by assigning an application ID has a great potential safety hazard: in one case, the developer reveals the application ID to other developers, and the other developers can use the application ID to develop another fake application, and the service platform has no way to recognize that the application ID has been transferred for use; in another case, because the application ID is built into the application package, there is a possibility that an attacker may hack the package without being aware to the application developer holding the application ID.
Disclosure of Invention
The technical problem to be solved by the invention is to provide an authentication method of application software, aiming at the defect that the authentication method of application software in the prior art has larger potential safety hazard, so that the source authenticity, integrity and anti-counterfeiting property of the application software can be ensured.
The technical scheme adopted by the invention for solving the technical problems is as follows: the authentication method for constructing the Android platform application software on the mobile Internet comprises the following steps:
A. a signature step; and
B. a step of checking labels; wherein,
the step A comprises the following steps:
A1. the method comprises the steps that a signature request of application software is received by an authentication server, and the signature request comprises an application identifier distributed to the application software by the authentication server before the application software is developed;
A2. the authentication server generates a key pair, wherein the key pair comprises a public key and a private key, and sends the public key and the application identifier to a certificate authority to apply for making a signature certificate;
A3. the authentication server receives a signature certificate made by a certificate authority center, wherein the signature certificate comprises the public key and the application identifier, and uses the private key to digitally sign the application software so as to generate an encrypted digest file;
the step B comprises the following steps:
B1. the terminal downloads signed application software, wherein the signed application software comprises the application software, an encrypted abstract file and a signature certificate;
B2. when a terminal receives a service request, the service request comprises an application identifier and a process identifier of the application software, the terminal inquires installation information of the application software according to the process identifier and acquires a user identifier of the application software from the installation information;
B3. the terminal judges whether the corresponding relation of the application identifier, the process identifier and the user identifier of the application software is stored, if so, the step B5 is executed; if not, go to step B4;
B4. the terminal verifies the signature certificate by using a public key of a certificate authority center, acquires the public key from the signature certificate, verifies the signed application software by using the public key to generate a decrypted abstract file, if the verification passes, establishes and stores a corresponding relation among an application identifier, a process identifier and a user identifier of the application software, and executes the step B5; if the verification fails, returning identification error information of the application software;
B5. and the terminal processes the service request and returns a service processing result.
In the authentication method of the Android platform application software on the mobile internet,
in step a3, the application software is digitally signed using the RSA algorithm;
in step B4, the signed application software is signed using the RSA algorithm.
The invention also constructs an authentication system of the Android platform application software on the mobile internet, which is characterized by comprising a terminal and an authentication server, wherein the authentication server comprises:
the signature request receiving unit is used for receiving a signature request of the application software, and the signature request comprises an application identifier distributed to the application software by the authentication server before the application software is developed;
the signature certificate application unit is used for generating a key pair, wherein the key pair comprises a public key and a private key, and sending the public key and the application identifier to a certificate authority so as to apply for making a signature certificate;
the signature unit is used for receiving a signature certificate made by a certificate authority center, wherein the signature certificate comprises the public key and the application identifier, and digitally signing the application software by using the private key to generate an encrypted digest file;
the terminal includes:
the downloading unit is used for downloading signed application software, and the signed application software comprises the application software, an encrypted digest file and a signature certificate;
a service request receiving unit, configured to receive a service request, where the service request includes an application identifier and a process identifier of the application software, and the terminal queries installation information of the application software according to the process identifier and obtains a user identifier of the application software from the installation information;
the judging unit is used for judging whether the corresponding relation among the application identifier, the process identifier and the user identifier of the application software is stored or not;
the signature verification unit is used for verifying the signature certificate by using a public key of a certificate authority center when the corresponding relation among the application identifier, the process identifier and the user identifier of the application software is not stored, acquiring the public key from the signature certificate, verifying the signature of the signed application software by using the public key to generate a decrypted digest file, and if the signature passes, establishing and storing the corresponding relation among the application identifier, the process identifier and the user identifier of the application software; if the verification fails, returning identification error information of the application software;
and the processing unit is used for processing the service request and returning a service processing result when the corresponding relation among the application identifier, the process identifier and the user identifier of the application software is stored.
In the authentication system of application software according to the present invention,
the signature unit uses an RSA algorithm to digitally sign the application software;
the signature verification unit verifies the application software by using an RSA algorithm.
By implementing the technical scheme of the invention, the real identity of the application software is identified by issuing the signature certificate to the application software and signing the application software before the application software is issued and by checking the signature when the application software accesses the service platform, so that the source authenticity, integrity and anti-counterfeiting property of the application software are ensured. In addition, the scheme is based on a PKI key and a cryptographic algorithm of signature verification and signature verification, and is combined with a safety mechanism of an operating system for distribution management of the process identification and the user identification, so that the scheme not only has high safety, but also has high processing performance because the subsequent authentication only queries whether the relationship among the application identification, the process identification and the user identification exists or not except the time consumed for verifying the application software by the first authentication. Furthermore, the scheme can provide safety guarantee for business operation based on the mobile internet, thereby providing powerful support for various mobile electronic commerce and various value-added services.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flowchart of a first embodiment of an authentication method for Android platform application software on the mobile internet according to the present invention;
FIG. 2 is a flowchart of a first signature step in the authentication method of Android platform application software on the mobile internet according to the present invention;
FIG. 3 is a flowchart of a first embodiment of a signature verification step during first authentication in the authentication method for Android platform application software on the mobile internet according to the present invention;
FIG. 4 is a flowchart of a first embodiment of a signature verification step in the subsequent authentication in the authentication method for Android platform application software on the mobile internet according to the present invention;
fig. 5 is a logic diagram of a first embodiment of the authentication system for Android platform application software on the mobile internet according to the present invention.
Detailed Description
As shown in fig. 1, a flowchart of a first embodiment of an authentication method for Android platform application software on the mobile internet according to the present invention includes
A. A signature step; and
B. a step of checking labels; wherein,
the signature step comprises the following steps:
A1. the authentication server receives a signature request of the application software, wherein the signature request comprises an APPID (application identification), and it should be noted that the APPID is a unique identification allocated to the application software by the authentication server before the application software is developed, and the APPID is embedded into a package of the application software during program development;
A2. the authentication server generates a key pair, the key pair comprises a public key and a private key, and sends the public key and the APPID to a CA (Certificate Authority) center to apply for making a signature Certificate. With respect to the CA center, it should be noted that the CA center is a third-party authority that can issue a signed certificate to a user to confirm the identity of the user. To prevent counterfeiting of the digital certificate, the public key of the CA center must be authentic, and the CA center must either publish its public key or provide an electronic certificate from a higher level certificate authority to prove the validity of its public key. When the CA center issues the signature certificate, the APPID and the public key are packaged into the signature certificate, and the tail part of the signature certificate must be provided with the digital signature of the CA center. Since the digital signature of the CA center is not forgeable, the signature certificate of the application software is not forgeable. After the CA center passes the identity qualification examination of the application software, issuing a signature certificate to an applicant, and corresponding the identity of the application software with the signature certificate;
A3. the authentication server receives a signature certificate which is made by a certificate authority center and comprises a public key and an APPID, and digitally signs the application software by using a private key to generate an encrypted digest file. With respect to digital signatures, it should be noted that a 128-bit hash value (i.e., digest) is first generated from the application software. This digest is then encrypted with the private key of the key pair to form a digital signature. Then, the digital signature is used as an attachment of the application software and is sent to the developer of the application software together with the application software;
the label checking step comprises:
B1. the terminal downloads signed application software, wherein the signed application software comprises the application software, an encrypted abstract file and a signature certificate;
B2. when the terminal receives a service request, the service request includes an APPID (Process Identifier) and a PID (Process Identifier) of the application software, the terminal inquires the installation information of the application software according to the PID, and acquires a UID (user Identifier) of the application software from the installation information;
B3. the terminal judges whether the corresponding relation among the APPID, the PID and the UID of the application software is stored, if so, the step B5 is executed; if not, go to step B4;
B4. the terminal verifies the signature certificate by using the public key of the CA center, acquires the public key from the signature certificate, verifies the signature of the signed application software by using the public key to generate a decrypted abstract file, establishes and stores the corresponding relation among the APPID, the PID and the UID of the application software if the signature passes, and executes the step B5; and if the verification fails, returning the identification error information of the application software. Whether the signature passes or not is to be described in that the terminal first calculates a 128-bit hash value (i.e., digest) from the received application software, and then decrypts the encrypted digest file using the public key. If the two hash values are the same, then the digital signature can be confirmed to be that of the authentication server; conversely, if the two hash values are not the same, then it can be confirmed that the digital signature is not for the authentication server;
B5. and the terminal processes the service request and returns a service processing result.
In a preferred embodiment of the method for authenticating application software according to the present invention, in step a3, the application software may be digitally signed using RSA algorithm; in step B4, the signed application software is signed using the RSA algorithm.
FIG. 2 is a flowchart of a first signing step in the authentication method of Android platform application software on the mobile internet according to the present invention, in the application software development link, an application software developer uploads application software to an authentication server and requests to sign the application software, and an APPID pre-assigned by the authentication server is implanted in a package of the application software; the certification server generates a PKI key pair and submits information such as an APPID, an application software package name and a public key to the CA center so as to apply for a signature certificate to the CA center. After the certification server successfully applies the signature certificate to the CA center, the application software is digitally signed by using a private key, the original Debug certificate for development is replaced according to the Android package signature certificate format, the application program signature is completed, an application software developer is informed that the signature is completed, the developer downloads the signed application software from the platform, and the signed application software can be issued to a user terminal for use.
Fig. 3 is a flowchart of a first embodiment of a signature verification step in the authentication method of the Android platform application software on the mobile internet according to the present invention, and it is first described that the authentication agent is software installed and running on the user mobile terminal to identify and access control the application software on the terminal device. In the first authentication step, the terminal should first download the signed application software into the terminal. Then, the application software in the terminal initiates a service request to an authentication Agent (Agent), and carries the PID and APPID of the application software itself. And then, the authentication agent inquires the process information and the installation information of the operating system according to the PID to obtain the program package information of the application software corresponding to the PID, wherein the information comprises a program package file path and UID information of the application software. And then, the authentication agent verifies the signature certificate by using a built-in public key of a platform CA center, ensures the authenticity of the certificate and the correctness of the APPID contained in the certificate, signs and verifies the application software, if the signature passes, the application program package is not tampered and is true, otherwise, the identity identification error is directly returned. In addition, if the verification is passed, the authentication agent also establishes and stores the triple information of PID, UID and APPID. And finally, when the verification passes, the authentication agent processes the service request according to the authorization of the application software and returns a service processing result.
Fig. 4 is a flowchart of a first embodiment of a signature verification step in the subsequent authentication in the authentication method for Android platform application software on the mobile internet, in the subsequent authentication link, the application software initiates a service request to an authentication agent, carrying PID and APPID of the application itself. Then, the authentication agent inquires the process information and the application installation information of the operating system according to the PID, obtains the APPID and the UID of the application software corresponding to the PID, judges whether the triple information of the PID, the UID and the APPID exists, if the triple does not exist, the application software is not authenticated, and then the authentication agent transfers to the signature verification processing flow in the first authentication link, and re-authenticates the application software; if the triple exists, the triple indicates that the application software passes the application authentication and is real, the service processing is continued, and the authentication agent processes the service request according to the authorization of the application software and returns a service processing result.
Fig. 5 is a logic diagram of a first embodiment of an authentication system for Android platform application software on the mobile internet according to the present invention, where the authentication system for application software includes an authentication server 10 and a terminal 20. Further, the authentication server 10 includes a signature request receiving unit 11, a signature certificate applying unit 12, and a signature unit 13; the terminal 20 includes a downloading unit 21, a service request receiving unit 22, a judging unit 23, an authenticating unit 24, and a processing unit 25. In a software development link, the signature request receiving unit 11 is configured to receive a signature request of application software, where the signature request includes an APPID allocated to the application software by the authentication server 10 before the application software is developed; the signature certificate application unit 12 is configured to generate a key pair, where the key pair includes a public key and a private key, and send the public key and the APPID to a CA center to apply for making a signature certificate; the signature unit 13 is configured to receive a signature certificate made by a CA center, where the signature certificate includes a public key and an APPID, and digitally sign the application software using a private key to generate an encrypted digest file. In the authentication step, the downloading unit 21 is configured to download signed application software, where the signed application software includes application software, an encrypted digest file, and a signature certificate; the service request receiving unit 22 is configured to receive a service request, where the service request includes an APPID and a PID of the application software, and the terminal queries installation information of the application software according to the PID and obtains a UID of the application software from the installation information; the judging unit 23 is configured to judge whether a corresponding relationship between an APPID, a PID, and a UID of the application software is stored; the signature verification unit 24 is configured to verify the signature certificate by using a public key of the CA center when the corresponding relationship between the APPID, the PID, and the UID of the application software is not stored, acquire a public key from the signature certificate, verify the signature of the signed application software by using the public key to generate a decrypted digest file, and establish and store the corresponding relationship between the APPID, the PID, and the UID of the application software if the signature passes; if the verification fails, returning identification error information of the application software; the processing unit 25 is configured to process the service request and return a service processing result when the corresponding relationship among the APPID, the PID, and the UID of the application software is stored.
In a preferred embodiment of the authentication system of application software of the present invention, the signature unit 13 may digitally sign the application software using RSA algorithm; the signature verification unit 24 may verify the application software using the RSA algorithm.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.