Key pairing method, device, electronic device and storage medium

By generating keys and configuring numbers for them, combining Bernoulli algorithm and energy conservation algorithm, energy values ​​are determined from encrypted sequences, and using energy values ​​and numbers to determine target keys, the lack of security in keys in the existing technology is solved. The problem is to achieve efficient security protection for keys.

CN115146295BActive Publication Date: 2025-02-11CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210762996.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-30
Publication Date
2025-02-11
Estimated Expiration
2042-06-30

AI Technical Summary

Technical Problem

In the prior art, the correspondence between the data to be encrypted and the key is too simple, resulting in the security of the key being unable to be effectively guaranteed.

Method used

By generating keys and configuring numbers, obtaining the data to be encrypted and converting them into an encrypted sequence, determining the pressure parameters, density parameters and height parameters from the encrypted sequence, calculating the energy value based on the Bernoulli algorithm and the energy conservation algorithm, using Energy value and number determine the target key.

Benefits of technology

By strengthening the complexity of the correspondence between the data to be encrypted and the key, the complexity of the key cracking is improved, thereby improving the security of the key.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115146295B_ABST
    Figure CN115146295B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a key pairing method, device, electronic device and storage medium, which generates a key and configures a corresponding number for the key; obtains data to be encrypted and converts the data to be encrypted into an encrypted sequence composed of numbers; determines a first pressure parameter, a density parameter and a first height parameter from the encrypted sequence; calculates a first energy value based on the Bernoulli algorithm using the first pressure parameter, the density parameter and the first height parameter; determines a second pressure parameter and a second height parameter from the encrypted sequence; calculates a second energy value based on the energy conservation algorithm using the first energy value, the second pressure parameter, the density parameter and the second height parameter; determines a target key through the second energy value and the number; thereby enhancing the complexity of the corresponding relationship between the data to be encrypted and the key, improving the complexity of cracking the key, and further improving the security of the key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of key pairing, and in particular to a key pairing method, a key pairing device, an electronic device and a computer-readable storage medium. Background Art

[0002] Encryption technology is the main security and confidentiality measure adopted by e-commerce and the most commonly used security and confidentiality means. As one of the most important components of encryption technology, the key plays a decisive role in information security.

[0003] With the continuous improvement of encryption technology, the security of encrypted data has been relatively well guaranteed. However, in related technologies, the correspondence between the encrypted data and the key is too simple, which makes it impossible to guarantee the security of the key. Therefore, how to improve the security of the key is still a problem that technicians in this field need to overcome. Summary of the invention

[0004] The embodiments of the present invention provide a key pairing method, device, electronic device and computer-readable storage medium to solve the problem of how to ensure the security of keys.

[0005] The embodiment of the present invention discloses a key pairing method, which may include:

[0006] Generate a key and assign a corresponding number to the key;

[0007] Acquire the data to be encrypted, and convert the data to be encrypted into an encrypted sequence consisting of numbers;

[0008] Determining a first pressure parameter, a density parameter and a first height parameter from the encrypted sequence;

[0009] Based on the Bernoulli algorithm, a first energy value is calculated using the first pressure parameter, the density parameter and the first height parameter;

[0010] Determining a second pressure parameter and a second height parameter from the encrypted sequence;

[0011] Based on the energy conservation algorithm, a second energy value is calculated using the first energy value, the second pressure parameter, the density parameter and the second height parameter;

[0012] A target key is determined by the second energy value and the serial number; the target key is a key for the data to be encrypted.

[0013] Optionally, it may also include:

[0014] The key assigned with the number is stored in a key pool.

[0015] Optionally, the step of storing the key configured with the number in a key pool may include:

[0016] The key configured with the number is split into a first sub-key and a second sub-key, and the first sub-key and the second sub-key are respectively stored in different key pools; the first sub-key and the second sub-key have the same number.

[0017] Optionally, the step of determining the target key by using the second energy value and the serial number may include:

[0018] A target key is determined from a key pool according to the second energy value and the serial number.

[0019] Optionally, the step of determining a first pressure parameter, a density parameter and a first height parameter from the encrypted sequence may include:

