A cryptographic generation system, method, and apparatus based on distributed quasi-prime numbers

By using a distributed quasi-prime number generation system, which utilizes the collaboration of first and second servers to determine quasi-primes, the problem of low efficiency in prime number generation in existing technologies is solved, and the efficiency of password generation and the determinism of quasi-primes are improved.

CN114692125BActive Publication Date: 2025-11-14AISINO CORPORATION +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011598184.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2025-11-14
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

In the current password generation process, the efficiency of prime number generation is low, which in turn leads to low password generation efficiency.

Method used

A distributed quasi-prime number generation system is adopted. The first and second servers cooperate to determine random integers that meet preset conditions within their respective numerical ranges, and determine whether they are quasi-prime numbers by taking the remainder result. Finally, the third server generates the password.

Benefits of technology

It improves the efficiency of determining quasi-prime numbers and the efficiency of cryptographic generation, reduces the consumption of communication resources, and increases the probability that quasi-prime numbers are prime numbers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114692125B_ABST
    Figure CN114692125B_ABST
Patent Text Reader

Abstract

This invention discloses a cryptographic generation system, method, and apparatus based on distributed quasi-prime numbers. A second server randomly determines a second random integer within a second numerical range that satisfies a preset second extraction condition. When each third modulo result and each corresponding fourth modulo result of the second random integer satisfies a preset second synthesis condition, a quasi-prime number is determined based on the second random integer and a first random integer determined by the first server. The first random integer is an integer randomly determined by the first server within a first numerical range that satisfies the preset first extraction condition, and each corresponding first modulo result and each corresponding second modulo result satisfies the preset first synthesis condition. The first and second servers only need to communicate once to determine the quasi-prime number, reducing communication resources and the resources required for a single server to determine the quasi-prime number, improving the efficiency of prime number generation, and thus improving cryptographic generation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data security technology, and in particular to a cryptographic generation system, method, apparatus, device, and medium based on distributed quasi-prime numbers. Background Technology

[0002] In the implementation of cryptography in existing technologies, especially in the design of public-key cryptography schemes, it is often necessary to provide the function of generating prime numbers. For example, the key parameters p and q in the RSA encryption process must be prime numbers. Prime numbers are the foundation of modern public-key cryptography, and how to efficiently generate random prime numbers has always been an important aspect of improving the performance of cryptographic technologies.

[0003] In existing technologies, prime numbers are typically generated as follows: First, a random integer is selected, and then a primality test is used to determine whether the integer is a prime number. However, this method suffers from a linear relationship between the bit length of the randomly generated prime number and the number of primality tests required to determine a prime number of that bit length. Specifically, the longer the bit length of the randomly generated prime number, the more primality tests are required to determine a prime number of that bit length. This means that generating a prime number of a certain bit length may require generating random integers multiple times and performing a primality test on each generated integer. For example, generating a 1024-bit random prime number may require generating 1024 random integers and performing a primality test on each generated integer. This results in low efficiency in prime number generation, which in turn leads to very low efficiency in generating passwords based on these prime numbers. Summary of the Invention

[0004] This invention provides a cryptography generation system, method, apparatus, device, and medium based on distributed quasi-prime numbers to solve the problem of low efficiency in existing cryptography generation methods.

[0005] This invention provides a cryptographic generation system based on distributed quasi-prime numbers, the system comprising: a first server, a second server, and a third server;

[0006] The first server is configured to: determine a first random integer within a first numerical range that satisfies a preset first extraction condition; obtain the first remainder result of the first random integer with each prime number in a stored first prime number set, and the second remainder result of the first random integer with each prime number in a stored second prime number set; if it is determined that each first remainder result and each second remainder result satisfies a preset first synthesis condition, then generate a first communication protocol based on the first random integer and send it to the second server; wherein the first prime number set and the second prime number set are mutually exclusive;

[0007] The second server is configured to receive the first communication protocol sent by the first server; within a second numerical range, determine a second random integer that satisfies a preset second extraction condition; obtain the third remainder result of the second random integer with each prime number in the stored second prime number set, and the fourth remainder result of the second random integer with each prime number in the stored first prime number set; if it is determined that each of the third remainder results and each of the fourth remainder results satisfies a preset second synthesis condition, then determine a quasi-prime number based on the second random integer and the first random integer carried in the first communication protocol; when the quasi-prime number is determined to be a prime number, send the quasi-prime number to the third server;

[0008] The third server is used to receive the quasi-prime number and generate a password based on the quasi-prime number.

[0009] This invention provides a cryptographic generation method based on distributed quasi-prime numbers, the method comprising:

[0010] Within the second numerical range, a second random integer that satisfies the preset second extraction condition is determined;

[0011] Obtain the third remainder result of the second random integer with each prime number in the saved second set of prime numbers, and the fourth remainder result of the second random integer with each prime number in the saved first set of prime numbers;

[0012] If it is determined that each of the third remainder results and each of the fourth remainder results satisfies the preset second synthesis condition, then the quasi-prime number is determined according to the second random integer and the first random integer carried in the first communication protocol sent by the first server.

[0013] When the quasi-prime number is determined to be a prime number, the quasi-prime number is sent to a third server so that the third server, upon receiving the quasi-prime number, generates a password based on the quasi-prime number.

[0014] This invention provides a cryptographic generation device based on distributed quasi-prime numbers, the device comprising:

[0015] The determining unit is used to determine a second random integer that satisfies a preset second extraction condition within a second numerical range;

[0016] The acquisition unit is used to acquire the third remainder result of the second random integer with each prime number in the stored second prime number set, and the fourth remainder result of the second random integer with each prime number in the stored first prime number set;

[0017] The processing unit is configured to, if it is determined that each of the third modulo results and each of the fourth modulo results satisfies a preset second synthesis condition, determine a quasi-prime number based on the second random integer and the first random integer carried in the first communication protocol sent by the first server; and determine whether the quasi-prime number is a prime number.

[0018] A sending unit is used to send the quasi-prime number to a third server when the processing unit determines that the quasi-prime number is a prime number, so that the third server generates a password based on the quasi-prime number after receiving it.

[0019] This invention provides an electronic device, which includes at least a processor and a memory. The processor executes a computer program stored in the memory to implement the steps of the cryptographic generation method based on distributed quasi-prime numbers as described above.

[0020] This invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the cryptographic generation method based on distributed quasi-prime numbers described above.

