Software package publishing method and device, non-volatile storage medium, and electronic device
Through dual identity authentication of smart card devices between the client device and the server, the problem of low security in the software package publishing process is solved, and higher verification intensity and security are achieved.
Patent Information
- Application Number
- CN202411063190.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-08-05
AI Technical Summary
Existing software package publishing technologies have low security issues during the distribution process, mainly due to low verification intensity, which may cause software packages to be tampered with or have malicious code implanted.
When the client device detects the access of the smart card device, the first identity authentication is performed, and the second identity authentication is performed through the server to ensure that the source code of the software package is encrypted and verified during the publishing process, and to improve the verification of the publishing device. strength.
By strengthening the identity authentication of smart card devices, the security during the software package release process is improved, preventing tampering and malicious code implantation, and improving the overall security.
Smart Images

Figure CN118585241B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for publishing a software package, a non-volatile storage medium, and an electronic device. Background Art
[0002] In the field of software development, software package release is an important link. Software package release involves integrating, packaging and distributing various components of the software (such as source code, binary files, library files, etc.). The main purpose of software package release is to facilitate the installation, update and maintenance of the software, while ensuring the compatibility of the software on different operating systems and hardware platforms. Although the existing software package release technology is relatively mature, there are still some problems and challenges. That is, the software package may be tampered with or implanted with malicious code during the distribution process, which brings security risks to users.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method and apparatus for publishing a software package, a non-volatile storage medium, and an electronic device, so as to at least solve the technical problem that the security is low in the process of publishing the software package due to the low verification strength of the publishing device in the process of publishing the software package in the related technology.
[0005] According to one aspect of an embodiment of the present application, a method for publishing a software package is provided, comprising: when a client device detects that a smart card device is connected to the client device, the client device performs a first identity authentication on the smart card device; after completing the first identity authentication on the smart card device, receiving and responding to a publishing instruction, sending a request instruction to a server, wherein the request instruction is used to request the source code of the software package to be published, the server is used to receive and respond to the request instruction, perform a second identity authentication on the smart card device, and after completing the second identity authentication on the smart card device, send a compiled target source code corresponding to the request instruction to the client device; the client device encapsulates the target source code to obtain a software package, and publishes the software package.
[0006] Optionally, the client device performs a first identity authentication on the smart card device, including: obtaining identification information of the smart card device, and determining, based on the identification information of the smart card device, whether the smart card device has completed registration before the client device detects that the smart card device is connected to the client device, wherein the identification information includes: an identity identification of a chip of the smart card device; if it is determined that the smart card device has completed registration before the client device detects that the smart card device is connected to the client device, the client device randomly generates a first key, wherein the smart card device is used to randomly generate a key pair, the key pair includes: a private key and a public key, and the smart card device is also used to send the public key to the client device and store the private key in the smart card device; for the first The key is obfuscated to obtain an obfuscated key, and the obfuscated key is encrypted with a public key to obtain a target key, wherein the length of the obfuscated key is greater than the length of the first key; the private key stored in the smart card device is obtained, and the target key is decrypted with the private key, and the key obtained by the decryption is obfuscated and extracted according to a preset obfuscation extraction algorithm to obtain a second key; the second key is encrypted with the private key to obtain a first target ciphertext, and the first target ciphertext is decrypted with the public key to obtain a first target key; it is determined whether the first target key is consistent with the first key, and when the first target key is consistent with the first key, it is determined that the smart card device has passed the first identity authentication.
[0007] Optionally, the client device runs a publishing platform, which includes: an authentication center and a target software module; before the client device performs a first identity authentication on the smart card device, the method also includes: the authentication center obtains the first identification information of the authorized smart card device, and stores the first identification information in a target storage area in the authentication center, wherein the smart card device is used to randomly generate a key pair, the key pair includes: a private key and a public key, the smart card device is also used to send the public key to the authentication center, and store the private key in the smart card device; the authentication center stores the public key in the target storage area, and establishes a first association relationship between the public key and the first identification information.
[0008] Optionally, the client device performs a first identity authentication on the smart card device, including: using the target software module to obtain the identification information of the smart card device, and sending the identification information to the authentication center; using the authentication center to query whether there is first identification information consistent with the identification information in the target storage area; if the first identification information consistent with the identification information is found in the target storage area, the authentication center randomly generates a 16-bit first key through a key algorithm; according to a preset obfuscation encryption algorithm, the 16-bit intermediate key is obfuscated to obtain a 4096-bit obfuscated key; according to the identification information and the first association relationship, the public key corresponding to the identification information is determined in the authentication center; the 4096-bit mixed key is ciphered by the public key The target key is encrypted and processed to obtain the target key; the authentication center sends the target key to the target software module; the target software module uses the private key stored inside the smart card device to decrypt the target key, and according to the preset obfuscation extraction algorithm, performs obfuscation extraction on the key obtained by the decryption process to obtain a 16-bit second key; the target software module uses the private key to encrypt the 16-bit second key to obtain a first target ciphertext, and sends the first target ciphertext to the authentication center; the authentication center uses the public key to decrypt the first target ciphertext to obtain a first target key; it is determined whether the first target key is consistent with the first key, and when the first target key is consistent with the first key, it is determined that the smart card device has passed the first identity authentication.
[0009] Optionally, before sending a request instruction to the server, the method also includes: sending a trust module to the server, wherein the server is used to add the trust module to the authentication module of the server's operating system; obtaining and storing the authorized identity identification information of the authorized server, and storing the authorized identity identification information to a target storage area in the authentication center.
[0010] Optionally, before sending a request instruction to the server, the method also includes: receiving the first identity identification information sent by the server for the first time, and after receiving the first identity identification information sent by the server for the first time, performing the following steps: the target software module sends the received first identity identification information to the authentication center; the authentication center encrypts the first identity identification information by using the public key stored in the authentication center, and sends the encrypted first identity identification information to the target software module; the target software module decrypts the encrypted first identity identification information by using the private key stored in the smart card device to obtain the first target identity identification information, wherein the first target identity identification information includes: user name and password.
[0011] Optionally, a request instruction is sent to the server, including: the target software module generates a first random number, and sends the request instruction to the trust module, wherein the request instruction includes: the first random number and the first target identity identification information, the trust module is used to call the system application program interface, modify the password to the first random number to obtain the first password, and send the first password to the authentication module, the authentication module is used to perform a second identity authentication on the smart card device through the first password and the user name.
[0012] Optionally, the first identity identification information sent by the server is received for the ath time, and after the first identity identification information sent by the server is received for the ath time, the following steps are performed, wherein a is a positive integer not greater than n1, n1 is a positive integer greater than 1, and a is 2 to n1 respectively: the target software module sends the received first identity identification information to the authentication center; the authentication center encrypts the first identity identification information by using the public key stored in the authentication center, and sends the encrypted first identity identification information to the target software module; the target software module decrypts the encrypted first identity identification information by using the private key stored in the smart card device to obtain the first target identity identification information, wherein the first target identity identification information includes: a user name and an a-1th password.
[0013] Optionally, a request instruction is sent to the server, including: the target software module generates the ath random number, and sends the request instruction to the trust module, wherein the request instruction includes: the ath random number and the first target identity identification information, the trust module is used to call the system application program interface, modify the a-1th password to the ath random number to obtain the ath password, and send the ath password to the authentication module, the authentication module is used to perform a second identity authentication on the smart card device through the first password and the user name.
[0014] Optionally, before the target software module receives the first identity information sent by the server, the method also includes: the authentication center verifies whether the second identity information of the smart card device is legal, and if the second identity information is illegal, determines that the authentication of the smart card device has failed; if the second identity information is legal, the authentication center verifies whether the second identity information of the smart card device is valid, and if the second identity information is invalid, determines that the authentication of the smart card device has failed; if the second identity information is valid, the authentication center verifies whether authorized identity information consistent with the first identity information is found in the target storage area; if authorized identity information consistent with the first identity information is found in the target storage area, checks whether the hardware unique identification information of the smart card device corresponds to the hardware unique identification information of the server, and if there is no corresponding relationship between the hardware unique identification information of the smart card device and the hardware unique identification information of the server, determines that the authentication of the smart card device has failed; if authorized identity information consistent with the first identity information is not found in the target storage area, determines that the authentication of the smart card device has failed.
[0015] Optionally, the authentication center verifies whether the second identity information of the smart card device is valid, including: detecting the connection status between the smart card device and the client device, and if the smart card device is not connected to the client device, determining that the second identity information of the smart card device is invalid; detecting whether the login credentials of the smart card device expire after the smart card device is connected to the client device, and if so, determining that the second identity information of the smart card device is invalid.
[0016] Optionally, the number of publishing platforms is one or more, wherein, when the number of publishing platforms is more than one, each publishing platform is used to simultaneously package the target source code into a software package and publish the software package.
[0017] Optionally, execute the u-th test process in the first round of testing, wherein u is a positive integer not greater than n2, n2 is a positive integer greater than 1, and u is 1 to n2 sequentially: when u=1, execute the following steps: randomly select an interface to be tested in the first sampling pool, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to a preset safety zone to generate a first safety zone, send the second interface among the tested interfaces to a preset danger zone to generate a first danger zone, wherein the first interface is a tested interface whose test result meets a first preset requirement, and the first preset requirement includes: a test success rate greater than a first preset percentage, a number of consecutive test successes greater than a first preset value, and a cumulative number of test successes greater than a second preset value; the second interface is a tested interface whose test result does not meet a second preset requirement, and the second preset requirement includes: a test failure rate greater than The second preset percentage and / or the number of consecutive test failures is greater than the third preset value and / or the cumulative number of test failures is greater than the fourth preset value; when u>1, perform the following steps: randomly select an interface to be tested in the u-1th danger zone, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to the u-1th safety zone to generate the uth safety zone, send the second interface among the tested interfaces to the u-1th danger zone to generate the uth danger zone; determine the moment when the n2th test is completed as the first moment, and at a second moment with a preset time distance from the first moment, randomly select an interface to be tested in the n2th safety zone, test the software package using the interface to be tested to obtain a tested interface, retain the first interface among the tested interfaces in the n2th safety zone, send the second interface among the tested interfaces to the n2th danger zone, and generate a second sampling pool.
[0018] Optionally, execute the kth round of testing process, wherein for the vth test in the kth round, execute the following steps: wherein k is a positive integer not greater than n3, n3 is a positive integer greater than 2, k is sequentially 2 to n3, v is a positive integer not greater than n4, n4 is a positive integer greater than 2, and v is sequentially 1 to n4: when v=1, execute the following steps: randomly select an interface to be tested from the kth sampling pool, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to a preset safety zone to generate the first safety zone, send the second interface among the tested interfaces to a preset danger zone to generate the first danger zone; when v>1, execute the following steps sequentially: randomly select an interface to be tested from the v-1th danger zone, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to the v-1th safety zone to generate the vth safety zone, send the second interface among the tested interfaces to the v-1th danger zone to generate the vth danger zone; The moment when the kth round of testing is completed is determined as the third moment. At a fourth moment with a preset time length from the third moment, a to-be-tested interface is randomly selected in the n4th safety zone, and the software package is tested using the to-be-tested interface to obtain a tested interface. The first interface among the tested interfaces is retained in the n4th safety zone, and the second interface among the tested interfaces is sent to the n4th danger zone to generate the k+1th sampling pool.
[0019] According to another aspect of the embodiment of the present application, a method for publishing a software package is also provided, including: a server receives a request instruction sent by a client device, wherein the client device is used to perform a first identity authentication on the smart card device when the client device detects that the smart card device is connected to the client device, and is also used to receive and respond to the publishing instruction after completing the first identity authentication of the smart card device, and send a request instruction to the server, wherein the request instruction is used to request the source code of the software package to be published; the server performs a second identity authentication on the smart card device in response to the request instruction, and after completing the second identity authentication of the smart card device, sends a compiled target source code corresponding to the request instruction to the client device, wherein the client device is used to encapsulate the target source code to obtain the software package, and publish the software package.
[0020] According to another aspect of the embodiment of the present application, a software package publishing device is also provided, including: an authentication module, which is used to perform a first identity authentication on the smart card device when the client device detects that the smart card device is connected to the client device; a sending module, which is used to receive and respond to a publishing instruction after completing the first identity authentication of the smart card device, and send a request instruction to a server, wherein the request instruction is used to request the source code of the software package to be published, and the server is used to receive and respond to the request instruction, perform a second identity authentication on the smart card device, and after completing the second identity authentication of the smart card device, send a compiled target source code corresponding to the request instruction to the client device; and a publishing module, which is used for the client device to package the target source code into a software package and publish the software package.
[0021] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, the storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the above software package publishing method.
[0022] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including: a memory and a processor, the processor being configured to run a program stored in the memory, wherein the above software package publishing method is executed when the program is run.
[0023] According to yet another aspect of the embodiments of the present application, a computer program is further provided, wherein when the computer program is executed by a processor, the above software package publishing method is implemented.
[0024] According to another aspect of the embodiments of the present application, a computer program product is provided, which includes a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above software package publishing method is implemented.
[0025] In an embodiment of the present application, when a client device detects that a smart card device is connected to the client device, the client device performs a first identity authentication on the smart card device; after completing the first identity authentication on the smart card device, the client device receives and responds to a publishing instruction, and sends a request instruction to the server, wherein the request instruction is used to request the source code of the software package to be published, and the server is used to receive and respond to the request instruction, perform a second identity authentication on the smart card device, and after completing the second identity authentication on the smart card device, send the compiled target source code corresponding to the request instruction to the client device; the client device encapsulates the target source code, obtains the software package, and publishes the software package, thereby achieving the purpose of improving the verification strength of the publishing device in the process of publishing the software package, thereby achieving the technical effect of improving the security in the process of publishing the software package, and further solving the technical problem of low security in the process of publishing the software package due to the low verification strength of the publishing device in the related technology in the process of publishing the software package. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0027] Figure 1 is a flowchart of a method for publishing a software package according to an embodiment of the present application;
[0028] Figure 2 is a flowchart of another software package publishing method according to an embodiment of the present application;
[0029] Figure 3 is a structural diagram of a software package publishing device according to an embodiment of the present application;
[0030] Figure 4 It is a hardware structure block diagram of a computer terminal according to a software package publishing method of an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] According to an embodiment of the present application, a method embodiment of a software package publishing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0034] Figure 1 is a flowchart of a method for publishing a software package according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0035] Step S102: When the client device detects that the smart card device is connected to the client device, the client device performs a first identity authentication on the smart card device.
[0036] Client devices include, but are not limited to: personal computers.
[0037] A smart card device is a card that uses an integrated circuit chip to store information.
[0038] Step S104, after completing the first identity authentication of the smart card device, receiving and responding to the release instruction, sending a request instruction to the server, wherein the request instruction is used to request the source code of the software package to be released, and the server is used to receive and respond to the request instruction, perform a second identity authentication on the smart card device, and after completing the second identity authentication of the smart card device, send the compiled target source code corresponding to the request instruction to the client device.
[0039] After the client device performs the first identity authentication on the smart card device, the server performs the second identity authentication on the smart card device, thereby enhancing the security of the smart card device login process.
[0040] Step S106: The client device packages the target source code to obtain a software package, and publishes the software package.
[0041] In order to convert source code into executable software, compilation is required. The compiler translates the source code into machine language that can be understood by the target platform (such as Windows, macOS, Linux, etc.). During the compilation process, you may need to resolve the dependencies of the software package. Dependencies refer to other libraries or components that the software package requires at runtime. After compilation is complete, the generated executable files and other necessary resources (such as configuration files, data files, etc.) are packaged into a software package. Finally, the software package is published to a specified platform or repository. This can be a private repository within the enterprise, a public software repository (such as GitHub, GitLab, etc.), or other online distribution platforms.
[0042] According to the above steps, when the client device detects that the smart card device is connected to the client device, the client device performs a first identity authentication on the smart card device; after completing the first identity authentication on the smart card device, the client device receives and responds to the publishing instruction, and sends a request instruction to the server, wherein the request instruction is used to request the source code of the software package to be published, and the server is used to receive and respond to the request instruction, perform a second identity authentication on the smart card device, and after completing the second identity authentication on the smart card device, send the compiled target source code corresponding to the request instruction to the client device; the client device encapsulates the target source code to obtain the software package, and publishes the software package, thereby achieving the purpose of improving the verification strength of the publishing device in the process of publishing the software package, thereby achieving the technical effect of improving the security in the process of publishing the software package.
[0043] According to some optional embodiments of the present application, the client device performs the first identity authentication on the smart card device, which can be implemented by the following method:
[0044] Step S1, obtaining identification information of the smart card device, and determining whether the smart card device has completed registration before the client device detects that the smart card device is connected to the client device based on the identification information of the smart card device, wherein the identification information includes: the identity of the chip of the smart card device.
[0045] Among them, identification information includes: 1. Card Number: a unique serial number used to identify smart cards during issuance and transactions. 2. Personal Identification Number (PIN): a password set by the user to verify the user's identity and prevent unauthorized use.
[0046] Step S2: If it is determined that the smart card device has completed registration before the client device detects that the smart card device is connected to the client device, the client device randomly generates a first key, wherein the smart card device is used to randomly generate a key pair, the key pair includes: a private key and a public key, and the smart card device is also used to send the public key to the client device and store the private key in the smart card device.
[0047] It is understandable that when the smart card device is registered with the client device, the smart card device can generate a key pair including a public key and a private key, send the public key in the key pair to the client device, and store the private key in the key pair in the smart card device. Therefore, the client device stores the public key in the key pair, and the client device can establish an association relationship between the public key and the identity identifier of the chip of the smart card device.
[0048] Step S3, obfuscating the first key to obtain an obfuscated key, and encrypting the obfuscated key with the public key to obtain a target key, wherein the length of the obfuscated key is greater than the length of the first key.
[0049] For example, the following is a method for obfuscating the first key to obtain an obfuscated key: 1. Key splitting: Split a long key into multiple shorter parts, and then use these parts separately in the encryption algorithm. This can reduce the risk of the key being cracked. 2. Key mixing: Combine multiple keys or passwords together to form an obfuscated key. This can be achieved through an algorithm or function to ensure the complexity of the key. 3. Use a pseudo-random number generator: Use a pseudo-random number generator to generate some random numbers, and then combine these random numbers with the original key to form a new obfuscated key. 4. Key expansion technology: Use key expansion technology, such as KDF (Key Derivation Function), to expand the original key into a longer key sequence.
[0050] For another example, the obfuscated key is a 4096-bit key.
[0051] Step S4, obtaining the private key stored in the smart card device, and using the private key to decrypt the target key, and performing obfuscation extraction on the key obtained by the decryption process according to a preset obfuscation extraction algorithm to obtain a second key.
[0052] Step S5, using the private key to encrypt the second key to obtain the first target ciphertext, and using the public key to decrypt the first target ciphertext to obtain the first target key.
[0053] Step S6, determining whether the first target key is consistent with the first key, and if the first target key is consistent with the first key, determining that the smart card device passes the first identity authentication.
[0054] According to some other optional embodiments of the present application, the client device runs a publishing platform, which includes: an authentication center and a target software module.
[0055] Furthermore, before the client device performs the first identity authentication on the smart card device, the following steps can also be performed: the authentication center obtains the first identification information of the authorized smart card device, and stores the first identification information in the target storage area in the authentication center, wherein the smart card device is used to randomly generate a key pair, and the key pair includes: a private key and a public key, and the smart card device is also used to send the public key to the authentication center and store the private key in the smart card device; the authentication center stores the public key in the target storage area, and establishes a first association relationship between the public key and the first identification information.
[0056] In other words, the smart card device randomly generates a key pair (public key and private key), the smart card device stores the generated private key (the private key is not issued), the smart card device exports the public key (the public key is public), and sends it to the authentication center, which stores the public key in the target storage area. For example, the above-mentioned target storage area can be a database, a file system, or other forms of storage devices. Then, the authentication center establishes an association relationship between the public key and the first identification information.
[0057] Furthermore, the client device performs a first identity authentication on the smart card device, including the following steps:
[0058] The target software module is used to obtain the identification information of the smart card device and send the identification information to the authentication center; the authentication center is used to query whether there is first identification information consistent with the identification information in the target storage area; if the first identification information consistent with the identification information is found in the target storage area, the authentication center randomly generates a 16-bit first key through a key algorithm.
[0059] A targeted software module, often called a terminal plug-in, is a software component used to implement specific functionality in a terminal application. A terminal application is a program used to access and control a remote computer or system, such as a server, router, or switch. Terminal plug-ins can enhance the functionality of a terminal application, providing additional tools and features to meet specific needs or simplify tasks.
[0060] For example, the target software module is a terminal plug-in, and the functions of the terminal plug-in are as follows: Terminal plug-in types: 1. Allow users to execute scripts in terminal applications to automate tasks or execute complex command sequences. 2. Allow users to transfer files between terminal applications and remote systems, such as using SCP or SFTP protocols. 3. Allow users to send remote commands from terminal applications to remote systems to achieve remote control and management. 4. Help users manage SSH keys to securely access remote systems.
[0061] Furthermore, a secure random number generator (such as Python's `secrets` library) is used to generate a 128-bit (16-byte) key. From the generated 128-bit key, 16 bits are randomly selected as the first key. For example, the first 16 bits are selected to obtain a 16-bit intermediate key.
[0062] According to the preset obfuscation encryption algorithm, the 16-bit intermediate key is obfuscated to obtain a 4096-bit obfuscated key; according to the identification information and the first association relationship, the public key corresponding to the identification information in the authentication center is determined; the 4096-bit mixed key is encrypted by the public key to obtain the target key.
[0063] For example, when the intermediate key is 16 bits, a random number can be combined to increase the unpredictability of the key. This method can generate a longer key by combining the random number with the original key and then passing it through an algorithm (such as a hash function or encryption algorithm).
[0064] The authentication center sends the target key to the target software module; the target software module uses the private key stored in the smart card device to decrypt the target key, and according to a preset obfuscation extraction algorithm, performs obfuscation extraction on the decrypted key to obtain a 16-bit second key; the target software module uses the private key to encrypt the 16-bit second key to obtain a first target ciphertext, and sends the first target ciphertext to the authentication center.
[0065] The authentication center uses the public key to decrypt the first target ciphertext to obtain a first target key; determines whether the first target key is consistent with the first key, and when the first target key is consistent with the first key, determines that the smart card device passes the first identity authentication.
[0066] In some optional embodiments of the present application, before sending a request instruction to the server, the following steps can also be performed: sending a trust module to the server, wherein the server is used to add the trust module to the authentication module of the server's operating system; obtaining and storing the authorized identity identification information of the authorized server, and storing the authorized identity identification information to the target storage area in the authentication center.
[0067] It is understandable that the authentication module in the server-side operating system is an important part of ensuring system security. It is responsible for managing user authentication and authorization. The following are some common authentication module types and functions: 1. Password-based authentication: Users verify their identity by entering a username and password. 2. Multi-factor authentication: In addition to the password, other forms of authentication are required, such as SMS verification codes, email verification codes, biometrics, or hardware tokens.
[0068] Furthermore, before sending the request instruction to the server, the following steps may be performed.
[0069] The first identity information sent by the server is received for the first time, and after the first identity information sent by the server is received for the first time, the following steps are performed:
[0070] The target software module sends the received first identity information (the first target identity information includes: user name and password) to the authentication center; the authentication center encrypts the first identity information using the public key stored in the authentication center, and sends the encrypted first identity information to the target software module. The target software module decrypts the encrypted first identity information using the private key stored in the smart card device to obtain the first target identity information.
[0071] Sending a request instruction to the server includes the following steps: the target software module generates a first random number, and sends the request instruction (the request instruction includes: the first random number and the first target identity identification information) to the trust module, the trust module is used to call the system application program interface, modify the password to the first random number to obtain the first password, and send the first password to the authentication module, the authentication module is used to perform a second identity authentication on the smart card device through the first password and the user name.
[0072] Further, the first identity identification information sent by the server is received for the ath time, and after the first identity identification information sent by the server is received for the ath time, the following steps are performed (a is a positive integer not greater than n1, n1 is a positive integer greater than 1, and a is 2 to n1 respectively).
[0073] The target software module sends the received first identity identification information to the authentication center; the authentication center encrypts the first identity identification information by using the public key stored in the authentication center, and sends the encrypted first identity identification information to the target software module; the target software module decrypts the encrypted first identity identification information by using the private key stored in the smart card device to obtain the first target identity identification information, wherein the first target identity identification information includes: user name and a-1th password.
[0074] In summary, sending a request instruction to the server includes the following steps: the target software module generates the ath random number, and sends the request instruction to the trust module, wherein the request instruction includes: the ath random number and the first target identity identification information; the trust module is used to call the system application program interface, modify the a-1th password to the ath random number to obtain the ath password, and send the ath password to the authentication module; the authentication module is used to perform a second identity authentication on the smart card device through the first password and the user name.
[0075] For example, when n1 is 4, it includes: receiving the first identity information sent by the server for the second time, and after receiving the first identity information sent by the server for the second time, executing the following steps: the target software module sends the received first identity information to the authentication center; the authentication center encrypts the first identity information by using the public key stored in the authentication center, and sends the encrypted first identity information to the target software module; the target software module decrypts the encrypted first identity information by using the private key stored in the smart card device to obtain the first target identity information, wherein the first target identity information includes: the user name and the first password. Sending a request instruction to the server includes the following steps: the target software module generates a second random number, and sends the request instruction to the trust module, wherein the request instruction includes: the second random number and the first target identity information, the trust module is used to call the system application program interface, modify the first password to the second random number to obtain the second password, and send the second password to the authentication module, and the authentication module is used to perform a second identity authentication on the smart card device by using the first password and the user name.
[0076] The first identity information sent by the server is received for the third time, and after receiving the first identity information sent by the server for the third time, the following steps are performed: the target software module sends the received first identity information to the authentication center; the authentication center encrypts the first identity information by using the public key stored in the authentication center, and sends the encrypted first identity information to the target software module; the target software module decrypts the encrypted first identity information by using the private key stored in the smart card device to obtain the first target identity information, wherein the first target identity information includes: the user name and the second password. Sending a request instruction to the server includes the following steps: the target software module generates a third random number, and sends the request instruction to the trust module, wherein the request instruction includes: the third random number and the first target identity information, the trust module is used to call the system application program interface, modify the second password to the third random number to obtain the third password, and send the third password to the authentication module, and the authentication module is used to perform a second identity authentication on the smart card device by using the second password and the user name.
[0077] The first identity information sent by the server is received for the fourth time, and after receiving the first identity information sent by the server for the fourth time, the following steps are performed: the target software module sends the received first identity information to the authentication center; the authentication center encrypts the first identity information by using the public key stored in the authentication center, and sends the encrypted first identity information to the target software module; the target software module decrypts the encrypted first identity information by using the private key stored in the smart card device to obtain the first target identity information, wherein the first target identity information includes: the user name and the third password. Sending a request instruction to the server includes the following steps: the target software module generates a fourth random number, and sends the request instruction to the trust module, wherein the request instruction includes: the fourth random number and the first target identity information, the trust module is used to call the system application program interface, modify the third password to the fourth random number to obtain the fourth password, and send the fourth password to the authentication module, and the authentication module is used to perform a second identity authentication on the smart card device by using the third password and the user name.
[0078] In summary, it can be understood that when the target software modifies the password through the trust module, it can use the new password recorded by the authentication module. In other words, the password modification step requires the original password (target password, the last new password) and the new password (the random number generated by the smart card called by the target software) to be implemented.
[0079] As some optional embodiments of the present application, before the target software module receives the first identity information sent by the server, the following steps may be performed: the authentication center verifies whether the second identity information of the smart card device is legal. If the second identity information is illegal, it is determined that the authentication of the smart card device has failed; if the second identity information is legal, the authentication center verifies whether the second identity information of the smart card device is valid. If the second identity information is invalid, it is determined that the authentication of the smart card device has failed; if the second identity information is valid, the authentication center verifies whether the authorized identity information consistent with the first identity information is found in the target storage area; if the authorized identity information consistent with the first identity information is found in the target storage area, it is checked whether the hardware unique identification information of the smart card device corresponds to the hardware unique identification information of the server. If there is no corresponding relationship between the hardware unique identification information of the smart card device and the hardware unique identification information of the server, it is determined that the authentication of the smart card device has failed; if the authorized identity information consistent with the first identity information is not found in the target storage area, it is determined that the authentication of the smart card device has failed.
[0080] In short, the authentication center verifies whether the identity of the smart card is legal and valid, mainly verifying the following: 1: Whether the smart card has been removed (if removed, it will be invalid); 2: Whether the credentials after the smart card login have expired (if expired, it will be invalid); 3: Whether the target server is registered with the authentication center; and whether the inserted smart card is authorized to the target server (actually verifying whether there is a corresponding relationship between the smart card's hardware unique identifier and the target server's unique identifier).
[0081] Specifically, the authentication center verifies whether the second identity information of the smart card device is valid, including the following steps: detecting the connection status between the smart card device and the client device. If the smart card device is not connected to the client device, determining that the second identity information of the smart card device is invalid; detecting whether the login credentials of the smart card device expire after the smart card device is connected to the client device. If so, determining that the second identity information of the smart card device is invalid.
[0082] Preferably, the number of the publishing platforms is one or more, wherein, when the number of the publishing platforms is more than one, each publishing platform is used to simultaneously package the target source code into a software package and publish the software package.
[0083] In some optional embodiments of the present application, after the software package is released, the following steps may also be performed:
[0084] Execute the u-th test process in the first round of testing, where u is a positive integer not greater than n2, n2 is a positive integer greater than 1, and u is 1 to n2 respectively.
[0085] When u=1, perform the following steps:
[0086] Randomly select an interface to be tested in the first sampling pool, use the interface to be tested to test the software package to obtain a tested interface, send the first interface among the tested interfaces to a preset safety zone to generate a first safety zone, and send the second interface among the tested interfaces to a preset danger zone to generate a first danger zone.
[0087] Preferably, the first interface is a tested interface whose test result meets the first preset requirement, and the first preset requirement includes: the test success rate is greater than the first preset percentage, the number of consecutive test successes is greater than the first preset value, and the cumulative number of test successes is greater than the second preset value. The second interface is a tested interface whose test result does not meet the second preset requirement, and the second preset requirement includes: the test failure rate is greater than the second preset percentage and / or the number of consecutive test failures is greater than the third preset value and / or the cumulative number of test failures is greater than the fourth preset value.
[0088] Exemplarily, the first preset requirement is that the test success rate is greater than 98%, the number of consecutive test successes is greater than 50 times, and the cumulative number of test successes for any interface is greater than 200 times. The second preset requirement is that the test failure rate is greater than 5%, and / or the number of consecutive test failures is greater than 3 times, and / or the cumulative number of failures for any interface is greater than 20 times.
[0089] When u>1, perform the following steps: randomly select an interface to be tested in the u-1th danger zone, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to the u-1th safety zone to generate the uth safety zone, and send the second interface among the tested interfaces to the u-1th danger zone to generate the uth danger zone.
[0090] The moment when the n2th test is completed is determined as the first moment. At a second moment that is a preset time away from the first moment, an interface to be tested is randomly selected in the n2th safety zone, and the software package is tested using the interface to be tested to obtain a tested interface. The first interface among the tested interfaces is retained in the n2th safety zone, and the second interface among the tested interfaces is sent to the n2th danger zone to generate a second sampling pool.
[0091] For example, the u-th test process in the first round of testing is executed, where u is a positive integer not greater than 20, and u ranges from 1 to 20:
[0092] When u=1, perform the following steps:
[0093] Randomly select an interface to be tested in the first sampling pool, use the interface to be tested to test the software package to obtain a tested interface, send the first interface among the tested interfaces to a preset safety zone to generate a first safety zone, and send the second interface among the tested interfaces to a preset danger zone to generate a first danger zone.
[0094] When u=2, randomly select the interface to be tested in the first danger zone, use the interface to be tested to test the software package to obtain the tested interface, send the first interface among the tested interfaces to the first safety zone to generate the second safety zone, and send the second interface among the tested interfaces to the first danger zone to generate the second danger zone.
[0095] And so on.
[0096] When u=20, randomly select the interface to be tested in the 19th danger zone, use the interface to be tested to test the software package to obtain the tested interface, send the first interface among the tested interfaces to the 19th safety zone to generate the 20th safety zone, and send the second interface among the tested interfaces to the 19th danger zone to generate the 20th danger zone.
[0097] The moment when the 20th test is completed is determined as the first moment. At the second moment which is a preset time away from the first moment, a to-be-tested interface is randomly selected in the 20th safety zone. The software package is tested using the to-be-tested interface to obtain a tested interface. The first interface among the tested interfaces is retained in the 20th safety zone, and the second interface among the tested interfaces is sent to the 20th danger zone to generate a second sampling pool.
[0098] It can be understood that the first moment is the moment when the last test is completed in the first round of testing. The second sampling pool is the sampling pool randomly selected in the next round of testing (the second round of testing).
[0099] Furthermore, after generating the second sampling pool, the method further includes the following steps:
[0100] Execute the k-th round test process, wherein for the v-th test in the k-th round, execute the following steps: wherein k is a positive integer not greater than n3, n3 is a positive integer greater than 2, k is 2 to n3, v is a positive integer not greater than n4, n4 is a positive integer greater than 2, and v is 1 to n4:
[0101] When v=1, perform the following steps: randomly select an interface to be tested from the kth sampling pool, use the interface to be tested to test the software package to obtain a tested interface, send the first interface among the tested interfaces to a preset safety zone to generate the first safety zone, and send the second interface among the tested interfaces to a preset danger zone to generate the first danger zone.
[0102] When v>1, execute the following steps in sequence: randomly select an interface to be tested in the v-1th danger zone, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to the v-1th safety zone to generate the vth safety zone, send the second interface among the tested interfaces to the v-1th danger zone to generate the vth danger zone.
[0103] Furthermore, the moment when the kth round of testing is completed is determined as the third moment, and at a fourth moment which is a preset time away from the third moment, an interface to be tested is randomly selected in the n4th safety zone, and the software package is tested using the interface to be tested to obtain a tested interface, and the first interface among the tested interfaces is retained in the n4th safety zone, and the second interface among the tested interfaces is sent to the n4th danger zone to generate the k+1th sampling pool.
[0104] For example, to execute the second round of testing, for the vth test in the second round, perform the following steps:
[0105] When v=1, execute the following steps: randomly select the interface to be tested from the second sampling pool, test the software package using the interface to be tested to obtain the tested interface, send the first interface among the tested interfaces to the preset security zone to generate the first security zone, and send the second interface among the tested interfaces to the preset danger zone to generate the first danger zone.
[0106] If v is 2 and 3 respectively, when v=2, execute the following steps: randomly select the interface to be tested in the first danger zone, test the software package using the interface to be tested to obtain the tested interface, send the first interface among the tested interfaces to the first safety zone to generate the second safety zone, and send the second interface among the tested interfaces to the first danger zone to generate the second danger zone.
[0107] When v=3, execute the following steps: randomly select an interface to be tested in the second danger zone, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to the second safety zone to generate a third safety zone, and send the second interface among the tested interfaces to the second danger zone to generate a third danger zone.
[0108] Furthermore, the moment when the second round of testing is completed is determined as the third moment. At a fourth moment which is a preset time away from the third moment, a to-be-tested interface is randomly selected in the third (n4=3) safety zone, and the software package is tested using the to-be-tested interface to obtain a tested interface. The first interface among the tested interfaces is retained in the third safety zone, and the second interface among the tested interfaces is sent to the third danger zone to generate a third sampling pool.
[0109] It is understandable that the above-mentioned sampling pool No. 3 is the sampling pool randomly selected in the next round of testing (if there is one, the third round of testing).
[0110] To summarize, in short, the data pool can be divided into a safe area, a dangerous area, and a basic area. For the basic area, samples are randomly selected to participate in interface verification. The safe area is the area where the samples exist after multiple verifications and meet the first preset requirements. The sample data entering this area will not participate in the next sampling test, but when a certain period, such as 1 month, is reached, the data in the area needs to be randomly sampled and verified. If the first preset requirement is met, it will be retained in the safe area, otherwise it will enter the basic area. For the dangerous area, if the sample does not meet the second preset requirement after multiple verifications, all samples are stored in the dangerous area, and all samples need to participate in the next sampling test.
[0111] It should be noted that software package testing includes: multiple rounds of testing, where each round of testing includes multiple tests. After the first round of testing, a new basic area is finally generated. The new basic area includes interfaces in the safe area that do not meet the requirements after a certain period and all interfaces in the dangerous area. For the first test in the second round of testing, its basic area is the basic area finally generated by the first round of testing. And so on.
[0112] Figure 2 is a flowchart of another software package publishing method according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0113] The server receives a request instruction sent by a client device, wherein the client device is used to perform a first identity authentication on the smart card device when the client device detects that the smart card device is connected to the client device, and is also used to receive and respond to a release instruction after completing the first identity authentication of the smart card device, and send a request instruction to the server, wherein the request instruction is used to request the source code of the software package to be released.
[0114] The server performs a second identity authentication on the smart card device in response to the request instruction, and after completing the second identity authentication on the smart card device, sends the compiled target source code corresponding to the request instruction to the client device, wherein the client device is used to package the target source code, obtain a software package, and publish the software package.
[0115] It should be noted that Figure 2 The preferred implementation of the illustrated embodiment can be found in Figure 1 The relevant description of the illustrated embodiment will not be repeated here.
[0116] Figure 3 is a structural diagram of a software package publishing device according to an embodiment of the present application, such as Figure 3 As shown, the device comprises:
[0117] The authentication module 30 is used to perform a first identity authentication on the smart card device when the client device detects that the smart card device is connected to the client device.
[0118] The sending module 32 is used to receive and respond to the publishing instruction after completing the first identity authentication of the smart card device, and send a request instruction to the server, wherein the request instruction is used to request the source code of the software package to be released, and the server is used to receive and respond to the request instruction, perform a second identity authentication on the smart card device, and after completing the second identity authentication of the smart card device, send the compiled target source code corresponding to the request instruction to the client device.
[0119] The publishing module 34 is used for the client device to package the target source code into a software package and publish the software package.
[0120] The authentication module 30 is also used to perform the following steps: obtaining identification information of the smart card device, and determining whether the smart card device has completed registration before the client device detects that the smart card device is connected to the client device based on the identification information of the smart card device, wherein the identification information includes: the identity identification of the chip of the smart card device; if it is determined that the smart card device has completed registration before the client device detects that the smart card device is connected to the client device, the client device randomly generates a first key, wherein the smart card device is used to randomly generate a key pair, the key pair includes: a private key and a public key, and the smart card device is also used to send the public key to the client device and store the private key in the smart card device; simulating the first key Obfuscation is performed to obtain an obfuscated key, and the obfuscated key is encrypted with a public key to obtain a target key, wherein the length of the obfuscated key is greater than the length of the first key; a private key stored in the smart card device is obtained, and the target key is decrypted with the private key, and the key obtained by the decryption is obfuscated and extracted according to a preset obfuscation extraction algorithm to obtain a second key; the second key is encrypted with the private key to obtain a first target ciphertext, and the first target ciphertext is decrypted with the public key to obtain a first target key; it is determined whether the first target key is consistent with the first key, and when the first target key is consistent with the first key, it is determined that the smart card device has passed the first identity authentication.
[0121] Optionally, the client device runs a publishing platform, which includes: an authentication center and a target software module. The software package publishing device is also used to perform the following steps before the client device performs a first identity authentication on the smart card device: the authentication center obtains the first identification information of the authorized smart card device, and stores the first identification information in a target storage area in the authentication center, wherein the smart card device is used to randomly generate a key pair, the key pair includes: a private key and a public key, and the smart card device is also used to send the public key to the authentication center and store the private key in the smart card device; the authentication center stores the public key in the target storage area, and establishes a first association relationship between the public key and the first identification information.
[0122] The authentication module 30 is also used to perform the following steps: using the target software module to obtain the identification information of the smart card device, and sending the identification information to the authentication center; using the authentication center to query whether there is first identification information consistent with the identification information in the target storage area; if the first identification information consistent with the identification information is found in the target storage area, the authentication center randomly generates a 16-bit first key through a key algorithm; according to a preset obfuscation encryption algorithm, the 16-bit intermediate key is obfuscated to obtain a 4096-bit obfuscated key; according to the identification information and the first association relationship, the public key corresponding to the identification information is determined in the authentication center; the 4096-bit mixed key is encrypted by the public key, Obtain the target key; the authentication center sends the target key to the target software module; the target software module uses the private key stored inside the smart card device to decrypt the target key, and according to the preset obfuscation extraction algorithm, performs obfuscation extraction on the key obtained by the decryption process to obtain a 16-bit second key; the target software module uses the private key to encrypt the 16-bit second key to obtain a first target ciphertext, and sends the first target ciphertext to the authentication center; the authentication center uses the public key to decrypt the first target ciphertext to obtain a first target key; determine whether the first target key is consistent with the first key, and when the first target key is consistent with the first key, determine that the smart card device has passed the first identity authentication.
[0123] Optionally, the software package publishing device is also used to perform the following steps before sending a request instruction to the server: sending a trust module to the server, wherein the server is used to add the trust module to the authentication module of the server's operating system; obtaining and storing the authorized identity identification information of the authorized server, and storing the authorized identity identification information to the target storage area in the authentication center.
[0124] Optionally, the software package publishing device is also used to perform the following steps before sending a request instruction to the server: receiving the first identity identification information sent by the server for the first time, and after receiving the first identity identification information sent by the server for the first time, performing the following steps: the target software module sends the received first identity identification information to the authentication center; the authentication center encrypts the first identity identification information by using the public key stored in the authentication center, and sends the encrypted first identity identification information to the target software module; the target software module decrypts the encrypted first identity identification information by using the private key stored in the smart card device to obtain the first target identity identification information, wherein the first target identity identification information includes: user name and password.
[0125] Optionally, the sending module 32 is also used to perform the following steps: the target software module generates a first random number, and sends a request instruction to the trust module, wherein the request instruction includes: the first random number and the first target identity identification information; the trust module is used to call the system application program interface, modify the password to the first random number to obtain the first password, and send the first password to the authentication module; the authentication module is used to perform a second identity authentication on the smart card device through the first password and the user name.
[0126] Optionally, the software package publishing device is also used to receive the first identity identification information sent by the server for the ath time, and after receiving the first identity identification information sent by the server for the ath time, perform the following steps, wherein a is a positive integer not greater than n1, n1 is a positive integer greater than 1, and a is 2 to n1 respectively: the target software module sends the received first identity identification information to the authentication center; the authentication center encrypts the first identity identification information by using the public key stored in the authentication center, and sends the encrypted first identity identification information to the target software module; the target software module decrypts the encrypted first identity identification information by using the private key stored in the smart card device to obtain the first target identity identification information, wherein the first target identity identification information includes: a user name and an a-1th password.
[0127] Optionally, the sending module 32 is also used to perform the following steps: the target software module generates an ath random number, and sends a request instruction to the trust module, wherein the request instruction includes: the ath random number and the first target identity identification information; the trust module is used to call the system application program interface, modify the a-1th password to the ath random number to obtain the ath password, and send the ath password to the authentication module; the authentication module is used to perform a second identity authentication on the smart card device through the first password and the user name.
[0128] Optionally, before the target software module receives the first identity information sent by the server, the software package publishing device is also used to perform the following steps: the authentication center verifies whether the second identity information of the smart card device is legal, and if the second identity information is illegal, determines that the authentication of the smart card device has failed; if the second identity information is legal, the authentication center verifies whether the second identity information of the smart card device is valid, and if the second identity information is invalid, determines that the authentication of the smart card device has failed; if the second identity information is valid, the authentication center verifies whether authorized identity information consistent with the first identity information is found in the target storage area; if authorized identity information consistent with the first identity information is found in the target storage area, check whether the hardware unique identification information of the smart card device corresponds to the hardware unique identification information of the server, and if there is no corresponding relationship between the hardware unique identification information of the smart card device and the hardware unique identification information of the server, determine that the authentication of the smart card device has failed; if authorized identity information consistent with the first identity information is not found in the target storage area, determine that the authentication of the smart card device has failed.
[0129] Optionally, the software package publishing device is also used to perform the following steps: detecting the connection status between the smart card device and the client device, and if the smart card device is not connected to the client device, determining that the second identity information of the smart card device is invalid; detecting whether the login credentials of the smart card device after connecting to the client device expire, and if so, determining that the second identity information of the smart card device is invalid.
[0130] Optionally, the number of publishing platforms is one or more, wherein, when the number of publishing platforms is more than one, each publishing platform is used to simultaneously package the target source code into a software package and publish the software package.
[0131] Optionally, execute the u-th test process in the first round of testing, wherein u is a positive integer not greater than n2, n2 is a positive integer greater than 1, and u is 1 to n2 sequentially: when u=1, execute the following steps: randomly select an interface to be tested in the first sampling pool, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to a preset safety zone to generate a first safety zone, send the second interface among the tested interfaces to a preset danger zone to generate a first danger zone, wherein the first interface is a tested interface whose test result meets a first preset requirement, and the first preset requirement includes: a test success rate greater than a first preset percentage, a number of consecutive test successes greater than a first preset value, and a cumulative number of test successes greater than a second preset value; the second interface is a tested interface whose test result does not meet a second preset requirement, and the second preset requirement includes: a test failure rate greater than The second preset percentage and / or the number of consecutive test failures is greater than the third preset value and / or the cumulative number of test failures is greater than the fourth preset value; when u>1, perform the following steps: randomly select an interface to be tested in the u-1th danger zone, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to the u-1th safety zone to generate the uth safety zone, send the second interface among the tested interfaces to the u-1th danger zone to generate the uth danger zone; determine the moment when the n2th test is completed as the first moment, and at a second moment with a preset time distance from the first moment, randomly select an interface to be tested in the n2th safety zone, test the software package using the interface to be tested to obtain a tested interface, retain the first interface among the tested interfaces in the n2th safety zone, send the second interface among the tested interfaces to the n2th danger zone, and generate a second sampling pool.
[0132] Optionally, execute the kth round of testing process, wherein for the vth test in the kth round, execute the following steps: wherein k is a positive integer not greater than n3, n3 is a positive integer greater than 2, k is sequentially 2 to n3, v is a positive integer not greater than n4, n4 is a positive integer greater than 2, and v is sequentially 1 to n4: when v=1, execute the following steps: randomly select an interface to be tested from the kth sampling pool, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to a preset safety zone to generate the first safety zone, send the second interface among the tested interfaces to a preset danger zone to generate the first danger zone; when v>1, execute the following steps sequentially: randomly select an interface to be tested from the v-1th danger zone, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to the v-1th safety zone to generate the vth safety zone, send the second interface among the tested interfaces to the v-1th danger zone to generate the vth danger zone; The moment when the kth round of testing is completed is determined as the third moment. At a fourth moment with a preset time length from the third moment, a to-be-tested interface is randomly selected in the n4th safety zone, and the software package is tested using the to-be-tested interface to obtain a tested interface. The first interface among the tested interfaces is retained in the n4th safety zone, and the second interface among the tested interfaces is sent to the n4th danger zone to generate the k+1th sampling pool.
[0133] It should be noted that the above Figure 3 Each module in the can be a program module (for example, a set of program instructions that implement a specific function) or a hardware module. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above modules is a processor, or the functions of each of the above modules are implemented by a processor.
[0134] It should be noted that Figure 3 The preferred implementation of the illustrated embodiment can be found in Figure 1 The relevant description of the illustrated embodiment will not be repeated here.
[0135] Figure 4 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a software package publishing method. Figure 4As shown, the computer terminal 40 may include one or more (402a, 402b, ..., 402n1 are used to illustrate) processors 402 (the processor 402 may include but is not limited to a processing device such as a microprocessor N2CU or a programmable logic device FN4GA), a memory 404 for storing data, and a transmission module 406 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown.
[0136] It should be noted that the one or more processors 402 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 40. As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0137] The memory 404 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the software package publishing method in the embodiment of the present application. The processor 402 executes various functional applications and data processing by running the software programs and modules stored in the memory 404, that is, the above-mentioned software package publishing method is realized. The memory 404 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 404 may further include a memory remotely arranged relative to the processor 402, and these remote memories may be connected to the computer terminal 40 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0138] The transmission module 406 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 40. In one example, the transmission module 406 includes a network adapter (Network Interface Controller, N1IC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 406 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0139] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 40 .
[0140] It should be noted that, in some optional embodiments, the above Figure 4 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 4 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.
[0141] It should be noted that Figure 4 The computer terminal shown is used to execute Figure 1 The software package publishing method shown in the figure, therefore the relevant explanations in the execution method of the above command are also applicable to the electronic device and will not be repeated here.
[0142] The embodiment of the present application further provides a non-volatile storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the above software package publishing method.
[0143] A program for executing the following functions in a non-volatile storage medium: when a client device detects that a smart card device is connected to the client device, the client device performs a first identity authentication on the smart card device; after completing the first identity authentication on the smart card device, receiving and responding to a publishing instruction, sending a request instruction to a server, wherein the request instruction is used to request the source code of a software package to be published, and the server is used to receive and respond to the request instruction, perform a second identity authentication on the smart card device, and after completing the second identity authentication on the smart card device, send the compiled target source code corresponding to the request instruction to the client device; the client device encapsulates the target source code to obtain a software package, and publishes the software package.
[0144] An embodiment of the present application further provides an electronic device, including: a memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the above software package publishing method is executed when the program is run.
[0145] The processor is used to run a program that performs the following functions: when the client device detects that the smart card device is connected to the client device, the client device performs a first identity authentication on the smart card device; after completing the first identity authentication on the smart card device, receiving and responding to a publishing instruction, sending a request instruction to the server, wherein the request instruction is used to request the source code of the software package to be released, the server is used to receive and respond to the request instruction, perform a second identity authentication on the smart card device, and after completing the second identity authentication on the smart card device, send the compiled target source code corresponding to the request instruction to the client device; the client device encapsulates the target source code to obtain the software package, and releases the software package.
[0146] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0147] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0148] In the above-mentioned embodiments of the present application, the collected information is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0149] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0150] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0151] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0152] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (RON2, Read-On1ly N2en2ory), random access memory (RAN2, Ran1don2 Access N2en2ory), mobile hard disk, disk or CD-ROM and other media that can store program code.
[0153] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A software package publishing method, characterized in that: include: When the client device detects that the smart card device is connected to the client device, the client device performs a first identity authentication on the smart card device; After completing the first identity authentication of the smart card device, receiving and responding to a publishing instruction, sending a request instruction to the server, wherein the request instruction is used to request the source code of the software package to be published, and the server is used to receive and respond to the request instruction, perform a second identity authentication on the smart card device, and after completing the second identity authentication of the smart card device, send the compiled target source code corresponding to the request instruction to the client device; The client device encapsulates the target source code to obtain a software package, and publishes the software package; The client device performs a first identity authentication on the smart card device, including: obtaining identification information of the smart card device, and determining whether the smart card device has completed registration before the client device detects that the smart card device is connected to the client device based on the identification information of the smart card device, wherein the identification information includes: the identity of the chip of the smart card device; if it is determined that the smart card device has completed registration before the client device detects that the smart card device is connected to the client device, the client device randomly generates a first key, wherein the smart card device is used to randomly generate a key pair, and the key pair includes: a private key and a public key, and the smart card device is also used to send the public key to the client device and store the private key in the smart card device; Obfuscating the first key to obtain an obfuscated key, encrypting the obfuscated key with the public key to obtain a target key, wherein the length of the obfuscated key is greater than the length of the first key; acquiring the private key stored in the smart card device, decrypting the target key with the private key, and performing obfuscated extraction on the key obtained by the decryption according to a preset obfuscation extraction algorithm to obtain a second key; encrypting the second key with the private key to obtain a first target ciphertext, and decrypting the first target ciphertext with the public key to obtain a first target key; determining whether the first target key is consistent with the first key, and determining that the smart card device passes the first identity authentication if the first target key is consistent with the first key; Before sending the request instruction to the server, the method further includes: sending a trust module to the server, wherein the server is used to add the trust module to the authentication module of the operating system of the server; obtaining and storing the authorized identity identification information of the authorized server, and storing the authorized identity identification information in a target storage area in the authentication center; Before sending a request instruction to the server, the method further includes: receiving the first identity identification information sent by the server for the first time, and after receiving the first identity identification information sent by the server for the first time, executing the following steps: the target software module sends the received first identity identification information to the authentication center; the authentication center encrypts the first identity identification information by using the public key stored in the authentication center, and sends the encrypted first identity identification information to the target software module; the target software module decrypts the encrypted first identity identification information by using the private key stored in the smart card device to obtain the first target identity identification information, wherein the first target identity identification information includes: user name and password; Sending a request instruction to the server, including: the target software module generates a first random number, and sends the request instruction to the trust module, wherein the request instruction includes: the first random number and the first target identity identification information, the trust module is used to call the system application program interface, modify the password to the first random number to obtain the first password, and send the first password to the authentication module, the authentication module is used to perform a second identity authentication on the smart card device through the first password and the user name; Receiving the first identity identification information sent by the server for the ath time, and after receiving the first identity identification information sent by the server for the ath time, executing the following steps, wherein a is a positive integer not greater than n1, n1 is a positive integer greater than 1, and a is 2 to n1 in sequence: the target software module sends the received first identity identification information to the authentication center; the authentication center encrypts the first identity identification information by using the public key stored in the authentication center, and sends the encrypted first identity identification information to the target software module; the target software module decrypts the encrypted first identity identification information by using the private key stored in the smart card device to obtain the first target identity identification information, wherein the first target identity identification information includes: a user name and the a-1th password; Sending a request instruction to the server, including: the target software module generates an ath random number, and sending the request instruction to the trust module, wherein the request instruction includes: the ath random number and the first target identity identification information, the trust module is used to call the system application program interface, modify the a-1th password to the ath random number to obtain the ath password, and send the ath password to the authentication module, the authentication module is used to perform a second identity authentication on the smart card device through the first password and the user name.
2. The method according to claim 1, characterized in that: The client device runs a publishing platform, which includes: an authentication center and a target software module; Before the client device performs a first identity authentication on the smart card device, the method further includes: The authentication center obtains the first identification information of the authorized smart card device, and stores the first identification information in a target storage area in the authentication center, wherein the smart card device is used to randomly generate a key pair, the key pair includes: a private key and a public key, the smart card device is also used to send the public key to the authentication center, and store the private key in the smart card device; The authentication center stores the public key in the target storage area and establishes a first association relationship between the public key and the first identification information.
3. The method according to claim 2, characterized in that The client device performs a first identity authentication on the smart card device, including: Acquiring identification information of the smart card device using the target software module, and sending the identification information to an authentication center; Using the authentication center to query in the target storage area whether there is first identification information that is consistent with the identification information; If the first identification information that is consistent with the identification information is found in the target storage area, the authentication center randomly generates a 16-bit first key through a key algorithm; According to a preset obfuscation encryption algorithm, the 16-bit first key is obfuscated to obtain a 4096-bit obfuscation key; Determine, in the authentication center, a public key corresponding to the identification information according to the identification information and the first association relationship; The 4096-bit obfuscated key is encrypted by the public key to obtain a target key; The certification center sends the target key to the target software module; The target software module uses the private key stored in the smart card device to decrypt the target key, and performs obfuscation extraction on the key obtained by the decryption process according to a preset obfuscation extraction algorithm to obtain a 16-bit second key; The target software module uses the private key to encrypt the 16-bit second key to obtain a first target ciphertext, and sends the first target ciphertext to the authentication center; The authentication center uses the public key to decrypt the first target ciphertext to obtain a first target key; Determine whether the first target key is consistent with the first key, and if the first target key is consistent with the first key, determine that the smart card device passes the first identity authentication.
4. The method according to claim 1, characterized in that: Before the target software module receives the first identity information sent by the server, the method further includes: The authentication center verifies whether the second identity information of the smart card device is legal, and determines that the authentication of the smart card device fails when the second identity information is illegal; If the second identity information is legal, the authentication center verifies whether the second identity information of the smart card device is valid, and if the second identity information is invalid, determines that the authentication of the smart card device has failed; In the case where the second identity information is valid, the authentication center verifies whether authorized identity information consistent with the first identity information is found in the target storage area; If the authorized identity information consistent with the first identity information is queried in the target storage area, verify whether the hardware unique identification information of the smart card device and the hardware unique identification information of the server have a corresponding relationship; if the hardware unique identification information of the smart card device and the hardware unique identification information of the server do not have a corresponding relationship, determine that the authentication of the smart card device has failed; If the authorized identity information consistent with the first identity information is not found in the target storage area, it is determined that the authentication of the smart card device has failed.
5. The method according to claim 4, characterized in that The authentication center verifies whether the second identity information of the smart card device is valid, including: Detecting the connection status between the smart card device and the client device, and if the smart card device is not connected to the client device, determining that the second identity information of the smart card device is invalid; Detect whether the login credentials of the smart card device after accessing the client device have expired, and if so, determine that the second identity information of the smart card device is invalid.
6. The method according to claim 2, characterized in that include: The number of the publishing platforms is one or more. When the number of the publishing platforms is more than one, each publishing platform is used to simultaneously package the target source code into a software package and publish the software package.
7. The method according to claim 1, characterized in that After publishing the software package, the method further includes: Execute the u-th test process in the first round of testing, where u is a positive integer not greater than n2, n2 is a positive integer greater than 1, and u is 1 to n2: When u=1, perform the following steps: Randomly select a to-be-tested interface from the first sampling pool, use the to-be-tested interface to test the software package to obtain a tested interface, send the first interface among the tested interfaces to a preset safety zone to generate a first safety zone, send the second interface among the tested interfaces to a preset danger zone to generate a first danger zone, wherein: The first interface is a tested interface whose test result meets a first preset requirement, wherein the first preset requirement includes: a test success rate greater than a first preset percentage, a number of consecutive test successes greater than a first preset value, and a cumulative number of test successes greater than a second preset value; The second interface is a tested interface whose test result does not meet a second preset requirement, wherein the second preset requirement includes: a test failure rate greater than a second preset percentage and / or a number of consecutive test failures greater than a third preset value and / or a cumulative number of test failures greater than a fourth preset value; When u>1, the following steps are performed: randomly selecting an interface to be tested in the u-1th danger zone, testing the software package using the interface to be tested to obtain a tested interface, sending the first interface among the tested interfaces to the u-1th safety zone to generate the uth safety zone, and sending the second interface among the tested interfaces to the u-1th danger zone to generate the uth danger zone; The moment when the n2th test is completed is determined as the first moment. At a second moment that is a preset time away from the first moment, a to-be-tested interface is randomly selected in the n2th safety zone, and the software package is tested using the to-be-tested interface to obtain a tested interface. The first interface among the tested interfaces is retained in the n2th safety zone, and the second interface among the tested interfaces is sent to the n2th danger zone to generate a second sampling pool.
8. The method according to claim 7, characterized in that After generating the second sampling pool, the method further includes: Execute the k-th round test process, wherein for the v-th test in the k-th round, execute the following steps: wherein k is a positive integer not greater than n3, n3 is a positive integer greater than 2, k is 2 to n3, v is a positive integer not greater than n4, n4 is a positive integer greater than 2, and v is 1 to n4: When v=1, execute the following steps: Randomly select an interface to be tested from the kth sampling pool, use the interface to be tested to test the software package to obtain a tested interface, send the first interface among the tested interfaces to a preset safety zone to generate a first safety zone, and send the second interface among the tested interfaces to a preset danger zone to generate a first danger zone; when v>1, perform the following steps in sequence: Randomly select an interface to be tested in the v-1th danger zone, test the software package using the interface to be tested to obtain a tested interface, send the first interface among the tested interfaces to the v-1th safety zone to generate a vth safety zone, send the second interface among the tested interfaces to the v-1th danger zone to generate a vth danger zone; The moment when the kth round of testing is completed is determined as the third moment. At a fourth moment with a preset time length from the third moment, a to-be-tested interface is randomly selected in the n4th safety zone, the software package is tested using the to-be-tested interface to obtain a tested interface, a first interface among the tested interfaces is retained in the n4th safety zone, and a second interface among the tested interfaces is sent to the n4th danger zone to generate a k+1th sampling pool.
9. A software package publishing device, characterized in that: include: An authentication module, configured to perform a first identity authentication on the smart card device when the client device detects that the smart card device is connected to the client device; a sending module, configured to receive and respond to a publishing instruction after completing the first identity authentication of the smart card device, and send a request instruction to a server, wherein the request instruction is used to request the source code of the software package to be published, and the server is configured to receive and respond to the request instruction, perform a second identity authentication on the smart card device, and send the compiled target source code corresponding to the request instruction to the client device after completing the second identity authentication of the smart card device; A publishing module, used for a client device to package the target source code into a software package and publish the software package; The authentication module is further used to perform the following steps: obtaining identification information of the smart card device, and determining whether the smart card device has completed registration before the client device detects that the smart card device is connected to the client device based on the identification information of the smart card device, wherein the identification information includes: the identity of the chip of the smart card device; if it is determined that the smart card device has completed registration before the client device detects that the smart card device is connected to the client device, the client device randomly generates a first key, wherein the smart card device is used to randomly generate a key pair, and the key pair includes: a private key and a public key, and the smart card device is also used to send the public key to the client device and store the private key in the smart card device; for the first key Performing obfuscation processing to obtain an obfuscated key, encrypting the obfuscated key with the public key to obtain a target key, wherein the length of the obfuscated key is greater than the length of the first key; obtaining the private key stored in the smart card device, decrypting the target key with the private key, and performing obfuscation extraction on the key obtained by the decryption processing according to a preset obfuscation extraction algorithm to obtain a second key; encrypting the second key with the private key to obtain a first target ciphertext, and decrypting the first target ciphertext with the public key to obtain a first target key; determining whether the first target key is consistent with the first key, and determining that the smart card device passes the first identity authentication if the first target key is consistent with the first key; The software package publishing device is also used to perform the following steps before sending a request instruction to the server: sending a trust module to the server, wherein the server is used to add the trust module to the authentication module of the operating system of the server; obtaining and storing the authorized identity identification information of the authorized server, and storing the authorized identity identification information in a target storage area in the authentication center; The software package publishing device is also used to perform the following steps before sending a request instruction to the server: receiving the first identity identification information sent by the server for the first time, and after receiving the first identity identification information sent by the server for the first time, performing the following steps: the target software module sends the received first identity identification information to the authentication center; the authentication center encrypts the first identity identification information by using the public key stored in the authentication center, and sends the encrypted first identity identification information to the target software module; the target software module decrypts the encrypted first identity identification information by using the private key stored in the smart card device to obtain the first target identity identification information, wherein the first target identity identification information includes: user name and password; The sending module is further used to perform the following steps: the target software module generates a first random number, and sends the request instruction to the trust module, wherein the request instruction includes: the first random number and the first target identity identification information, the trust module is used to call the system application program interface, modify the password to the first random number to obtain the first password, and send the first password to the authentication module, the authentication module is used to perform a second identity authentication on the smart card device through the first password and the user name; The software package publishing device is also used to receive the first identity identification information sent by the server for the ath time, and after receiving the first identity identification information sent by the server for the ath time, perform the following steps, wherein a is a positive integer not greater than n1, n1 is a positive integer greater than 1, and a is 2 to n1 in sequence: the target software module sends the received first identity identification information to the authentication center; the authentication center encrypts the first identity identification information by using the public key stored in the authentication center, and sends the encrypted first identity identification information to the target software module; the target software module decrypts the encrypted first identity identification information by using the private key stored in the smart card device to obtain the first target identity identification information, wherein the first target identity identification information includes: a user name and an a-1th password; The sending module is also used to execute the following steps: the target software module generates the ath random number and sends the request instruction to the trust module, wherein the request instruction includes: the ath random number and the first target identity identification information; the trust module is used to call the system application program interface, modify the a-1th password to the ath random number to obtain the ath password, and send the ath password to the authentication module; the authentication module is used to perform a second identity authentication on the smart card device through the 1st password and the user name.
10. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the software package publishing method according to any one of claims 1 to 8.
11. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the software package publishing method according to any one of claims 1 to 8 is executed when the program is run.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the software package publishing method according to any one of claims 1 to 8 is implemented.