[0020] Selecting a first target number from the encrypted number sequence as a first pressure parameter according to a first preset number of bits;

[0021] Selecting a second target number in the encrypted number sequence as a density parameter according to a second preset number of bits;

[0022] A third target number is selected from the encrypted number sequence as the first height parameter according to a third preset number of bits.

[0023] Optionally, the step of determining the second pressure parameter and the second height parameter from the encrypted sequence may include:

[0024] Selecting a fourth target number from the encrypted number sequence according to a fourth preset number of bits as a second pressure parameter;

[0025] A fifth target number is selected from the encrypted number sequence according to a fifth preset number of bits as a second height parameter.

[0026] The embodiment of the present invention further discloses a key pairing device, which may include:

[0027] A key generation module, used to generate a key and configure a corresponding number for the key;

[0028] The module for acquiring data to be encrypted is used to acquire the data to be encrypted and convert the data to be encrypted into an encrypted sequence of numbers;

[0029] A first parameter determination module, used to determine a first pressure parameter, a density parameter and a first height parameter from the encrypted sequence;

[0030] A first energy value calculation module, configured to calculate a first energy value based on a Bernoulli algorithm by using the first pressure parameter, the density parameter and the first height parameter;

[0031] A second parameter determination module, used to determine a second pressure parameter and a second height parameter from the encrypted sequence;

[0032] A second energy value calculation module, configured to calculate a second energy value based on the energy conservation algorithm by using the first energy value, the second pressure parameter, the density parameter and the second height parameter;

[0033] A target key determination module is used to determine a target key through the second energy value and the serial number; the target key is a key for the data to be encrypted.

[0034] Optionally, it may also include:

[0035] The key storage module is used to store the key configured with the number in a key pool.

[0036] Optionally, the key storage module may include:

[0037] The sub-key storage sub-module is used to split the key configured with the number into a first sub-key and a second sub-key, and store the first sub-key and the second sub-key in different key pools respectively; the first sub-key and the second sub-key have the same number.

[0038] Optionally, the target key determination module may include:

[0039] The target key determination submodule is used to determine a target key from a key pool according to the second energy value and the serial number.

[0040] Optionally, the first parameter determination module may include:

[0041] A first pressure parameter selection submodule, used for selecting a first target number in the encrypted sequence according to a first preset number of digits as a first pressure parameter;

[0042] A density parameter selection submodule, used for selecting a second target number in the encrypted sequence as a density parameter according to a second preset number of bits;

[0043] The first height parameter selection submodule is used to select a third target number in the encrypted number sequence as the first height parameter according to a third preset number of bits.

[0044] Optionally, the second parameter determination module may include:

[0045] A second pressure parameter selection submodule, used for selecting a fourth target number in the encrypted number sequence according to a fourth preset number of digits as a second pressure parameter;

[0046] The second height parameter selection submodule is used to select a fifth target number in the encrypted number sequence as a second height parameter according to a fifth preset digit number.

[0047] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0048] The memory is used to store computer programs;

[0049] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.

[0050] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.

[0051] The embodiments of the present invention include the following advantages: by generating a key and configuring a corresponding number for the key; obtaining data to be encrypted and converting the data to be encrypted into an encrypted sequence composed of numbers; determining a first pressure parameter, a density parameter and a first height parameter from the encrypted sequence; based on the Bernoulli algorithm, calculating a first energy value using the first pressure parameter, the density parameter and the first height parameter; determining a second pressure parameter and a second height parameter from the encrypted sequence; based on the energy conservation algorithm, calculating a second energy value using the first energy value, the second pressure parameter, the density parameter and the second height parameter; determining a target key through the second energy value and the number; the target key is a key for the data to be encrypted, thereby increasing the complexity of the corresponding relationship between the data to be encrypted and the key, increasing the complexity of cracking the key, and thereby increasing the security of the key. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 is a flowchart of a key pairing method provided in an embodiment of the present invention;

[0053] Figure 2 is a structural block diagram of a key pairing device provided in an embodiment of the present invention;

[0054] Figure 3 It is a hardware structure block diagram of an electronic device provided in each embodiment of the present invention. DETAILED DESCRIPTION