[0021] In the password generation system, the second server randomly determines a second random integer within a second numerical range that satisfies a preset second extraction condition. When the second server determines that each third modulo result and each corresponding fourth modulo result of the second random integer satisfies a preset second synthesis condition, it determines a quasi-prime number based on the second random integer and a first random integer carried in the first communication protocol received from the first server. This first random integer is also an integer randomly determined by the first server within a first numerical range that satisfies the preset first extraction condition, and each corresponding first modulo result and each corresponding second modulo result satisfies the preset first synthesis condition. Since the first and second servers only need to communicate sequentially to determine the quasi-prime number, communication resources are reduced. Furthermore, the quasi-prime number determined through the collaboration of the first and second servers reduces the resources required for a single server to determine the quasi-prime number. Because the probability of a quasi-prime number being prime is higher than the probability of any randomly determined integer being prime, the probability of the determined quasi-prime number being prime is higher, thus improving not only the efficiency of determining quasi-prime numbers but also the efficiency of determining prime numbers, thereby improving the efficiency of password generation. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A schematic diagram of a cryptographic generation system based on distributed quasi-prime numbers provided in an embodiment of the present invention;

[0024] Figure 2 A schematic diagram illustrating the workflow of a specific password generation system provided in this embodiment of the invention;

[0025] Figure 3 This is a schematic diagram of the workflow of another password generation system provided in an embodiment of the present invention;

[0026] Figure 4 A schematic diagram illustrating a cryptographic generation process based on distributed quasi-prime numbers, provided as an embodiment of the present invention;

[0027] Figure 5 A schematic diagram of a cryptographic generation device based on distributed quasi-prime numbers provided in an embodiment of the present invention;

[0028] Figure 6 This is a schematic diagram of an electronic device structure provided in an embodiment of the present invention. Detailed Implementation

[0029] The present invention will now be described in further detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0030] To improve the efficiency of password generation, embodiments of the present invention provide a password generation system, method, apparatus, device, and medium based on distributed quasi-prime numbers.

[0031] In practical applications, once an integer is identified as a quasi-prime number, the probability that the integer is indeed prime is generally greater than 5%, which is higher than the probability of a randomly determined integer being prime. To determine a quasi-prime number, the first server first generates a first random integer and receives a second random integer from the second server. Then, the sum of the second and first random integers is divided by a series of consecutive prime numbers starting from 3. Only sums not divisible by any prime number are considered quasi-prime. However, the probability of a sum determined this way being a quasi-prime number is very low. If a sum is not a quasi-prime number, the first server needs to regenerate the first random integer and communicate with the second server again to inform them of the regeneration and to obtain the newly generated second random integer. After receiving the newly generated second random integer from the second server, the first server determines a new sum based on both the first and second random integers. Then, it determines whether the new sum is a quasi-prime number based on whether it is divisible by any prime number. If it is determined that the new sum is also not a quasi-prime number, the above steps need to be followed until a quasi-prime number is determined. During the process of determining a quasi-prime number, the first and second servers communicate multiple times, making the process of generating a quasi-prime number through cooperation among multiple servers in the entire distributed application scenario extremely cumbersome, inefficient, and wasteful of significant network resources. This results in low efficiency in determining prime numbers, and consequently, low efficiency in the password generation process.

[0032] Example 1:

[0033] Figure 1 This is a schematic diagram of a distributed quasi-prime number-based cryptographic generation system provided in an embodiment of the present invention. The system includes: a first server 11, a second server 12, and a third server 13.

[0034] The first server 11 is configured to: determine a first random integer within a first numerical range that satisfies a preset first extraction condition; obtain the first remainder result of the first random integer with each prime number in a stored first prime number set, and the second remainder result of the first random integer with each prime number in a stored second prime number set; if it is determined that each first remainder result and each second remainder result satisfies a preset first synthesis condition, then generate a first communication protocol based on the first random integer and send it to the second server 12; wherein the first prime number set and the second prime number set are mutually exclusive;

[0035] The second server 12 is configured to receive the first communication protocol sent by the first server 11; within a second numerical range, determine a second random integer that satisfies a preset second extraction condition; obtain the third remainder result of the second random integer with each prime number in the stored second prime number set, and the fourth remainder result of the second random integer with each prime number in the stored first prime number set; if it is determined that each of the third remainder results and each of the fourth remainder results satisfies a preset second synthesis condition, then determine a quasi-prime number based on the second random integer and the first random integer carried in the first communication protocol; when the quasi-prime number is determined to be a prime number, send the quasi-prime number to the third server 13;

[0036] The third server 13 is used to receive the quasi-prime number and generate a password based on the quasi-prime number.

[0037] The password generation system provided in this embodiment of the invention includes at least two servers. When any server in the password generation system performs the function of the first server 11, all other servers in the password generation system can perform the function of the second server 12. Similarly, when any server in the password generation system performs the function of the second server 12, all other servers in the password generation system can perform the function of the first server 11. The server performing the function of the third server 13 can also be used to perform the function of the first server 11 or the function of the second server 12. That is, the third server 13 can be the same server as the first server 11 or the second server 12, or it can be a server different from both the first server 11 and the second server 12.

[0038] The system comprises the following: First server 11 generates a first random integer and sends it to second server 12 when the first random integer meets certain conditions. Second server 12 generates a second random integer and, when the second random integer meets certain conditions, determines a quasi-prime number based on the second random integer and the first random integer received from first server 11. When the quasi-prime number is determined to be prime, it is sent to third server 13. Third server 13 receives the quasi-prime number sent by second server 12 and generates a password based on the quasi-prime number.

[0039] In this embodiment of the invention, a first extraction condition is preset in order to determine the first random integer more accurately. The preset first extraction condition may be that the first random value satisfies a certain functional relationship. When the first server 11 receives a password generation request, it will determine a first random integer that satisfies the preset first extraction condition from the saved first value range. The first random integer is any integer in the first value range that satisfies the preset first extraction condition.

[0040] The password generation request can be generated by the first server 11 or received from other electronic devices. When the password generation request is generated by the first server 11, a password generation cycle may be pre-configured, and the first server 11 generates the password generation request according to the pre-configured cycle. When the password generation request is sent by other electronic devices, it may be that the user inputs a password generation command to the other electronic device as needed, and after receiving the password generation command, the other electronic device generates a password generation request and sends it to the first server 11, or a password generation cycle may be pre-configured, and other electronic devices generate password generation requests according to the pre-configured cycle and send them to the first server 11.

[0041] In one possible implementation, the first server 11 is specifically used to determine any integer whose remainder after being divided by 4 is 3 within a first numerical range as a first random integer.

