A multi-signature scheme compatible method based on Android system

By presetting multiple sign-in verification solutions in the Android system and parsing APK signature files, the compatibility problem of Android system for APK applications in different signature institutions is solved, ensuring the security and installation convenience of the application.

CN115865359BActive Publication Date: 2024-12-20AITIWEIER ELECTRONICS TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211447493.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2024-12-20
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

The Android system only supports a single sign-up verification solution, which causes inconvenience to the device in production testing and multiple usage scenarios, and is unable to be compatible with APK applications of different signing institutions.

Method used

A variety of sign-in verification schemes are preset in the Android system, each scheme corresponds to a signature institution. By analyzing the APK signature file, the signature institution information is extracted, the corresponding sign-in verification scheme is loaded, the digital certificate and encryption algorithm are verified, and the APK application data hash is decrypted. Value, ensure that the signature verification process cannot be passed and then enters the native installation process.

Benefits of technology

It realizes compatibility with APK applications published by various signing institutions, ensures the security of the application not being tampered with, and improves the convenience of installing APK applications in Android system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115865359B_ABST
    Figure CN115865359B_ABST
Patent Text Reader

Abstract

This invention provides a multi-signature scheme compatibility method based on the Android system, comprising: pre-installing multiple signature verification schemes within the Android system; each signature verification scheme including the encryption algorithm and digital certificate used by the signing authority when signing its released APK application; parsing the APK signature file to extract the signing authority information, thereby obtaining the corresponding signature verification scheme. This invention provides a multi-signature scheme compatibility method based on the Android system, supporting signature verification of APK applications released by various signing authorities within the Android system, ensuring that the APK application has not been tampered with, and thus guaranteeing system security. Therefore, this invention achieves compatibility of the Android system with APK applications released by various signing authorities, improving the convenience of installing various APK applications on the Android system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of system security technology, and in particular relates to a multi-signature scheme compatibility method based on an Android system. Background Art

[0002] With the development of electronic payment technology, smart mobile payment devices based on the Android system have been widely used in various consumption scenarios. To ensure the system security of the device, the system will use signature verification to verify the installed application. Different signature verification schemes use different encryption algorithms and digital certificate formats. In the prior art, the Android system only supports a single signature verification scheme, which brings inconvenience to Android devices during the production test process and in various different usage scenarios. Summary of the invention

[0003] In view of the defects of the prior art, the present invention provides a multi-signature scheme compatibility method based on the Android system, which can effectively solve the above problems.

[0004] The technical solution adopted by the present invention is as follows:

[0005] The present invention provides a multi-signature scheme compatibility method based on an Android system, comprising the following steps:

[0006] Step 1: Multiple signature verification schemes are pre-set in the Android system; each signature verification scheme corresponds to a signature authority, and each signature verification scheme includes the encryption algorithm and digital certificate used by the signature authority to sign the APK application it releases;

[0007] Step 2: When the Android system needs to install an APK application, the Android system starts an application installation service, and the application installation service copies the APK application file corresponding to the APK application to the system-specified directory of the Android system to form an APK backup application file. If the backup is successful, execute step 3; otherwise, execute step 9;

[0008] Step 3, the application installation service uses a data processing tool to read the system specified directory according to the path of the system specified directory, and read the APK backup application file from the system specified directory, parse the APK backup application file, and extract the APK signature file from the APK backup application file; if the APK signature file is extracted successfully, execute step 4; otherwise, execute step 9; wherein the APK signature file includes signature agency information and APK application data hash value ciphertext;

[0009] Step 4, the data processing tool deletes the APK signature file from the APK backup application file to obtain an APK backup application file without the signature; then writes the APK backup application file without the signature into the system specified directory, overwriting the APK backup application file formed in step 2, thereby restoring the APK backup application file to an unsigned APK backup application file. If the restoration is successful, execute step 5; otherwise, execute step 9;

[0010] Step 5, the data processing tool parses the APK signature file extracted in step 3, and extracts signature agency information from the APK signature file;

[0011] The data processing tool searches for various signature verification schemes preset in step 1 according to the extracted signature agency information, and determines whether there is a signature verification scheme corresponding to the extracted signature agency. If so, execute step 6; otherwise, execute step 9;

[0012] Step 6, the data processing tool loads the signature verification scheme corresponding to the extracted signature authority, extracts the digital certificate from the signature verification scheme, and parses the validity period of the digital certificate from the digital certificate, compares the validity period of the digital certificate with the system time of the Android system, and verifies the validity of the digital certificate. If the verification is successful, execute step 7; otherwise, execute step 9;