[0055] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0056] Reference Figure 1 , shows a flowchart of a key pairing method provided in an embodiment of the present invention, which may specifically include the following steps:

[0057] Step 101, generate a key and assign a corresponding number to the key;

[0058] Step 102, obtaining data to be encrypted, and converting the data to be encrypted into an encrypted sequence consisting of numbers;

[0059] Step 103, determining a first pressure parameter, a density parameter and a first height parameter from the encrypted sequence;

[0060] Step 104, based on the Bernoulli algorithm, using the first pressure parameter, the density parameter and the first height parameter to calculate a first energy value;

[0061] Step 105, determining a second pressure parameter and a second height parameter from the encrypted sequence;

[0062] Step 106, based on the energy conservation algorithm, using the first energy value, the second pressure parameter, the density parameter and the second height parameter to calculate a second energy value;

[0063] Step 107, determining a target key by using the second energy value and the serial number; the target key is a key for the data to be encrypted.

[0064] In order to enable those skilled in the art to better understand the present application, the following is a brief description of the terms involved in the present application:

[0065] Bernoulli's principle: Daniel Bernoulli proposed the "Bernoulli's principle" in 1726. This is the basic principle used in hydraulics before the establishment of the continuous medium theory equation of fluid mechanics. Its essence is the conservation of mechanical energy of the fluid. That is: kinetic energy + gravitational potential energy + pressure potential energy = constant. Its most famous inference is: when the flow is constant, the greater the flow velocity, the smaller the pressure.

[0066] In actual applications, the embodiment of the present invention can randomly generate multiple character strings consisting of characters, and each character string can be used as an independent key. For example, the character string "VK7JG-NPHTM-C97JM-9MPGT-3V66T" can be used as a key. Then, the embodiment of the present invention can configure a corresponding number for each generated key, for example, key 001, key 003, key 007, and so on.

[0067] The embodiment of the present invention can also obtain data to be encrypted, and after obtaining the data to be encrypted, convert the data to be encrypted into an encrypted sequence composed of numbers. For example, assuming that the data to be encrypted is the number "304", 304 can be converted into a binary sequence "100110000". For another example, assuming that the data to be encrypted is "I love you, Country X", the data to be encrypted can be converted into an encrypted sequence "621172314f60ff0c4e2d56fd" through a hexadecimal algorithm. In practical applications, the hexadecimal conversion has 16 different numbers of different sizes, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, and f, from small to large, in each hexadecimal bit, that is, 1 is added every 16, where the six letters a, b, c, d, e, and f are used to represent 10, 11, 12, 13, 14, and 15 respectively.

[0068] After converting the data to be encrypted into an encrypted sequence of numbers, the embodiment of the present invention can determine the first pressure parameter, the density parameter and the first height parameter from the encrypted sequence.

[0069] In an optional embodiment of the present invention, the step of determining the first pressure parameter, the density parameter and the first height parameter from the encrypted sequence comprises:

[0070] Selecting a first target number from the encrypted number sequence as a first pressure parameter according to a first preset number of bits;

[0071] Selecting a second target number in the encrypted number sequence as a density parameter according to a second preset number of bits;

[0072] A third target number is selected from the encrypted number sequence as the first height parameter according to a third preset number of bits.

[0073] For example, assuming that the encrypted number sequence is 192****8846, the 1st to 3rd digits of the number sequence can be used as the first preset number of digits, and "192" can be selected as the first pressure parameter according to the 1st to 3rd digits, and the 8th to 9th digits can be used as the second preset number of digits, and "88" can be selected as the density parameter according to the 8th to 9th digits, and the 10th to 11th digits can be used as the third preset number of digits, and "46" can be selected as the first height parameter according to the 10th to 11th digits.

[0074] Of course, those skilled in the art can determine the first pressure parameter, the density parameter and the first height parameter by using any number of bits in the encrypted sequence, and the embodiments of the present invention do not limit this.

[0075] After determining the first pressure parameter, the density parameter and the first height parameter, the embodiment of the present invention can calculate the first energy value based on the Bernoulli algorithm by using the first pressure parameter, the density parameter and the first height parameter.