[0042] In this embodiment of the invention, the preset first extraction condition can be that the remainder after dividing an integer by 4 is 3. Therefore, when the first server 11 receives a password generation request, it will select an integer from the saved first numerical range that has a remainder of 3 after being divided by 4, determine that the integer satisfies the preset first extraction condition, and then determine the integer as the first random value.

[0043] The first server 11 may sequentially or randomly determine whether any integer within the first numerical range satisfies the preset first extraction condition. When an integer is determined to satisfy the preset first extraction condition, the integer is determined as the first random integer. Alternatively, after determining each integer within the first numerical range that satisfies the preset first extraction condition (referred to as the first target integer for ease of explanation), any first target integer is determined as the first random integer.

[0044] Similarly, in this embodiment of the invention, a second extraction condition is preset in order to determine the second random integer more accurately. The preset second extraction condition may be that the second random value satisfies a certain functional relationship. When the second server 12 receives a password generation request, it will determine a second random integer that satisfies the preset second extraction condition from the saved range of second values. The second random integer is any integer in the range of second values ​​that satisfies the preset second extraction condition.

[0045] In one possible implementation, the second server 12 is specifically used to determine any value within a second numerical range that has a remainder of 0 after being divided by 4 as a second random integer.

[0046] In this embodiment of the invention, the preset second extraction condition can be that the remainder after dividing the value by 4 is 0. Therefore, when the second server 12 receives a password generation request, it will obtain an integer from the saved second value range that has a remainder of 0 after dividing by 4, determine that the integer satisfies the preset second extraction condition, and then determine the integer as the second random value.

[0047] The second server 12 can sequentially or randomly determine whether any integer within the second numerical range satisfies the preset second extraction condition. When an integer is determined to satisfy the preset second extraction condition, it is determined as the second random integer. Alternatively, after determining each integer within the second numerical range that satisfies the preset second extraction condition (referred to as the second target integer for ease of explanation), any second target integer is determined as the second random integer.

[0048] The second numerical range may be the same as or different from the first numerical range.

[0049] In one possible implementation, the first numerical range stored by the first server 11 may be pre-set by a human.

[0050] In this embodiment of the invention, to determine whether the generated first random integer can be identified as a quasi-prime number, the first server 11 stores a first set of prime numbers and a second set of prime numbers. Both the first and second sets of prime numbers consist of at least one prime number, and the first and second sets of prime numbers are disjoint, meaning the prime numbers contained in the first set are completely different from those contained in the second set. For each prime number contained in the first set of prime numbers, a first modulo result corresponding to the first random integer is determined based on the first random integer and the prime number. Similarly, for each prime number contained in the second set of prime numbers, a second modulo result corresponding to the first random integer is determined based on the first random integer and the prime number.

[0051] In one possible implementation, the first server 11 is further configured to determine the first set of prime numbers and the second set of prime numbers in the following manner:

[0052] For each prime number greater than a preset first value, a first product is determined based on the prime number and each first prime number less than the prime number but not less than the first value; a second product is determined based on the first product and the minimum value among each second prime number greater than the prime number; if it is determined that the first product is less than a preset second value and the second product is not less than a preset second value, then the prime number and each first prime number are determined as the target prime number.

[0053] The first set of prime numbers and the second set of prime numbers are determined based on each of the target prime numbers.

[0054] In this embodiment of the invention, the first set of prime numbers and the second set of prime numbers stored by the first server 11 can be manually configured or sent by other electronic devices. Alternatively, the first server 11 can determine and store them according to pre-configured set determination rules.

[0055] When the first set of prime numbers and the second set of prime numbers are determined and saved by the first server 11 according to the pre-configured set determination rules, a first value is preset in order to determine the first set of prime numbers and the second set of prime numbers, for example, 3. For each prime number greater than a preset first value, determine each prime number less than the prime number but not less than the preset first value (for ease of explanation, denoted as the first prime number); determine the product based on the prime number and each first prime number (for ease of explanation, denoted as the first product); simultaneously, determine each prime number greater than the prime number (for ease of explanation, denoted as the second prime number), determine the minimum value among each second prime number, and determine the product based on the prime number, each first prime number, and the minimum value (for ease of explanation, denoted as the second product), that is, determine the second product based on the first product and the minimum value; after obtaining the first product and the second product corresponding to the prime number, determine whether the first product is less than a preset second value and whether the second product is not less than a preset second value; if it is determined that the first product is less than the preset second value and the second product is not less than the preset second value, then the prime number and each first prime number are determined as target prime numbers, that is, each prime number contained in the first prime number set and the second prime number set.

[0056] Each target prime number is split into two disjoint sets. One set is designated as the first prime set, and the other set is designated as the second prime set.

[0057] When splitting each target prime number into two disjoint sets, one approach is to determine a first quantity corresponding to the first prime set and a second quantity corresponding to the second prime set based on the number of target prime numbers. Then, a first quantity of target prime numbers is randomly selected from the target prime numbers as the prime numbers in the first prime set, and a second quantity of target prime numbers is randomly selected from the target prime numbers as the prime numbers in the second prime set. The sum of the first and second quantities represents the number of target prime numbers, which may or may not be equal. Alternatively, a pre-configured quantity corresponding to a prime set (including both the first and second prime sets) can be used. This pre-configured quantity of target prime numbers is randomly selected from the target prime numbers as the prime numbers included in that set, and the remaining target prime numbers are designated as the prime numbers included in the other prime set. For example, a first quantity corresponding to the first prime set can be pre-configured, and a first quantity of target prime numbers can be randomly selected from the target prime numbers as the prime numbers included in the first prime set, with the remaining target prime numbers designated as the prime numbers included in the second prime set.

[0058] In one possible implementation, the method for determining the target prime number can be determined by the following formula:

[0059] ,and,

[0060] in, Indicates the first There are _n_ prime numbers, where n is a pre-defined second value. Indicates greater than The minimum value among every second prime number; … Indicates less than But not less than the preset first prime number for each first prime number.

[0061] It should be noted that the first set of prime numbers and the second set of prime numbers stored on the second server 12 are the same as the first set of prime numbers and the second set of prime numbers stored on the first server 11. The specific determination process is the same as the process of determining the first set of prime numbers and the second set of prime numbers on the first server 11. The repeated parts will not be described again.

[0062] In this embodiment of the invention, the first numerical range may also be determined by the first server 11 according to a pre-configured range determination rule. Specifically, the first server 11 is further configured to determine any prime number in the first set of prime numbers as a first upper limit threshold of the first numerical range; and to determine a first lower limit threshold of the first numerical range according to a pre-configured first lower limit threshold; wherein the first lower limit threshold is not greater than the first upper limit threshold.