[0013] Step 7, the data processing tool parses the public key from the digital certificate; the data processing tool extracts the encryption algorithm from the signature verification scheme corresponding to the signature authority extracted in step 5; the data processing tool extracts the APK application data ciphertext from the APK signature file extracted in step 3;

[0014] The data processing tool uses the parsed public key and the extracted encryption algorithm to decrypt the APK application data hash value ciphertext to obtain the APK application data hash value plaintext;

[0015] Then, the data processing tool calculates the hash value of the unsigned APK backup application file obtained in step 4 to obtain the APK backup application data hash value;

[0016] The data processing tool compares the plain text hash value of the APK application data and the hash value of the APK backup application data to see if they are consistent. If they are consistent, execute step 8; otherwise, execute step 9;

[0017] Step 8: If the signature verification of the APK application is successful, the unsigned APK backup application file obtained in step 4 is passed to the native installation process of the Android system, the native installation process of the Android system is entered, and the process ends;

[0018] Step 9: Return the installation failure and installation error information.

[0019] Preferably, the encryption algorithm is an RSA asymmetric encryption algorithm.

[0020] Preferably, the APK application data hash value plaintext is the hash value plaintext of the APK application data summary; the APK backup application data hash value is the hash value of the APK backup application data summary.

[0021] The multi-signature scheme compatibility method based on the Android system provided by the present invention has the following advantages:

[0022] The present invention provides a multi-signature scheme compatibility method based on the Android system, which supports the verification of APK applications issued by various signature agencies in the Android system, ensures that the APK applications have not been tampered with, and further ensures the safety of system use. Therefore, the present invention realizes the compatibility of the Android system with the APK applications issued by various signature agencies, and improves the convenience of installing various APK applications in the Android system. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A flowchart of a multi-signature scheme compatibility method based on the Android system provided by the present invention. DETAILED DESCRIPTION

[0024] In order to make the technical problems, technical solutions and beneficial effects solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0025] The present invention provides a multi-signature scheme compatibility method based on the Android system. During the process of installing an APK application, the APK signature file is parsed, the signature agency information is extracted for distinction, the signature verification schemes corresponding to different signature agencies are loaded, the signed APK application is verified and installed, and the compatibility of the Android system for installing the APK application is provided.

[0026] refer to Figure 1 The present invention provides a multi-signature scheme compatibility method based on the Android system, comprising the following steps:

[0027] Step 1: Preset multiple signature verification schemes in the Android system; each signature verification scheme corresponds to a signing authority, and each signature verification scheme includes an encryption algorithm and a digital certificate used by the signing authority to sign the APK application it releases; the encryption algorithm includes but is not limited to the RSA asymmetric encryption algorithm.

[0028] Step 2: When the Android system needs to install an APK application, the Android system starts an application installation service, and the application installation service copies the APK application file corresponding to the APK application to the system-specified directory of the Android system to form an APK backup application file. If the backup is successful, execute step 3; otherwise, execute step 9;

[0029] Step 3, the application installation service uses a data processing tool to read the system specified directory according to the path of the system specified directory, and read the APK backup application file from the system specified directory, parse the APK backup application file, and extract the APK signature file from the APK backup application file; if the APK signature file is extracted successfully, execute step 4; otherwise, execute step 9; wherein the APK signature file includes signature agency information and APK application data hash value ciphertext;

[0030] Step 4, the data processing tool deletes the APK signature file from the APK backup application file to obtain an APK backup application file without the signature; then writes the APK backup application file without the signature into the system specified directory, overwriting the APK backup application file formed in step 2, thereby restoring the APK backup application file to an unsigned APK backup application file. If the restoration is successful, execute step 5; otherwise, execute step 9;

[0031] Step 5, the data processing tool parses the APK signature file extracted in step 3, and extracts signature agency information from the APK signature file;

[0032] The data processing tool searches for various signature verification schemes preset in step 1 according to the extracted signature agency information, and determines whether there is a signature verification scheme corresponding to the extracted signature agency. If so, execute step 6; otherwise, execute step 9;

[0033] Step 6, the data processing tool loads the signature verification scheme corresponding to the extracted signature authority, extracts the digital certificate from the signature verification scheme, and parses the validity period of the digital certificate from the digital certificate, compares the validity period of the digital certificate with the system time of the Android system, and verifies the validity of the digital certificate. If the verification is successful, execute step 7; otherwise, execute step 9;

[0034] Step 7, the data processing tool parses the public key from the digital certificate; the data processing tool extracts the encryption algorithm from the signature verification scheme corresponding to the signature authority extracted in step 5; the data processing tool extracts the APK application data ciphertext from the APK signature file extracted in step 3;

[0035] The data processing tool uses the parsed public key and the extracted encryption algorithm to decrypt the APK application data hash value ciphertext to obtain the APK application data hash value plaintext;