[0076] For example, Bernoulli's formula is p1+1 / 2ρv1 2 +ρgh1=C, where p1 is the first pressure parameter, with a value of 192; v1 is the kinetic energy value, which can be the initial kinetic energy value, that is, the kinetic energy value is 0; g is the gravitational acceleration, with a value of 9.8; ρ is the density parameter, with a value of 88; h1 is the first height parameter, with a value of 46, so the first energy value=p1+1 / 2ρv1 2 +ρgh1=192+0+88*9.8*46=39862.4.

[0077] After calculating the first energy value, the embodiment of the present invention can determine the second pressure parameter and the second height parameter from the encrypted sequence.

[0078] In an optional embodiment of the present invention, the step of determining the second pressure parameter and the second height parameter from the encrypted sequence includes:

[0079] Selecting a fourth target number from the encrypted number sequence according to a fourth preset number of bits as a second pressure parameter;

[0080] A fifth target number is selected from the encrypted number sequence according to a fifth preset number of bits as a second height parameter.

[0081] For example, assuming that the encrypted number sequence is 192****8846, the 8th to 11th digits of the number sequence can be used as the fourth preset number of digits, and "8846" can be selected as the second pressure parameter according to the 8th to 11th digits. Since the density remains unchanged, "88" can continue to be used as the density parameter, and the 1st to 3rd digits of the number sequence can be used as the fifth preset number of digits, and "192" can be selected as the second height parameter according to the 1st to 3rd digits.

[0082] In practical applications, the first pressure parameter and the second pressure parameter are not selected with the same preset number of bits, and the first height parameter and the second pressure height parameter are selected with different preset number of bits, which helps to enhance the complexity of the correspondence between the encrypted sequence and the key, thereby increasing the difficulty of cracking the key and further improving the security of the key.

[0083] After determining the second pressure parameter and the second height parameter from the encrypted sequence, the embodiment of the present invention can calculate the second energy value based on the mechanical energy conservation algorithm of the fluid using the first energy value, the second pressure parameter, the density parameter and the second height parameter, and then determine the target key for the data to be encrypted by the second energy value and the serial number. In a specific implementation, the target key of the embodiment of the present invention can be a key used to decrypt the data to be encrypted after it is encrypted.

[0084] For example, the mechanical energy conservation formula is p1+1 / 2ρv1 2 +ρgh1=p2+1 / 2ρv2 2 +ρgh2; where p1 is the first pressure parameter, with a value of 192; v1 is the kinetic energy value, which can be the initial kinetic energy value, that is, the kinetic energy value is 0; g is the gravitational acceleration, with a value of 9.8; ρ is the density parameter, with a value of 88; h1 is the first height parameter, with a value of 46, so the first energy value = p1+1 / 2ρv1 2 +ρgh1=192+0+88*9.8*46=39862.4==p2+1 / 2ρv2 2 +ρgh2; where p2 is the second pressure parameter, and its value is 8846; since the density unit remains unchanged, 88 can continue to be used as the density parameter; h2 is the second height parameter, and its value is 192; it can be calculated that the second energy value = v2 = -134563.6, and the absolute value integer is 134563; the number is taken according to the preset number of digits, for example, "63" in the 5th to 6th digits of the sequence 134563 is taken, and it is assumed that the number of keys generated is 100, and the corresponding numbers of the keys are key 1, key 2...key 100, then key 63 can be the target key for the data to be encrypted.

[0085] The embodiment of the present invention generates a key and configures a corresponding number for the key; obtains data to be encrypted and converts the data to be encrypted into an encrypted sequence composed of numbers; determines a first pressure parameter, a density parameter and a first height parameter from the encrypted sequence; based on the Bernoulli algorithm, uses the first pressure parameter, the density parameter and the first height parameter to calculate a first energy value; determines a second pressure parameter and a second height parameter from the encrypted sequence; based on the energy conservation algorithm, uses the first energy value, the second pressure parameter, the density parameter and the second height parameter to calculate a second energy value; determines a target key through the second energy value and the number; the target key is a key for the data to be encrypted, thereby increasing the complexity of the corresponding relationship between the data to be encrypted and the key, increasing the complexity of cracking the key, and further increasing the security of the key.

