POS terminal application hierarchical management and control method and system
By introducing a three-tier certificate system into the POS terminal management system for hierarchical control, the problems of inflexible signature processes and high maintenance costs in existing technologies have been solved, enabling flexible management of terminal applications and reducing operating costs.
Patent Information
- Application Number
- CN202111627841.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2041-12-28
AI Technical Summary
The signing process for application packages in existing POS terminal management systems is inflexible, resulting in high operating and maintenance costs and requiring frequent communication with manufacturers, which increases communication and inventory risks.
A three-tier certificate system is adopted for hierarchical management, including super administrator, administrator and user. By generating and issuing different certificates and private keys, virtual hierarchical management of terminals is realized. Administrators and users are allowed to independently sign and install application packages, while super administrators are responsible for initialization and grouping.
It reduces communication and maintenance costs for manufacturers and distributors, increases distributors' delivery speed, reduces inventory risk, and enables distributed management and granular control of end-user applications.
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a method for grading and installing and controlling applications of each entity in a POS terminal management system, in particular to a method for virtually grading and installing and controlling Android applications in a POS terminal management system. BACKGROUND
[0002] POS (Point of sales) means "sales point" in Chinese, and its full name is a sales point information management system. It is a terminal reader with bar code or OCR code technology, and has cash or barter payment function. Its main task is to provide data services and management functions for commodity and media transactions, and to carry out non-cash settlement. POS is a multifunctional terminal. When it is installed in the special merchant of credit card and the network point connected with computer network, it can realize automatic transfer of electronic funds. It has the functions of supporting consumption, pre-authorization, balance inquiry and transfer, and is safe, fast and reliable to use. In bulk transactions, it is difficult to obtain basic business information. The main purpose of introducing POS system is to solve the information management blind spot of retail industry. It is an important part of the management information system of chain stores.
[0003] The existing intelligent terminal (Point of Sale, POS) widely uses Android system. The application program of Android system is called application package. In order to ensure the security of terminal application program, each terminal manufacturer needs to customize and sign it, so that only the legal signed application package program can be allowed to be installed and executed.
[0004] As prior art 1: CN201710811612.2 discloses a method and system for verifying the signature of a POS machine application package, comprising: S1: the acquirer generates a working certificate and a first root certificate request file according to the root certificate; S2: the acquirer sends the first root certificate request file to the POS machine manufacturer, and the POS machine manufacturer manages the first root certificate request file according to the manufacturer's certificate chain and imports it into the POS machine; S3: the acquirer uses the working certificate to sign the original application package file to generate a signed application package file; S4: the POS machine verifies the legality of the signed application package file. Through the above method, the terminal device application package is strictly verified, the independence of the signature certificate chain of each acquirer is ensured, and the application package signature certificate chain is verified and managed through the manufacturer's certificate chain. However, in the actual application environment of the POS machine, the manufacturer is ordered by the agent after receiving the user's demand, because each user needs to maintain independence and is not allowed to cut each other, the agent must apply for customizing the terminal with a signature to the manufacturer every time a user is added, and the manufacturer cannot directly use the inventory terminal, which increases the communication cost and inventory risk of the manufacturer and the agent, and different application package signature systems need to be maintained, which is not flexible and has high operation and maintenance cost.
[0005] As prior art 2: CN202011013643.1 provides a security verification method for application package signature information, applied to a POS machine, the POS machine is packaged with a root certificate of a CA library, the method comprises the following steps: obtaining a client signature certificate and a client signature certificate installation request; the legality of the client signature certificate is verified through the root certificate packaged in the POS machine; wherein, the legal client signature certificate is obtained by the child certificate signature private key corresponding to the root certificate; if the client signature certificate is verified to be legal, the client signature certificate is installed and added to the trusted certificate list. The technical solution is the same as prior art 1, and a manufacturer application step is needed when used (see specification
[0045] ), and the main problem is the same as prior art 1, and the technical solution is not flexible and has high operation and maintenance cost.
[0006] Therefore, the applicant proposes a POS machine terminal application hierarchical management method and system to solve the technical problems of prior art that are not flexible and have high operation and maintenance cost. SUMMARY
[0007] (I) Technical solution
[0008] The application achieves the following technical solution: a POS machine terminal application hierarchical management method, the hierarchical management comprises: user level, administrator level, and super administrator level;
[0009] The method comprises:
[0010] The administrator generates a first certificate;
[0011] The administrator generates a second certificate based on the first certificate;
[0012] The super administrator issues a third certificate based on the first certificate;
[0013] The super administrator initializes the terminal based on the second certificate and the third certificate;
[0014] The administrator generates a fourth certificate based on the first certificate;
[0015] Sign the application package;
[0016] Verify the signature and install the application package.
[0017] As a further description of the above scheme, the first certificate is generated by the administrator, including the administrator self-signed root certificate, the administrator root certificate, and the administrator root certificate CSR;
[0018] The fourth certificate includes a user's signed certificate and private key.
[0019] As a further description of the above scheme, the administrator generates a second certificate based on the first certificate, specifically
[0020] The administrator uses the first certificate to issue the second certificate,
[0021] The administrator issues the first certificate and the second certificate to the super administrator.
[0022] As a further description of the above scheme, the second certificate includes an administrator signed certificate and private key.
[0023] As a further description of the above scheme, the super administrator initializes the terminal based on the second certificate and the third certificate, specifically:
[0024] The super administrator issues a third certificate according to the first certificate;
[0025] The super administrator initializes the terminal using the second certificate and the third certificate;
[0026] After initialization, the terminal belongs to the administrator and only allows the administrator to operate the terminal.
[0027] As a further description of the above scheme, the third certificate is a terminal root certificate.
[0028] As a further description of the above scheme, the first certificate includes an administrator root certificate;
[0029] The signing of the application package is specifically:
[0030] The signing of the application package specifically includes the following steps:
[0031] The administrator / user uses the second certificate / fourth certificate as a signature certificate to sign the application package, obtains signature data sign, and then packs the signature data together with the administrator root certificate and the signature certificate into a signature file SGN;
[0032] Insert the signature file SGN into the original application package to generate a signed application package.
[0033] As a further description of the above scheme, the verification of the signed installation application package specifically includes:
[0034] The administrator root certificate, the signature certificate, and the signature data in the application package are parsed out;
[0035] The parsed administrator root certificate is verified for legality using the terminal root certificate, and if the verification fails, the application package is illegal, and the signature verification is terminated;
[0036] If the signature verification is successful, the legality of the signature certificate is verified using the administrator root certificate, and if the verification fails, the application package is illegal, and the signature verification is terminated;
[0037] The signature certificate and the signature data are used for signature verification, and if the signature verification fails, the signature verification is terminated;
[0038] The second certificate in the terminal is used to verify whether the signer of the application package is an administrator, and if the signer is an administrator, the application package verification is successful;
[0039] If the signer is not an administrator, it is checked whether the terminal belongs to a certain user; if it exists, it is checked whether the signer is the user to which the terminal belongs, and if the signer is not the user to which the terminal belongs, the signature verification is terminated;
[0040] If the terminal does not have a user signature certificate, the current application package signature certificate is saved to the terminal and set as read-only, and it is determined that the terminal belongs to the signer of the application package and cannot be changed;
[0041] After the signature verification is passed, the installation of the application package is started.
[0042] The application also proposes a POS terminal application hierarchical management and control system, and the hierarchical management and control includes a user level, an administrator level, and a super administrator level.
[0043] The super administrator initializes the terminal according to the needs of the administrator and divides it into a corresponding virtual administrator hierarchy.
[0044] The administrator manages the users, and a pair of signature secret keys and certificates are issued to each newly added user for use; the users remain independent and cannot switch to each other.
[0045] As a further illustration of the above solution, the system controls the virtual hierarchy based on X509 certificate.
[0046] (III) Advantages
[0047] The present application has the following advantages over the prior art:
[0048] In order to solve the deficiencies in the existing POS terminal management system, the present application provides a terminal hierarchical management method and system, which creates three virtual hierarchies including a super administrator, an administrator and a user, with a one-to-many relationship between the upper and lower levels, and independent between the same levels. The application signature of the administrator level and the user level is set. The super administrator initializes the terminal division to the corresponding administrator group according to the request of the administrator. The application signed by the administrator level can be installed on all terminals under the administrator, and the application signed by the user level can only be installed on the corresponding user terminal, such as the application signed by user A can only be installed on the terminal of user A.
[0049] The POS machine agent acts as an administrator level, the user of the agent acts as a user level, and the manufacturer acts as a super administrator, which only needs to customize the terminal root certificate for the agent. The user level is signed by the administrator. After the agent orders a batch of terminals from the manufacturer, a new user agent can directly distribute from the inventory without going through the manufacturer. This technical solution realizes the hierarchical management of manufacturers, agents and users, improves the delivery speed of agents and reduces the inventory risk, and reduces the terminal maintenance cost of manufacturers and agents. DETAILED DESCRIPTION
[0050] Embodiment
[0051] A POS terminal application hierarchical management method, the hierarchy includes a super administrator, an administrator and a user;
[0052] The method comprises:
[0053] Generating a first certificate; it needs to be further explained that the first certificate is generated by the administrator, including the administrator self-signed root certificate, the administrator root certificate private key and the administrator root certificate CSR.
[0054] Generating a second certificate based on the first certificate; the administrator uses the first certificate to issue a second certificate, and the administrator sends the first certificate and the second certificate to the super administrator. It needs to be further explained that the second certificate includes an administrator signature certificate and a private key. The administrator uses the administrator root certificate and the administrator root certificate private key to issue a pair of administrator signature certificate and private key.
[0055] The third certificate is a terminal root certificate, which is issued by the super administrator according to the administrator root certificate CSR.
[0056] The terminal is initialized based on the second certificate and the third certificate. The super administrator issues the third certificate according to the first certificate. The super administrator initializes the terminal using the terminal root certificate and the administrator signature certificate. After the initialization, the terminal belongs to the administrator, and only the administrator is allowed to install applications on the terminal.
[0057] The fourth certificate is generated based on the first certificate. The fourth certificate includes a user signature certificate and a private key. The administrator uses the management root certificate and the administrator root certificate private key to issue the user signature certificate and the private key.
[0058] The application package is signed. Specifically, the administrator / user uses the second certificate / fourth certificate as a signature certificate to sign the application package, obtains signature data sign, and then packs the signature data together with the administrator root certificate and the signature certificate into a signature file SGN. The signature file SGN is inserted into the original application package to generate a signed application package. It should be noted that the signature can be a user or an administrator. The administrator uses the management root certificate and the administrator root certificate private key to issue the user signature certificate and the private key, i.e., the fourth certificate. The administrator generates the fourth certificate and sends it to the user together with the terminal. The user uses the certificate and the private key obtained from the administrator to sign the application package, obtains a user signature application, and installs it on the terminal. After the installation is successful, the terminal saves a user signature certificate in the terminal. At this time, the terminal belongs to the user and the administrator of the user, and only the administrator and the user are allowed to install applications on the terminal. Other users and other administrators cannot install applications issued by other users and other administrators. Specifically, the administrator or the user uses the signature certificate and the private key to sign the application package, obtains signature data sign, and then packs the signature data together with the signature certificate and the administrator root certificate into a signature file SGN. The signature file SGN is inserted into the original application package to generate a signed application package.
[0059] The application package is installed after the signature is verified. In this embodiment, the specific steps are as follows:
[0060] 1. The entire application package file is read as a byte stream, the SGN file is found according to the signature rule, the administrator root certificate, the signature certificate, and the signature data are parsed out;
[0061] 2. The legality of the parsed administrator root certificate is verified using the terminal root certificate. If the verification fails, the application package is illegal, and the signature verification is terminated. If the signature verification is successful, the legality of the signature certificate is verified using the administrator root certificate. If the verification fails, the application package is illegal, and the signature verification is terminated;
[0062] 3. The application package byte stream without the SGN file is used as the original text, and the signature certificate and the signature data are used for signature verification. If the signature verification fails, the signature verification is terminated;
[0063] 4. The terminal administrator signature certificate is used to verify whether the application package signer is an administrator. If the signer is an administrator, the application package verification is successful;
[0064] 5. If the signer is not an administrator, it is checked whether the terminal belongs to a certain user, i.e., whether the terminal exists a user signature certificate. If the terminal exists a user signature certificate, it is checked whether the signer is the user to which the terminal belongs. If the signer is not the user to which the terminal belongs, the signature verification is terminated;
[0065] 6. If the terminal does not exist a user signature certificate, it is indicated that the current application package is the first non-administrator signed application that passes the signature verification in the terminal. The current application package signature certificate is saved to the terminal and is set as read-only. It is determined that the terminal belongs to the signer of the application package and cannot be changed.
[0066] 7. After the signature verification, the application package is installed.
[0067] The embodiment has the following advantages:
[0068] (1) The terminal management system virtual grading scheme uses three-level certificates to virtually grade the three entities in the POS terminal management system, i.e., manufacturers, agents, and users, into super administrators, administrators, and users. The super administrator issues terminal root certificates to the administrators, and the administrators authorize the users to sign certificates.
[0069] (2) The terminal application grading and signature verification scheme divides the terminal into corresponding administrator groups after initialization. The first terminal that passes the signature verification of the non-administrator signed application is identified as the user of the terminal. The terminal authorized for use by the user belongs to one and only one administrator and user. Only the administrator and the user have the right to install applications on the terminal.
[0070] Embodiment 2
[0071] A POS terminal application grading and control system, which includes the following levels: user level, administrator level, and super administrator level.
[0072] The super administrator initializes the terminal according to the needs of the administrator and divides it into corresponding virtual administrator levels.
[0073] The administrator manages the users and issues a pair of signature keys to each newly added user. The users remain independent and cannot switch with each other.
[0074] The system virtually grades and controls based on X509 certificates.
[0075] The POS terminal application grading and control system of this scheme virtually grades based on X509 certificates without increasing the cost of hardware devices. It distributes the task of terminal application installation and control from manufacturers to subordinate management units, realizes distributed and fine-grained control of terminal application installation, overcomes the deficiency of the traditional terminal management system that the agent must apply for customized signature from the manufacturer every time a user is added, reduces the communication cost of manufacturers and agents and the cost of terminal maintenance, and improves the marketing efficiency of the POS terminal management system.
[0076] The system creates three virtual hierarchical levels including super administrator, administrator and user, the super administrator initializes the terminal according to the needs of the administrator; the administrator manages the user, and issues a pair of signature keys to the user for use every time a user is added; the users remain independent and cannot cut each other's machines. The terminal has only the super administrator permission to process before it is initialized after leaving the factory, the super administrator initializes the terminal to the corresponding virtual administrator hierarchy according to the administrator's request, the administrator gets the terminal and authorizes the user to use by issuing user signature keys, and finally the terminal authorized to the user will belong to one and only one administrator and user, only the administrator and user have the permission to install the application on the terminal.
[0077] The hierarchical management system of the scheme does not increase the cost of hardware devices, and realizes virtual hierarchy based on the X509 certificate three-level certificate system, the entity holding the terminal root certificate and private key is the super administrator of the terminal, the entity holding the administrator root certificate and private key is the administrator of the terminal, and the entity holding the signature certificate and private key is the user, wherein the administrator also holds the administrator signature certificate and has user permission.
[0078] The above shows and describes the basic principles and main features of the present application and the advantages of the present application, for those skilled in the art, it is obvious that the present application is not limited to the details of the above exemplary embodiments, and the present application can be realized in other specific forms without departing from the spirit or essential characteristics of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting, the scope of the present application is defined by the appended claims rather than the above description, therefore all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present application.
[0079] In addition, it should be understood that although the present specification is described in terms of embodiments, not every embodiment contains only one independent technical solution, the description manner of the specification is only for the sake of clarity, those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can also be properly combined to form other embodiments which can be understood by those skilled in the art.
Claims
1. A POS terminal application hierarchical management and control method, characterized by, The hierarchical management includes user level, administrator level and super administrator level; The method comprises: The administrator level generates a first certificate; The administrator level generates a second certificate based on the first certificate; The super administrator level issues a third certificate based on the first certificate; The super administrator level performs terminal initialization based on the second certificate and the third certificate; The administrator level generates a fourth certificate based on the first certificate; Signing the application package; Verifying and installing the application package with signature; The application package signing specifically comprises the following steps: The administrator / user uses the second certificate / fourth certificate as a signature certificate to sign the application package to obtain signature data sign, and then packs the signature data together with the administrator root certificate and the signature certificate into a signature file SGN; Insert the signature file SGN into the original application package to generate a signed application package; The verification and installation of the application package with signature specifically comprises: Parse the administrator root certificate, signature certificate and signature data in the application package; Verify the legality of the parsed administrator root certificate using the terminal root certificate, and if it fails, the application package is illegal and the signature verification is terminated; If the signature verification is successful, verify the legality of the signature certificate using the administrator root certificate, and if it fails, the application package is illegal and the signature verification is terminated; Perform signature verification operation using the signature certificate and the signature data, and if the signature verification fails, terminate the signature verification; Verify whether the signer of the application package is an administrator using the second certificate in the terminal, and if the signer is an administrator, the application package verification is successful; If the signer is not an administrator, check whether the terminal belongs to a certain user; if it exists, check whether the signer is the user to which the terminal belongs, and if the signer is not the user to which the terminal belongs, terminate the signature verification; If the terminal does not have a user signature certificate, save the current application package signature certificate to the terminal and set it to read-only, and determine that the terminal belongs to the signer of this application package and cannot be changed; After the signature verification is passed, start installing the application package.
2. The POS terminal application hierarchical management method according to claim 1, wherein The first certificate is generated by the administrator and includes an administrator self-signed root certificate, an administrator root certificate and an administrator root certificate CSR; The fourth certificate includes a user signature certificate and a private key.
3. The POS terminal application hierarchical management method according to claim 1, wherein The administrator level generates a second certificate based on the first certificate specifically: The administrator uses the first certificate to issue the second certificate, The administrator issues the first certificate and the second certificate to the super administrator.
4. The POS terminal application hierarchical management method according to claim 1 or 3, wherein The second certificate includes an administrator signature certificate and a private key.
5. The POS terminal application hierarchical management method according to claim 1, wherein The super administrator level performs terminal initialization based on the second certificate and the third certificate specifically: The super administrator issues a third certificate according to the first certificate; The super administrator initializes the terminal using the second certificate and the third certificate; After the initialization, the terminal belongs to the administrator and only the administrator is allowed to operate the terminal.
6. The method according to claim 1 or 5, characterized in that, The third certificate is a terminal root certificate.
7. The method according to claim 1, characterized in that, The first certificate comprises an administrator root certificate.
Citation Information
Patent Citations
Security verification methods, devices, and POS machines for APK signature information
CN112134711B
Method and system for checking APK signatures of POS (Point of Sale) machines
CN107769924A
Management device, specification program, specification method and management system
JP2019164683A