[0063] In this embodiment of the invention, a first minimum threshold is pre-configured, and the pre-configured first minimum threshold is directly determined as the first lower limit threshold of the first numerical range. Any prime number in the saved first set of prime numbers is determined as the first upper limit threshold of the first numerical range. The first numerical range is determined according to the first upper limit threshold and the first lower limit threshold, wherein the first lower limit threshold is not greater than the first upper limit threshold.

[0064] For example, if the first minimum threshold is 0, and a certain prime number a in the saved first set of prime numbers is determined as the first upper limit threshold, then the range of the first value is determined to be (0, a) based on the first upper limit threshold a and the first lower limit threshold 0.

[0065] Similarly, the second server 12 can also determine the second numerical range through pre-configured range determination rules. Specifically, the second server 12 is further configured to determine any prime number in the second set of prime numbers as the second upper limit threshold of the second numerical range; and to determine the second lower limit threshold of the second numerical range according to a pre-configured second lower limit threshold; wherein the second lower limit threshold is not greater than the second upper limit threshold.

[0066] Since the process by which the second server 12 determines the second numerical range is similar to the process by which the first server 11 determines the first numerical range, the repetitive parts will not be described again.

[0067] Through the above steps, each first remainder result and each second remainder result corresponding to the first random integer can be obtained. Each first remainder result and each second remainder result corresponding to the first random integer can be processed accordingly to determine whether the first random integer can be used to generate a quasi-prime number.

[0068] To determine whether the first random integer can be used to generate quasi-prime numbers, a first synthesis condition is preset in this embodiment of the invention. This first synthesis condition may be that each first modulo result corresponding to the first random integer is a preset first value, and each second modulo result corresponding to the first random integer is not a preset first value. After obtaining each first modulo result and each second modulo result corresponding to the first random integer, it is determined whether each first modulo result and each second modulo result satisfies the preset first synthesis condition. If it is determined that each first modulo result and each second modulo result satisfies the preset first synthesis condition, a first communication protocol is generated based on the first random integer, and the generated first communication protocol is sent to the second server 12. If it is determined that each first remainder result and each second remainder result do not satisfy the preset first synthesis condition, it means that the first random integer cannot be used to generate a quasi-prime number, let alone to determine a prime number. Then, within the saved first numerical range, another first random integer that satisfies the preset first extraction condition is determined, and the steps of obtaining each first remainder result and each second remainder result corresponding to the newly generated first random integer, and determining whether each first remainder result and each second remainder result satisfies the preset first synthesis condition are executed, until each first remainder result and each second remainder result corresponding to the currently determined first random integer satisfies the preset first synthesis condition.

[0069] In one possible implementation, the first server 11 is specifically configured to determine that each of the first remainder results and each of the second remainder results satisfies a preset first synthesis condition if it is determined that each of the first remainder results is 0 and each of the second remainder results is not 0.

[0070] In this embodiment of the invention, the first synthesis condition can be that each first remainder result is 0 and each second remainder result is not 0. After determining, based on the above embodiment, that each first remainder result corresponding to the first random integer and each second remainder result corresponding to the first random integer are obtained, it is determined whether each first remainder result is 0 and whether each second remainder result is not 0. If each first remainder result is determined to be 0, and each second remainder result is not 0, it means that the first random integer is divisible by every prime number in the first set of prime numbers, but not by every prime number in the second set of prime numbers. In this case, each first remainder result and each second remainder result corresponding to the first random integer satisfy the preset first synthesis condition. If any first remainder result is not 0, or any second remainder result is 0, it means that the first random integer is not divisible by every prime number in the first set of prime numbers, or the first random integer is divisible by any prime number in the second set of prime numbers. In this case, each first remainder result and each second remainder result corresponding to the first random integer do not satisfy the preset first synthesis condition.

[0071] Similarly, in this embodiment of the invention, to determine whether the generated second random integer can be identified as a quasi-prime number, the second server 12 stores a first set of prime numbers and a second set of prime numbers. Both the first and second sets of prime numbers contain at least one prime number, and the first and second sets of prime numbers are disjoint, meaning the prime numbers in the first and second sets are completely different. For each prime number in the second set of prime numbers, a third modulo result is determined based on the second random integer and that prime number. And for each prime number in the first set of prime numbers, a fourth modulo result is determined based on the second random integer and that prime number.

[0072] Through the above steps, each third remainder result and each fourth remainder result corresponding to the second random integer can be obtained. Each third remainder result and each fourth remainder result corresponding to the second random integer are then processed accordingly to determine whether the second random integer can be used to generate a quasi-prime number.

[0073] To determine whether the second random integer can be used to generate quasi-prime numbers, a second synthesis condition is preset in this embodiment of the invention. This second synthesis condition may be that each third modulo result corresponding to the second random integer is a preset second value, and each fourth modulo result corresponding to the second random integer is not a preset second value, etc. After obtaining each third modulo result and each fourth modulo result corresponding to the second random integer, it is determined whether each third modulo result and each fourth modulo result corresponding to the second random integer satisfies the preset second synthesis condition. If it is determined that each third remainder result and each fourth remainder result does not satisfy the preset second synthesis condition, it means that the second random integer cannot be used to generate quasi-prime numbers, let alone determine prime numbers. Then, within the saved second numerical range, another second random integer that satisfies the preset second extraction condition is determined. The process of obtaining each third remainder result and each fourth remainder result corresponding to this newly generated second random integer, and determining whether each third remainder result and each fourth remainder result satisfies the preset second synthesis condition, continues until each third remainder result and each fourth remainder result corresponding to the currently determined second random integer satisfies the preset second synthesis condition. If it is determined that each third remainder result and each fourth remainder result satisfies the preset second synthesis condition, subsequent processing is performed based on the second random integer.

[0074] In one possible implementation, the second server 12 is specifically configured to determine that each of the third remainder results and each of the fourth remainder results satisfies a preset second synthesis condition if it is determined that each of the third remainder results is 0 and each of the fourth remainder results is not 0.

[0075] In this embodiment of the invention, the second synthesis condition can be that each third remainder result is 0 and each fourth remainder result is not 0. After determining, based on the above embodiment, that each third remainder result and each fourth remainder result corresponding to the second random integer are obtained, it is determined whether each third remainder result is 0 and whether each fourth remainder result is not 0. If each third remainder result is determined to be 0, and each fourth remainder result is not 0, it means that the second random integer is divisible by every prime number in the second set of prime numbers, but not by every prime number in the first set of prime numbers. In this case, each third remainder result and each fourth remainder result corresponding to the second random integer satisfy the preset second synthesis condition. If any third remainder result is not 0, or any fourth remainder result is 0, it means that the second random integer is not divisible by every prime number in the second set of prime numbers, or the second random integer is divisible by any prime number in the first set of prime numbers. In this case, each third remainder result and each fourth remainder result corresponding to the second random integer do not satisfy the preset second synthesis condition.