[0086] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. It should be noted that in order to make the description concise, only the differences from the above embodiment are described in the variant embodiment.

[0087] In an optional embodiment of the present invention, it also includes:

[0088] The key assigned with the number is stored in a key pool.

[0089] In another optional embodiment of the present invention, the step of determining the target key by using the second energy value and the serial number includes:

[0090] A target key is determined from a key pool according to the second energy value and the serial number.

[0091] In practical applications, if the key is paired for the data to be encrypted only when the data to be encrypted is encrypted, data congestion may occur due to delays, which in turn may affect the overall encryption speed due to key encryption. Therefore, the embodiment of the present invention can pre-configure a key pool and store the configured numbered keys in the key pool, so that when it is necessary to configure a key for the data to be encrypted, the target key can be directly determined from the key pool and paired with the data to be encrypted.

[0092] For example, 10 keys are generated, key 0 is W269N-WFGWX-YVC9B-4J6C9-T83GX; key 1 is MH37W-N47XK-V7XM9-C7227-GCQG9; key 2 is 2X7P3-NGJTH-Q9TJF-8XDP9-T83GT; key 3 is J2WWN-Q4338-3GFW9-BWQVK-MG9TT; key 4 is NBQWQ-W9PTV-B4YWP-4K773-T6PKG; key 5 is 236TW-X778T-8MV9F-937GT-QVKBB; key 6 is 87VT2-FY2XW- F7K39-W3T8R-XMFGF; key 7 is KH2J9-PC326-T44D4-39H6V-TVPBY; key 8 is TFP9Y-VCY3P-VVH3T-8XXCC-MF4YK; key 9 is J783Y-JKQWR-677Q8-KCXTF-BHWGC. These 10 keys can form a key pool and store these 10 keys in the key pool. Assuming that the second energy value is 134563, the last digit "3" can be taken according to the preset number of digits to take "J2WWN-Q4338-3GFW9-BWQVK-MG9TT" in the key pool as the target key for the data to be encrypted.

[0093] The embodiment of the present invention avoids data congestion due to delay by storing the key configured with the number in a key pool, thereby avoiding the impact of key encryption on the overall encryption speed, thereby improving and ensuring encryption efficiency.

[0094] In an optional embodiment of the present invention, the step of storing the key configured with the number in a key pool includes:

[0095] The key configured with the number is split into a first sub-key and a second sub-key, and the first sub-key and the second sub-key are respectively stored in different key pools; the first sub-key and the second sub-key have the same number.

[0096] In another optional embodiment of the present invention, the step of determining the target key by using the second energy value and the serial number includes:

[0097] A target key is determined from a key pool according to the second energy value and the serial number.

[0098] In practical applications, if a full key is placed in a key pool, when the key pool is attacked, it means that a full key may be obtained, thereby increasing the risk of leakage. Therefore, the embodiment of the present invention can split the key with a configured number into a first sub-key and a second sub-key, and store the first sub-key and the second sub-key in different key pools respectively; wherein the first sub-key and the second sub-key have the same number. Therefore, when configuring keys for data to be encrypted, the first sub-key and the second sub-key with the same number can be taken from different key pools to form a target key. Therefore, on the basis of realizing the configuration of keys for data to be encrypted, it is avoided that a full key is leaked when a key pool is attacked.