[0036] Then, the data processing tool calculates the hash value of the unsigned APK backup application file obtained in step 4 to obtain the APK backup application data hash value;

[0037] The data processing tool compares the plain text hash value of the APK application data and the hash value of the APK backup application data to see if they are consistent. If they are consistent, execute step 8; otherwise, execute step 9;

[0038] As a specific implementation manner, the APK application data hash value plaintext is the hash value plaintext of the APK application data summary; the APK backup application data hash value is the hash value of the APK backup application data summary.

[0039] Step 8: If the signature verification of the APK application is successful, the unsigned APK backup application file obtained in step 4 is passed to the native installation process of the Android system, the native installation process of the Android system is entered, and the process ends;

[0040] Step 9: Return the installation failure and installation error information.

[0041] The present invention provides a multi-signature scheme compatibility method based on the Android system, which supports the verification of APK applications issued by various signature agencies in the Android system, ensures that the APK applications have not been tampered with, and further ensures the safety of system use. Therefore, the present invention realizes the compatibility of the Android system with the APK applications issued by various signature agencies, and improves the convenience of installing various APK applications in the Android system.

[0042] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be considered as the scope of protection of the present invention.

Claims

1. A multi-signature scheme compatibility method based on Android system, characterized in that: The following steps are involved: Step 1: Multiple signature verification schemes are pre-set in the Android system; each signature verification scheme corresponds to a signature authority, and each signature verification scheme includes the encryption algorithm and digital certificate used by the signature authority to sign the APK application it releases; Step 2: When the Android system needs to install an APK application, the Android system starts an application installation service, and the application installation service copies the APK application file corresponding to the APK application to the system-specified directory of the Android system to form an APK backup application file. If the backup is successful, execute step 3; otherwise, execute step 9; Step 3, the application installation service uses a data processing tool to read the system specified directory according to the path of the system specified directory, and read the APK backup application file from the system specified directory, parse the APK backup application file, and extract the APK signature file from the APK backup application file; if the APK signature file is extracted successfully, execute step 4; otherwise, execute step 9; wherein the APK signature file includes signature agency information and APK application data hash value ciphertext; Step 4, the data processing tool deletes the APK signature file from the APK backup application file to obtain an APK backup application file without the signature; then writes the APK backup application file without the signature into the system specified directory, overwriting the APK backup application file formed in step 2, thereby restoring the APK backup application file to an unsigned APK backup application file. If the restoration is successful, execute step 5; otherwise, execute step 9; Step 5, the data processing tool parses the APK signature file extracted in step 3, and extracts signature agency information from the APK signature file; The data processing tool searches for various signature verification schemes preset in step 1 according to the extracted signature agency information, and determines whether there is a signature verification scheme corresponding to the extracted signature agency. If so, execute step 6; otherwise, execute step 9; Step 6, the data processing tool loads the signature verification scheme corresponding to the extracted signature authority, extracts the digital certificate from the signature verification scheme, and parses the validity period of the digital certificate from the digital certificate, compares the validity period of the digital certificate with the system time of the Android system, and verifies the validity of the digital certificate. If the verification is successful, execute step 7; otherwise, execute step 9; Step 7, the data processing tool parses the public key from the digital certificate; the data processing tool extracts the encryption algorithm from the signature verification scheme corresponding to the signature authority extracted in step 5; the data processing tool extracts the APK application data ciphertext from the APK signature file extracted in step 3; The data processing tool uses the parsed public key and the extracted encryption algorithm to decrypt the APK application data hash value ciphertext to obtain the APK application data hash value plaintext; Then, the data processing tool calculates the hash value of the unsigned APK backup application file obtained in step 4 to obtain the APK backup application data hash value; The data processing tool compares the plain text hash value of the APK application data and the hash value of the APK backup application data to see if they are consistent. If they are consistent, execute step 8; otherwise, execute step 9; Step 8: If the signature verification of the APK application is successful, the unsigned APK backup application file obtained in step 4 is passed to the native installation process of the Android system, the native installation process of the Android system is entered, and the process ends; Step 9: Return the installation failure and installation error information.

2. A multi-signature scheme compatibility method based on Android system according to claim 1, characterized in that: The encryption algorithm is the RSA asymmetric encryption algorithm.

3. The multi-signature scheme compatibility method based on Android system according to claim 1, characterized in that: The APK application data hash value plaintext is the hash value plaintext of the APK application data summary; the APK backup application data hash value is the hash value of the APK backup application data summary.

Citation Information

Patent Citations

  • Service signature method and device compatible with Android application

    CN104092544A

  • APK (Android Package) security management and control method for Android intelligent equipment

    CN110851821A