[0076] Based on the description in the above embodiments, when the first server 11 determines that each first modulo result and each second modulo result corresponding to the first random integer satisfies the preset first synthesis condition, it generates a first communication protocol based on the first random integer and sends it to the second server 12. After receiving the first communication protocol sent by the first server 11, the second server 12 parses the first communication protocol to obtain the first random integer carried in it. After determining that each third modulo result and each fourth modulo result corresponding to the second random integer satisfies the preset second synthesis condition, the second server 12 determines a quasi-prime number based on the first and second random integers and judges whether the quasi-prime number is a prime number. When the quasi-prime number is determined to be a prime number, it sends the quasi-prime number to the third server 13.

[0077] The process of determining whether a quasi-prime number is a prime number is existing technology and will not be elaborated here.

[0078] In one possible implementation, the second server 12 is specifically configured to determine the sum of the first random integer and the second random integer as a quasi-prime number.

[0079] For example, if the first random integer is A and the second random integer is B, the quasi-prime number determined by the first random integer A and the second random integer B is A+B.

[0080] In one possible implementation, the second server 12 is further configured to, after determining that each of the third modulo results and each of the fourth modulo results satisfies the preset second synthesis condition, generate a second communication protocol based on the second random integer and send it to the first server 11;

[0081] The first server 11 is further configured to receive the second communication protocol; determine a quasi-prime number based on the first random integer and the second random integer carried by the second communication protocol; and when the quasi-prime number is determined to be a prime number, send the quasi-prime number to the third server 13.

[0082] Based on the above embodiments, when the second server 12 determines that each third modulo result and each fourth modulo result corresponding to the second random integer satisfy the preset second synthesis condition, it can also generate a second communication protocol based on the second random integer and send it to the first server 11. After receiving the second communication protocol sent by the second server 12, the first server 11 parses the second communication protocol to obtain the second random integer carried in the second communication protocol. After determining that each first modulo result and each second modulo result corresponding to the first random integer satisfy the preset first synthesis condition, the first server 11 determines a quasi-prime number based on the first random integer and the second random integer. It then determines whether the quasi-prime number is a prime number. If the quasi-prime number is determined to be a prime number, it sends the quasi-prime number to the third server 13.

[0083] After obtaining the quasi-prime number, the third server 13 performs corresponding processing based on the quasi-prime number and the pre-configured encryption algorithm to generate a password.

[0084] Specifically, the process of generating passwords based on quasi-prime numbers and pre-configured encryption algorithms is existing technology and will not be elaborated here.

[0085] In the password generation system, the second server 12 randomly determines a second random integer within a second numerical range that satisfies a preset second extraction condition. When the second server 12 determines that each third modulo result and each corresponding fourth modulo result of the second random integer satisfies a preset second synthesis condition, it determines a quasi-prime number based on the second random integer and the first random integer carried in the first communication protocol received from the first server 11. This first random integer is also an integer randomly determined by the first server 11 within the first numerical range that satisfies the preset first extraction condition, and each corresponding first modulo result and each corresponding second modulo result satisfies the preset first synthesis condition. Since the first server 11 and the second server 12 only need to communicate sequentially to determine the quasi-prime number, the communication resources consumed are reduced. Furthermore, the quasi-prime number determined through the cooperation of the first server 11 and the second server 12 also reduces the resources required for a single server to determine the quasi-prime number. Because the probability of a quasi-prime number being prime is higher than the probability of any randomly determined integer being prime, the probability of the determined quasi-prime number being prime is higher, which not only improves the efficiency of determining quasi-prime numbers but also improves the efficiency of determining prime numbers, thereby improving the efficiency of password generation.

[0086] Example 2:

[0087] For ease of description, the workflow of the distributed quasi-prime number-based cryptographic generation system provided in this invention will be explained in detail below through specific embodiments. Figure 2 This is a schematic diagram of the workflow of a specific password generation system provided in an embodiment of the present invention. The workflow includes:

[0088] First, determine the set of prime numbers L that includes each target prime number.

[0089] For each prime number greater than a preset first value, a first product is determined based on the prime number and each first prime number less than the prime number but not less than the first value; a second product is determined based on the minimum value among the first product and each second prime number greater than the prime number; if it is determined that the first product is less than a preset second value and the second product is not less than a preset second value, then the prime number and each of the first prime numbers are determined as target prime numbers. A set of prime numbers L is determined based on each target prime number.

[0090] In one possible implementation, the method for determining the target prime number can be determined by the following formula:

[0091] ,and,

[0092] in, Indicates the first There are _n_ prime numbers, where n is a pre-defined second value. Indicates greater than The minimum value among every second prime number; … Indicates less than But not less than the preset first prime number for each first prime number.

[0093] Secondly, based on the set of prime numbers L, determine the first set of prime numbers. and the second set of prime numbers .

[0094] The first set of prime numbers determined above and the second set of prime numbers It is stored on the first server 11A and the second server 12S.

[0095] Next, determine the first numerical range (0, ) and the second numerical range (0, ).

[0096] Specifically, the process of determining the first numerical range includes: assuming a pre-configured first minimum threshold is 0, determining a first lower limit threshold of the first numerical range as 0 based on the pre-configured first minimum threshold; and selecting any prime number from the first set of prime numbers. The first upper limit threshold is determined as the first numerical range; wherein the first lower limit threshold 0 is not greater than the first upper limit threshold. .

[0097] Specifically, the process of determining the second numerical range includes: assuming a pre-configured second minimum threshold is 0, determining the second lower limit threshold of the second numerical range to also be 0 based on the pre-configured second minimum threshold; and selecting any prime number from the second set of prime numbers. The second upper limit threshold is determined as the second numerical range; wherein the second lower limit threshold 0 is not greater than the second upper limit threshold. .

[0098] Therefore, the first server 11 determines that a first random integer determined from a first numerical range can be used to determine a quasi-prime number, and the second server 12 determines that a second random integer determined from a second numerical range can be used to determine a quasi-prime number.

[0099] Specifically, the first random integer determined by the first server 11 from a first numerical range can be used to determine quasi-prime numbers, including:

[0100] For any integer within the first numerical range, the integer is determined as the first random integer, and the remainder obtained after dividing the first random integer by 4 is determined to be 3; the first remainder result of the first random integer with each prime number in the first set of prime numbers and the second remainder result of the first random integer with each prime number in the second set of prime numbers are obtained, and each of the first remainder results is determined to be 0 and each of the second remainder results is determined to be non-zero, then the first random integer can be used to determine quasi-prime numbers.

[0101] In one possible implementation, a first random integer determined by the first server 11 from a first numerical range can be used to determine a quasi-prime number, which can be determined by the following formula:

[0102]

[0103] in, Represents the first random integer. … Represent each prime number in the first set of prime numbers. … Represent each prime number in the second set of prime numbers. … This represents the result of each second modulo operation.

[0104] Specifically, the second random integer determined by the second server 12 from the second numerical range can be used to determine quasi-prime numbers, including:

[0105] For any integer within the second numerical range, the integer is determined as the second random integer, and the remainder obtained after dividing the second random integer by 4 is determined to be 0. The third remainder result of the second random integer with each prime number in the stored second prime number set and the fourth remainder result of the second random integer with each prime number in the stored first prime number set are obtained. If each of the third remainder results is 0 and each of the fourth remainder results is not 0, then the second random integer can be used to determine quasi-prime numbers.

[0106] In one possible implementation, the second random integer determined by the second server 12 from a second numerical range can be used to determine the quasi-prime number by the following formula:

[0107]

[0108] in, Represents the second random integer. … Represent each prime number in the first set of prime numbers. … Represent each prime number in the second set of prime numbers. … This represents the result of each fourth modulo operation.

[0109] Furthermore, the first server 11 generates a first communication protocol based on a first random integer and sends it to the second server 12, and the second server 12 generates a second communication protocol based on a second random integer and sends it to the first server 11.

[0110] Next, based on the first random integer and the second random integer Determine the quasi-prime number p.

[0111] Finally, when the quasi-prime number p is determined to be a prime number, the quasi-prime number p is sent to the third server 13 so that the third server 13 can generate a password based on the quasi-prime number p after receiving it.

[0112] Figure 3 This is a schematic diagram of the workflow of another password generation system provided in an embodiment of the present invention. The workflow includes:

[0113] First, determine the set of prime numbers L that includes each target prime number.

[0114] The set of prime numbers L contains every prime number in the range of 3 to 751.

[0115] The specific determination process has been described in the above embodiments, and will not be repeated here.

[0116] Secondly, based on the set of prime numbers L, determine the first set of prime numbers. and the second set of prime numbers .

[0117] Sort each prime number in the prime number set L in ascending order, and then partition each sorted prime number into the first prime number set at intervals. and the second set of prime numbers In the middle. For example, the first set of prime numbers. The x-th prime number in the set is the (2x-1)-th prime number among all sorted prime numbers, and the second set of prime numbers. The x-th prime number in the sequence is the 2x-th prime number among all sorted prime numbers.

[0118] The first set of prime numbers determined above and the second set of prime numbers It is stored on the first server 11A and the second server 12S.

[0119] Next, determine the first numerical range (0, ) and the second numerical range (0, ).

[0120] Specifically, taking the above example, each prime number in the prime number set L is sorted in ascending order, and each sorted prime number is then partitioned into the first prime number set. and the second set of prime numbers In this process, determining the first numerical range includes: assuming a pre-configured first minimum threshold of 0, and the first set of prime numbers contains i prime numbers. Based on the pre-configured first minimum threshold of 0, the first lower limit threshold of the first numerical range is also determined to be 0; the last prime number included in the first set of prime numbers... The first upper limit threshold is determined as the first numerical range; wherein the first lower limit threshold 0 is not greater than the first upper limit threshold. .

[0121] Specifically, taking the above example, we sort each prime number in the prime number set L in ascending order, and then partition each sorted prime number into the first prime number set. and the second set of prime numbers In this process, determining the second numerical range involves: assuming a pre-configured second minimum threshold of 0, and the second set of prime numbers also contains i prime numbers. Based on the pre-configured second minimum threshold of 0, the second lower limit threshold of the second numerical range is also determined to be 0; any prime number in the second set of prime numbers... The second upper limit threshold is determined as the second numerical range; wherein the second lower limit threshold 0 is not greater than the second upper limit threshold. .

[0122] Therefore, the first server 11 determines that a first random integer determined from a first numerical range can be used to determine a quasi-prime number, and the second server 12 determines that a second random integer determined from a second numerical range can be used to determine a quasi-prime number.

[0123] In one possible implementation, a first random integer determined by the first server 11 from a first numerical range can be used to determine a quasi-prime number, which can be determined by the following formula:

[0124]

[0125] in, Represents the first random integer. … This represents the result of each second modulo operation.

[0126] In one possible implementation, the second random integer determined by the second server 12 from a second numerical range can be used to determine the quasi-prime number by the following formula:

[0127]

[0128] in, Represents the second random integer. … This represents the result of each fourth modulo operation.

[0129] Furthermore, the first server 11 generates a first communication protocol based on a first random integer and sends it to the second server 12, and the second server 12 generates a second communication protocol based on a second random integer and sends it to the first server 11.

[0130] Next, based on the first random integer and the second random integer Determine the quasi-prime number p.

[0131] Finally, when the quasi-prime number p is determined to be a prime number, the quasi-prime number p is sent to the third server 13 so that the third server 13 can generate a password based on the quasi-prime number p after receiving it.

[0132] Example 3:

[0133] This invention also provides a cryptographic generation method based on distributed quasi-prime numbers. Figure 4 A schematic diagram of a cryptographic generation process based on distributed quasi-prime numbers is provided for an embodiment of the present invention. The process includes:

[0134] S401: Within the second numerical range, determine a second random integer that satisfies the preset second extraction condition.

[0135] S402: Obtain the third remainder result of the second random integer with each prime number in the stored second prime number set, and the fourth remainder result of the second random integer with each prime number in the stored first prime number set.

[0136] S403: If it is determined that each of the third remainder results and each of the fourth remainder results satisfies the preset second synthesis condition, then a quasi-prime number is determined according to the second random integer and the first random integer carried in the first communication protocol sent by the first server.

[0137] S404: When the quasi-prime number is determined to be a prime number, the quasi-prime number is sent to a third server so that the third server, upon receiving the quasi-prime number, generates a password based on the quasi-prime number.

[0138] The password generation method provided in this embodiment of the invention is applied to a server.

[0139] Further, determining a second random integer within the second numerical range that satisfies a preset second extraction condition includes:

[0140] Within the second numerical range, any integer whose remainder after being divided by 4 is 0 is determined as the second random integer.