[0099] For example, 10 keys are generated, key 0 is W269N-WFGWX-YVC9B-4J6C9-T83GX; key 1 is MH37W-N47XK-V7XM9-C7227-GCQG9; key 2 is 2X7P3-NGJTH-Q9TJF-8XDP9-T83GT; key 3 is J2WWN-Q4338-3GFW9-BWQVK-MG9TT; key 4 is NBQWQ-W9PTV-B4YWP-4K773-T6PKG; key 5 is 236T W-X778T-8MV9F-937GT-QVKBB; key 6 is 87VT2-FY2XW-F7K39-W3T8R-XMFGF; key 7 is KH2J9-PC326-T44D4-39H6V-TVPBY; key 8 is TFP9Y-VCY3P-VVH3T-8XXCC-MF4YK; key 9 is J783Y-JKQWR-677Q8-KCXTF-BHWGC, keys 0-9 can be split into two groups, A and B. Group A includes key 0. W269N-WFGWX; key 1 is MH37W-N47XK; key 2 is 2X7P3-NGJTH; key 3 is J2WWN-Q4338; key 4 is NBQWQ-W9PTV; key 5 is 236TW-X778T; key 6 is 87VT2-FY2XW; key 7 is KH2J9-PC326; key 8 is TFP9Y-VCY3P; key 9 is J783Y-JKQWR, group B includes: key 0 is YVC9B-4J6C9-T83GX; key 1 is V7X M9-C7227-GCQG9; key 2 is Q9TJF-8XDP9-T83GT; key 3 is 3GFW9-BWQVK-MG9TT; key 4 is B4YWP-4K773-T6PKG; key 5 is 8MV9F-937GT-QVKBB; key 6 is F7K39-W3T8R-XMFGF; key 7 is T44D4-39H6V-TVPBY; key 8 is VVH3T-8XXCC-MF4YK; key 9 is 677Q8-KCXTF-BHWGC;Then, the 10 keys in group A are combined into key pool A, and the 10 keys in group A are stored in key pool A, and the keys stored in key pool A are recorded as the first subkey. The 10 keys in group B are combined into key pool B, and the 10 keys in group B are stored in key pool B, and the keys stored in key pool B are recorded as the second subkey. Assuming that the second energy value is 134563, the last digit "3" can be taken according to the preset number of digits, because the first subkey and the second subkey are in the key pool. The numbers are all 3, so you can take the first subkey "J2WWN-Q4338" from A in the key pool, take the second subkey "3GFW9-BWQVK-MG9TT" from B in the key pool, and then combine the first subkey "J2WWN-Q4338" and the second subkey "3GFW9-BWQVK-MG9TT" to form "J2WWN-Q4338-3GFW9-BWQVK-MG9TT" as the target key for the data to be encrypted. ;

[0100] In the embodiment of the present invention, the key configured with the number is split into a first sub-key and a second sub-key, and the first sub-key and the second sub-key are respectively stored in different key pools; the first sub-key and the second sub-key have the same number, which avoids the leakage of a full key when a key pool is attacked, thereby further reducing the risk of leakage.

[0101] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0102] Reference Figure 2 , shows a structural block diagram of a key pairing device provided in an embodiment of the present invention, which may specifically include the following modules:

[0103] The key generation module 201 is used to generate a key and configure a corresponding number for the key;

[0104] The to-be-encrypted data acquisition module 202 is used to acquire the to-be-encrypted data and convert the to-be-encrypted data into an encrypted sequence consisting of digits;

[0105] A first parameter determination module 203, used to determine a first pressure parameter, a density parameter and a first height parameter from the encrypted sequence;

[0106] A first energy value calculation module 204, configured to calculate a first energy value based on a Bernoulli algorithm by using the first pressure parameter, the density parameter and the first height parameter;

[0107] A second parameter determination module 205, used to determine a second pressure parameter and a second height parameter from the encrypted sequence;

[0108] A second energy value calculation module 206, configured to calculate a second energy value based on the energy conservation algorithm by using the first energy value, the second pressure parameter, the density parameter and the second height parameter;

[0109] The target key determination module 207 is used to determine a target key according to the second energy value and the serial number; the target key is a key for the data to be encrypted.

[0110] Optionally, it may also include:

[0111] The key storage module is used to store the key configured with the number in a key pool.

[0112] Optionally, the key storage module may include:

[0113] The sub-key storage sub-module is used to split the key configured with the number into a first sub-key and a second sub-key, and store the first sub-key and the second sub-key in different key pools respectively; the first sub-key and the second sub-key have the same number.

[0114] Optionally, the target key determination module may include:

[0115] The target key determination submodule is used to determine a target key from a key pool according to the second energy value and the serial number.

[0116] Optionally, the first parameter determination module may include:

[0117] A first pressure parameter selection submodule, used for selecting a first target number in the encrypted sequence according to a first preset number of digits as a first pressure parameter;

[0118] A density parameter selection submodule, used for selecting a second target number in the encrypted sequence as a density parameter according to a second preset number of bits;

[0119] The first height parameter selection submodule is used to select a third target number in the encrypted number sequence as the first height parameter according to a third preset number of bits.

[0120] Optionally, the second parameter determination module may include:

[0121] A second pressure parameter selection submodule, used for selecting a fourth target number in the encrypted number sequence according to a fourth preset number of digits as a second pressure parameter;

[0122] The second height parameter selection submodule is used to select a fifth target number in the encrypted number sequence as a second height parameter according to a fifth preset digit number.

[0123] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0124] In addition, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, each process of the above-mentioned key pairing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0125] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned key pairing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0126] Figure 3 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0127] The electronic device 300 includes but is not limited to: a radio frequency unit 301, a network module 302, an audio output unit 303, an input unit 304, a sensor 305, a display unit 306, a user input unit 307, an interface unit 308, a memory 309, a processor 310, and a power supply 311. Those skilled in the art will appreciate that Figure 3 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.

[0128] It should be understood that in the embodiment of the present invention, the radio frequency unit 301 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 310 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 301 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 301 can also communicate with the network and other devices through a wireless communication system.

[0129] The electronic device provides users with wireless broadband Internet access through the network module 302, such as helping users to send and receive emails, browse web pages, and access streaming media.

[0130] The audio output unit 303 can convert the audio data received by the RF unit 301 or the network module 302 or stored in the memory 309 into an audio signal and output it as sound. Moreover, the audio output unit 303 can also provide audio output related to a specific function performed by the electronic device 300 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 303 includes a speaker, a buzzer, a receiver, etc.

[0131] The input unit 304 is used to receive audio or video signals. The input unit 304 may include a graphics processor (GPU) 3041 and a microphone 3042, and the graphics processor 3041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 306. The image frame processed by the graphics processor 3041 can be stored in the memory 309 (or other storage medium) or sent via the radio frequency unit 301 or the network module 302. The microphone 3042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 301 in the case of a telephone call mode.

[0132] The electronic device 300 also includes at least one sensor 305, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 3061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 3061 and / or the backlight when the electronic device 300 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 305 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

[0133] The display unit 306 is used to display information input by the user or information provided to the user. The display unit 306 may include a display panel 3061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0134] The user input unit 307 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 307 includes a touch panel 3071 and other input devices 3072. The touch panel 3071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 3071 or near the touch panel 3071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 3071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact point coordinates, and then sends it to the processor 310, receives the command sent by the processor 310 and executes it. In addition, the touch panel 3071 can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 3071, the user input unit 307 may also include other input devices 3072. Specifically, other input devices 3072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.

[0135] Furthermore, the touch panel 3071 may be overlaid on the display panel 3061. When the touch panel 3071 detects a touch operation on or near it, it is transmitted to the processor 310 to determine the type of touch event. Then, the processor 310 provides corresponding visual output on the display panel 3061 according to the type of touch event. Figure 3 In the figure, the touch panel 3071 and the display panel 3061 are used as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 3071 and the display panel 3061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.

[0136] The interface unit 308 is an interface for connecting an external device to the electronic device 300. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 308 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 300 or may be used to transmit data between the electronic device 300 and an external device.

[0137] The memory 309 can be used to store software programs and various data. The memory 309 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 309 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0138] The processor 310 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 309 and calling data stored in the memory 309, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 310 may include one or more processing units; preferably, the processor 310 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 310.

[0139] The electronic device 300 may also include a power supply 311 (such as a battery) for supplying power to each component. Preferably, the power supply 311 may be logically connected to the processor 310 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.

[0140] In addition, the electronic device 300 includes some functional modules not shown, which will not be described in detail here.

[0141] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0143] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

[0144] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0146] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as 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 devices or units, which can be electrical, mechanical or other forms.

[0147] 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 network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, each functional unit in each embodiment of the present invention 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.