[0141] Furthermore, the first set of prime numbers and the second set of prime numbers are determined in the following manner:

[0142] For each prime number greater than a preset first value, a first product is determined based on the prime number and each first prime number less than the prime number but not less than the first value; a second product is determined based on the first product and the minimum value among each second prime number greater than the prime number; if it is determined that the first product is less than a preset second value and the second product is not less than a preset second value, then the prime number and each first prime number are determined as the target prime number.

[0143] The first set of prime numbers and the second set of prime numbers are determined based on each of the target prime numbers.

[0144] Furthermore, the second numerical range is determined as follows:

[0145] Any prime number in the second set of prime numbers is determined as the second upper limit threshold of the second numerical range; a second lower limit threshold of the second numerical range is determined according to a pre-configured second minimum threshold; wherein the second lower limit threshold is not greater than the second upper limit threshold.

[0146] Further, determining that each of the third remainder results and each of the fourth remainder results satisfies a preset second synthesis condition includes:

[0147] If it is determined that each of the third remainder results is 0 and each of the fourth remainder results is not 0, then it is determined that each of the third remainder results and each of the fourth remainder results satisfies the preset second synthesis condition.

[0148] Furthermore, after determining that each of the third remainder results and each of the fourth remainder results satisfies the preset second synthesis condition, the method further includes:

[0149] A second communication protocol is generated based on the second random integer and sent to the first server, so that after receiving the second communication protocol, the first server determines a quasi-prime number based on the first random integer and the second random integer carried by the second communication protocol, and when the quasi-prime number is determined to be a prime number, it sends the quasi-prime number to the third server.

[0150] Further, determining the quasi-prime number based on the second random integer and the first random integer carried in the first communication protocol includes:

[0151] The sum of the first random integer and the second random integer is determined to be a quasi-prime number.

[0152] Example 4:

[0153] This invention also provides a cryptographic generation device based on distributed quasi-prime numbers. Figure 5 This is a schematic diagram of a cryptographic generation device based on distributed quasi-prime numbers provided in an embodiment of the present invention. The device includes:

[0154] The determining unit 51 is used to determine a second random integer that satisfies a preset second extraction condition within a second numerical range;

[0155] The acquisition unit 52 is used to acquire the third remainder result of the second random integer with each prime number in the stored second prime number set, and the fourth remainder result of the second random integer with each prime number in the stored first prime number set;

[0156] Processing unit 53 is configured to, if it is determined that each of the third modulo results and each of the fourth modulo results satisfies a preset second synthesis condition, determine a quasi-prime number based on the second random integer and the first random integer carried in the first communication protocol sent by the first server; and determine whether the quasi-prime number is a prime number.

[0157] The sending unit 54 is used to send the quasi-prime number to the third server when the processing unit 53 determines that the quasi-prime number is a prime number, so that the third server generates a password based on the quasi-prime number after receiving the quasi-prime number.

[0158] Furthermore, the determining unit 51 is specifically used to determine any integer whose remainder after dividing by 4 is 0 within the second numerical range as the second random integer.

[0159] Furthermore, the processing unit 53 is also configured to, for each prime number greater than a preset first value, determine a first product based on the prime number and each first prime number less than the prime number but not less than the first value; determine a second product based on the minimum value among the first product and each second prime number greater than the prime number; if it is determined that the first product is less than a preset second value and the second product is not less than the preset second value, then determine the prime number and each first prime number as target prime numbers; and determine the first set of prime numbers and the second set of prime numbers based on each target prime number.

[0160] Furthermore, the processing unit 53 is also configured to determine any prime number in the second set of prime numbers as the second upper limit threshold of the second numerical range; and to determine the second lower limit threshold of the second numerical range according to a pre-configured second minimum threshold; wherein the second lower limit threshold is not greater than the second upper limit threshold.

[0161] Further, the processing unit 53 is specifically configured to determine that each of the third remainder results and each of the fourth remainder results satisfies a preset second synthesis condition if it is determined that each of the third remainder results is 0 and each of the fourth remainder results is not 0.

[0162] Furthermore, the sending unit 54 is also configured to, after the processing unit 53 determines that each of the third modulo results and each of the fourth modulo results satisfy the preset second synthesis condition, generate a second communication protocol based on the second random integer and send it to the first server, so that after the first server receives the second communication protocol, it determines the quasi-prime number based on the first random integer and the second random integer carried by the second communication protocol, and when the quasi-prime number is determined to be a prime number, sends the quasi-prime number to the third server.

[0163] Furthermore, the processing unit 53 is specifically used to determine the sum of the first random integer and the second random integer as a quasi-prime number.

[0164] Example 5:

[0165] Figure 6 This is a schematic diagram of an electronic device structure provided in an embodiment of the present invention. The electronic device includes: a processor 61, a communication interface 62, a memory 63, and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64.

[0166] The memory 63 stores a computer program, which, when executed by the processor 61, causes the processor 61 to perform the following steps:

[0167] Within the second numerical range, a second random integer that satisfies the preset second extraction condition is determined;

[0168] Obtain the third remainder result of the second random integer with each prime number in the saved second set of prime numbers, and the fourth remainder result of the second random integer with each prime number in the saved first set of prime numbers;

[0169] If it is determined that each of the third remainder results and each of the fourth remainder results satisfies the preset second synthesis condition, then the quasi-prime number is determined according to the second random integer and the first random integer carried in the first communication protocol sent by the first server.

[0170] Since the principle of the above-mentioned electronic device in solving the problem is similar to the cryptographic generation method based on distributed quasi-prime numbers, the implementation of the above-mentioned electronic device can be found in the implementation of the method, and the repeated parts will not be described again.

[0171] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0172] Communication interface 62 is used for communication between the above-mentioned electronic device and other devices.

[0173] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0174] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0175] Example 6:

[0176] Based on the above embodiments, this invention also provides a computer-readable storage medium storing a computer program executable by a processor. When the program is run on the processor, the processor executes the following steps:

[0177] Within the second numerical range, a second random integer that satisfies the preset second extraction condition is determined;

[0178] Obtain the third remainder result of the second random integer with each prime number in the saved second set of prime numbers, and the fourth remainder result of the second random integer with each prime number in the saved first set of prime numbers;

[0179] If it is determined that each of the third remainder results and each of the fourth remainder results satisfies the preset second synthesis condition, then the quasi-prime number is determined according to the second random integer and the first random integer carried in the first communication protocol sent by the first server.

[0180] When the quasi-prime number is determined to be a prime number, the quasi-prime number is sent to a third server so that the third server, upon receiving the quasi-prime number, generates a password based on the quasi-prime number.