[0149] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the 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 invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0150] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A key pairing method, characterized in that: include: Generate a key and assign a corresponding number to the key; Acquire the data to be encrypted, and convert the data to be encrypted into an encrypted sequence consisting of numbers; Determining a first pressure parameter, a density parameter and a first height parameter from the encrypted sequence; Based on the Bernoulli algorithm, a first energy value is calculated using the first pressure parameter, the density parameter and the first height parameter; Determining a second pressure parameter and a second height parameter from the encrypted sequence; Based on an energy conservation algorithm, a second energy value is calculated using the first energy value, the second pressure parameter, the density parameter and the second height parameter; A target key is determined by the second energy value and the serial number; the target key is a key for the data to be encrypted.

2. The method according to claim 1, characterized in that Also includes: The key assigned with the number is stored in a key pool.

3. The method according to claim 2, characterized in that The step of storing the key assigned with the number in a key pool comprises: The key configured with the number is split into a first sub-key and a second sub-key, and the first sub-key and the second sub-key are respectively stored in different key pools; the first sub-key and the second sub-key have the same number.

4. The method according to claim 2 or 3, characterized in that: The step of determining the target key by using the second energy value and the serial number comprises: A target key is determined from a key pool according to the second energy value and the serial number.

5. The method according to claim 1, characterized in that The step of determining the first pressure parameter, the density parameter and the first height parameter from the encrypted sequence comprises: Selecting a first target number from the encrypted number sequence as a first pressure parameter according to a first preset number of bits; Selecting a second target number in the encrypted number sequence as a density parameter according to a second preset number of bits; A third target number is selected from the encrypted number sequence as the first height parameter according to a third preset number of bits.

6. The method according to claim 1, characterized in that The step of determining the second pressure parameter and the second height parameter from the encrypted sequence comprises: Selecting a fourth target number from the encrypted number sequence according to a fourth preset number of bits as a second pressure parameter; A fifth target number is selected from the encrypted number sequence according to a fifth preset number of bits as a second height parameter.

7. A key pairing device, characterized in that: include: A key generation module, used to generate a key and configure a corresponding number for the key; The module for acquiring data to be encrypted is used to acquire the data to be encrypted and convert the data to be encrypted into an encrypted sequence of numbers; A first parameter determination module, used to determine a first pressure parameter, a density parameter and a first height parameter from the encrypted sequence; A first energy value calculation module, configured to calculate a first energy value based on a Bernoulli algorithm by using the first pressure parameter, the density parameter and the first height parameter; A second parameter determination module, used to determine a second pressure parameter and a second height parameter from the encrypted sequence; A second energy value calculation module, configured to calculate a second energy value based on an energy conservation algorithm by using the first energy value, the second pressure parameter, the density parameter and the second height parameter; A target key determination module is used to determine a target key through the second energy value and the serial number; the target key is a key for the data to be encrypted.

8. The device according to claim 7, characterized in that Also includes: The key storage module is used to store the key configured with the number in a key pool.

9. The device according to claim 8, characterized in that The key storage module includes: The sub-key storage sub-module is used to split the key configured with the number into a first sub-key and a second sub-key, and store the first sub-key and the second sub-key in different key pools respectively; the first sub-key and the second sub-key have the same number.

10. The device according to claim 8 or 9, characterized in that The target key determination module comprises: The target key determination submodule is used to determine a target key from a key pool according to the second energy value and the serial number.

11. The device according to claim 7, characterized in that The first parameter determination module includes: A first pressure parameter selection submodule, used for selecting a first target number in the encrypted sequence according to a first preset number of digits as a first pressure parameter; A density parameter selection submodule, used for selecting a second target number in the encrypted sequence as a density parameter according to a second preset number of bits; The first height parameter selection submodule is used to select a third target number in the encrypted number sequence as the first height parameter according to a third preset number of bits.

12. The device according to claim 7, characterized in that The second parameter determination module includes: A second pressure parameter selection submodule, used for selecting a fourth target number in the encrypted number sequence according to a fourth preset number of digits as a second pressure parameter; The second height parameter selection submodule is used to select a fifth target number in the encrypted number sequence as a second height parameter according to a fifth preset digit number.

13. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 6 when executing the program stored in the memory.

14. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data encryption hard disk stable work auxiliary equipment based on air convection

    CN111984078A

  • Encryption method and device based on energy key table and storage medium

    CN113468585A