[0181] When the quasi-prime number is determined to be prime, it is sent to a third server so that the third server, upon receiving the quasi-prime number, generates a password based on it. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0182] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0183] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0184] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0185] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A cryptographic generation system based on distributed quasi-prime numbers, characterized in that, The system includes: a first server, a second server, and a third server; The first server is configured to: determine a first random integer within a first numerical range that satisfies a preset first extraction condition; obtain the first remainder result of the first random integer divided by each prime number in a stored first prime number set, and the second remainder result of the first random integer divided by each prime number in a stored second prime number set; if it is determined that each first remainder result and each second remainder result satisfies a preset first synthesis condition, then generate a first communication protocol based on the first random integer and send it to the second server; wherein the first prime number set and the second prime number set are mutually exclusive; wherein the first synthesis condition is that each first remainder result is 0, and each second remainder result is not 0; the first extraction condition is that the remainder result obtained after dividing by 4 is 3; The second server is configured to receive the first communication protocol sent by the first server; within a second numerical range, determine a second random integer that satisfies a preset second extraction condition; obtain the third remainder result of the second random integer with each prime number in the stored second prime number set, and the fourth remainder result of the second random integer with each prime number in the stored first prime number set; if it is determined that each of the third remainder results and each of the fourth remainder results satisfies a preset second synthesis condition, then determine a quasi-prime number based on the second random integer and the first random integer carried in the first communication protocol; when the quasi-prime number is determined to be a prime number, send the quasi-prime number to the third server; wherein, the second synthesis condition is that each of the third remainder results is 0, and each of the fourth remainder results is not 0; the second extraction condition is that the remainder result obtained after dividing by 4 is 0; The third server is used to receive the quasi-prime number and generate a password based on the quasi-prime number.

2. The system according to claim 1, characterized in that, The first server is further configured to determine the first set of prime numbers and the second set of prime numbers in the following manner: For each prime number greater than a preset first value, a first product is determined based on that prime number and each first prime number less than that prime number but not less than the first value; The second product is determined based on the first product and the minimum value among all second prime numbers greater than the prime number; If it is determined that the first product is less than a preset second value and the second product is not less than a preset second value, then the prime number and each of the first prime numbers are determined as target prime numbers; The first set of prime numbers and the second set of prime numbers are determined based on each of the target prime numbers.

3. The system according to claim 1, characterized in that, The first server is further configured to determine any prime number in the first set of prime numbers as a first upper limit threshold of the first numerical range; and to determine a first lower limit threshold of the first numerical range according to a pre-configured first minimum threshold; wherein the first lower limit threshold is not greater than the first upper limit threshold.

4. The system according to claim 1, characterized in that, The second server is further configured to determine any prime number in the second set of prime numbers as a second upper limit threshold of the second numerical range; and to determine a second lower limit threshold of the second numerical range according to a pre-configured second minimum threshold; wherein the second lower limit threshold is not greater than the second upper limit threshold.

5. The system according to claim 1, characterized in that, The second server is further configured to, after determining that each of the third modulo results and each of the fourth modulo results satisfies the preset second synthesis condition, generate a second communication protocol based on the second random integer and send it to the first server; The first server is further configured to receive the second communication protocol; determine a quasi-prime number based on the first random integer and the second random integer carried by the second communication protocol; and when the quasi-prime number is determined to be a prime number, send the quasi-prime number to the third server.

6. The system according to claim 1, characterized in that, The second server is specifically used to determine the sum of the first random integer and the second random integer as a quasi-prime number.

7. A cryptographic generation method based on distributed quasi-prime numbers, characterized in that, The method includes: Within the second numerical range, a second random integer that satisfies a preset second extraction condition is determined; the second extraction condition is that the remainder obtained after being divided by 4 is 0. Obtain the third remainder result of the second random integer with each prime number in the saved second set of prime numbers, and the fourth remainder result of the second random integer with each prime number in the saved first set of prime numbers; If it is determined that each of the third remainder results and each of the fourth remainder results satisfies the preset second synthesis condition, then a quasi-prime number is determined based on the second random integer and the first random integer carried in the first communication protocol sent by the first server when each of the first remainder results and each of the second remainder results satisfies the preset first synthesis condition; wherein, the second synthesis condition is that each of the third remainder results is 0 and each of the fourth remainder results is not 0; the first random integer is an integer within a first numerical range whose remainder result after being divided by 4 is 3; the first remainder result is the remainder result of the first random integer with each prime number in the stored first prime number set, the second remainder result is the remainder result of the first random integer with each prime number in the stored second prime number set, and the first synthesis condition is that each of the first remainder results is 0 and each of the second remainder results is not 0; When the quasi-prime number is determined to be a prime number, the quasi-prime number is sent to a third server so that the third server, upon receiving the quasi-prime number, generates a password based on the quasi-prime number.

8. A cryptographic generation device based on distributed quasi-prime numbers, characterized in that, The device includes: The determining unit is used to determine a second random integer within a second numerical range that satisfies a preset second extraction condition; the second extraction condition is that the remainder obtained after dividing by 4 is 0. The acquisition unit is used to acquire the third remainder result of the second random integer with each prime number in the stored second prime number set, and the fourth remainder result of the second random integer with each prime number in the stored first prime number set; The processing unit is configured to, if it is determined that each of the third remainder results and each of the fourth remainder results satisfies a preset second synthesis condition, determine a quasi-prime number based on the second random integer and the first random integer carried in the first communication protocol sent by the first server when each of the first remainder results and each of the second remainder results satisfies the preset first synthesis condition; and determine whether the quasi-prime number is a prime number; wherein, the second synthesis condition is that each of the third remainder results is 0 and each of the fourth remainder results is not 0; the first random integer is an integer within a first numerical range whose remainder result after being divided by 4 is 3; the first remainder result is the remainder result of the first random integer with each prime number in the stored first prime number set, the second remainder result is the remainder result of the first random integer with each prime number in the stored second prime number set, and the first synthesis condition is that each of the first remainder results is 0 and each of the second remainder results is not 0; A sending unit is used to send the quasi-prime number to a third server when the processing unit determines that the quasi-prime number is a prime number, so that the third server generates a password based on the quasi-prime number after receiving it.

Citation Information

Patent Citations

  • Anti-attack method and device in electronic component using Rivest-Shamir-Adleman (RSA) public-key encryption algorithm

    CN103209073A

  • N-level prime number periodic table theorem based system and method for constructing prime number periodic table in parallel

    CN105183456A