Information encryption method, device, equipment and medium based on pseudo-random numbers

By randomly generating encryption seeds and translocating the data information, the problem of data information encryption in the prior art is solved, and the efficiency of the encryption process is improved.

CN115514482BActive Publication Date: 2024-11-12SHENZHEN ZHISHI ZHIHE TECHNOLOGY CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art methods take a long time in the encryption process of data information, resulting in lower cost efficiency.

Method used

By randomly generating encryption seeds, including encrypted cardinality and pseudo-random numbers, the basic data in the encrypted information is encrypted in transposition, ciphertext data is generated, and spliced ​​into encrypted data information.

Benefits of technology

It greatly reduces the complexity of encryption operations and shortens the time-consuming of encryption processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115514482B_ABST
    Figure CN115514482B_ABST
Patent Text Reader

Abstract

The present invention discloses an information encryption method, device, equipment and medium based on pseudo-random numbers. The method includes: if the input information to be encrypted is received, an encryption seed is randomly generated; the encryption seed includes an encryption base and a pseudo-random number corresponding to the encryption base; the basic data corresponding to the encryption base is read from the information to be encrypted in sequence, and the basic data is transposed and encrypted according to the pseudo-random number to obtain the corresponding ciphertext data; the ciphertext data of each basic data is spliced ​​to obtain the encrypted data information corresponding to the information to be encrypted. Through the above method, an encryption seed is randomly generated, and the basic data read in sequence from the information to be encrypted are transposed and encrypted according to the encryption seed to obtain the corresponding encrypted data information; the encryption seed is randomly generated to transpose and encrypt the data to be encrypted, which greatly reduces the complexity of the encryption operation and shortens the time consumption of the encryption process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an information encryption method, device, equipment and medium based on pseudo-random numbers. Background Art

[0002] In order to improve the security of data information transmission, data information can be encrypted and then transmitted over the network. However, the encryption methods used in the existing technical methods usually require complex calculations, which consume a lot of resources for encryption calculations and occupy a large amount of computing resources, resulting in a long encryption process and low cost-effectiveness. Therefore, the existing technical methods have the problem of taking a long time to encrypt data information. Summary of the invention

[0003] The embodiments of the present invention provide a method, device, equipment and medium for information encryption based on pseudo-random numbers, aiming to solve the problem that the prior art methods take a long time to encrypt data information.

[0004] In a first aspect, an embodiment of the present invention provides an information encryption method based on pseudo-random numbers, the method comprising:

[0005] If the input information to be encrypted is received, an encryption seed is randomly generated; the encryption seed includes an encryption base and a pseudo-random number corresponding to the encryption base;

[0006] Reading basic data corresponding to the encryption base from the information to be encrypted in sequence, and performing transposition encryption on the basic data according to the pseudo-random number to obtain corresponding ciphertext data;

[0007] The ciphertext data of each of the basic data are concatenated to obtain encrypted data information corresponding to the information to be encrypted.

[0008] In a second aspect, an embodiment of the present invention provides an information encryption device based on pseudo-random numbers, comprising:

[0009] An encryption seed generation unit, configured to randomly generate an encryption seed upon receiving the input information to be encrypted; the encryption seed includes an encryption base and a pseudo-random number corresponding to the encryption base;

[0010] A ciphertext data generating unit, configured to sequentially read basic data corresponding to the encryption base from the information to be encrypted, and perform transposition encryption on the basic data according to the pseudo-random number to obtain corresponding ciphertext data;

[0011] The encrypted data information acquisition unit is used to concatenate the ciphertext data of each of the basic data to obtain the encrypted data information corresponding to the information to be encrypted.

[0012] In a third aspect, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the pseudo-random number-based information encryption method as described in the first aspect above is implemented.

[0013] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the pseudo-random number-based information encryption method as described in the first aspect above is implemented.

[0014] The embodiments of the present invention provide an information encryption method, device, equipment and medium based on pseudo-random numbers. If the input information to be encrypted is received, an encryption seed is randomly generated; the encryption seed includes an encryption base and a pseudo-random number corresponding to the encryption base; the basic data corresponding to the encryption base is read from the information to be encrypted in sequence, and the basic data is transposed and encrypted according to the pseudo-random number to obtain the corresponding ciphertext data; the ciphertext data of each basic data is spliced ​​to obtain the encrypted data information corresponding to the information to be encrypted. Through the above method, an encryption seed is randomly generated, and the basic data read in sequence from the information to be encrypted are transposed and encrypted according to the encryption seed to obtain the corresponding encrypted data information; the data to be encrypted is transposed and encrypted by randomly generating an encryption seed, which greatly reduces the complexity of the encryption operation and shortens the time consumption of the encryption process. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0016] Figure 1 A schematic diagram of a flow chart of an information encryption method based on pseudo-random numbers provided in an embodiment of the present invention;

[0017] Figure 2 A schematic diagram of a sub-process of an information encryption method based on pseudo-random numbers provided in an embodiment of the present invention;

[0018] Figure 3 A schematic diagram of another sub-process of the information encryption method based on pseudo-random numbers provided in an embodiment of the present invention;

[0019] Figure 4A schematic diagram of another sub-process of the information encryption method based on pseudo-random numbers provided in an embodiment of the present invention;

[0020] Figure 5 A schematic diagram of another sub-process of the information encryption method based on pseudo-random numbers provided in an embodiment of the present invention;

[0021] Figure 6 Another schematic diagram of a flow chart of an information encryption method based on pseudo-random numbers provided by an embodiment of the present invention;

[0022] Figure 7 A schematic block diagram of an information encryption device based on pseudo-random numbers provided by an embodiment of the present invention;

[0023] Figure 8 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0026] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0027] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0028] See also Figure 1 , Figure 1A flowchart of an information encryption method based on pseudo-random numbers provided in an embodiment of the present invention; the information encryption method based on pseudo-random numbers is applied to a user terminal or a management server, and the information encryption method based on pseudo-random numbers is executed by an application software installed in the user terminal or the management server, and the user terminal can receive information to be encrypted input by the user and obtain encrypted data information after transposition encryption, wherein the user terminal can be a terminal device such as a desktop computer, a laptop computer, a tablet computer or a mobile phone; the management server can receive information to be encrypted from the user terminal, and obtain encrypted data information after transposition encryption and feed it back to the server side of the user terminal, such as a server side built within an enterprise or a government department. Figure 1 As shown, the method includes steps S110 to S130.

[0029] S110: If the input information to be encrypted is received, an encryption seed is randomly generated.

[0030] If the input information to be encrypted is received, an encryption seed is randomly generated; the encryption seed includes an encryption base and a pseudo-random number corresponding to the encryption base. Specifically, the input information to be encrypted can be received, the information to be encrypted can be character information, and the information to be encrypted can also be a file such as a picture or a document. After parsing the file such as the picture or the document, the corresponding character information can be obtained. The management server can randomly generate an encryption seed, wherein the encryption seed includes an encryption base and a pseudo-random number corresponding to the encryption base. The encryption base can be 1 bit, 2 bits, 4 bits, 8 bits, etc., 1 bit is one character bit, and the encryption base is 4 bits, which corresponds to four character bits. The number of numerical bits contained in the pseudo-random number is equal to the number of bits of the encryption base. Specifically, in the process of generating an encryption seed, one number can be randomly selected from multiple numbers as the corresponding encryption base, and a pseudo-random number of corresponding numerical digits can be generated according to the randomly selected encryption base. Each value in the pseudo-random number is randomly generated, and the value of the pseudo-random number can be an integer within [0, 9] (an integer corresponding to a decimal number); or, it can be an integer within [0, F] (an integer corresponding to a hexadecimal number).

[0031] For example, if the randomly selected encryption base is 4 bits, a pseudo-random number containing 4 values ​​is generated, and the 4 values ​​in the pseudo-random number are all randomly generated; if the randomly selected encryption base is 8 bits, a pseudo-random number containing 8 values ​​is generated, and the 8 values ​​in the pseudo-random number are all randomly generated.

[0032] S120, reading basic data corresponding to the encryption base from the information to be encrypted in sequence, and performing transposition encryption on the basic data according to the pseudo-random number to obtain corresponding ciphertext data.

[0033] The basic data corresponding to the encryption base is read from the information to be encrypted in sequence, and the basic data is transposed and encrypted according to the pseudo-random number to obtain the corresponding ciphertext data. The basic data corresponding to the encryption base is read from the information to be encrypted in sequence, and each basic data is equal to the number of bits of the encryption base, and the basic data is transposed and encrypted by the pseudo-random number, so as to obtain the ciphertext data corresponding to each basic data. Compared with the traditional encryption method, the transposition encryption of the basic data by the pseudo-random number can greatly reduce the complexity of the encryption operation and shorten the time consumption of the encryption process.

[0034] In a specific embodiment, Figure 2 As shown, step S120 includes sub-steps S121, S122, S123 and S124.

[0035] S121. Determine whether the information to be encrypted contains unencrypted data.

[0036] S122: If the information to be encrypted includes unencrypted data, read basic data corresponding to the encryption base from the information to be encrypted in sequence.

[0037] In the specific process, it can be determined first whether the information to be encrypted contains unencrypted data. If the information to be encrypted contains unencrypted data, the basic data corresponding to the encryption base is read sequentially from the information to be encrypted, and the number of bits of the basic data read each time is equal to the number of bits of the encryption base.

[0038] S123. Generate a corresponding transposition bit number according to the pseudo-random number.

[0039] Generate the corresponding transposition number according to the pseudo-random number. In the specific application process, the pseudo-random number can be directly used as the transposition number; or the corresponding transposition number can be generated according to the pseudo-random number and the number of encryption bases obtained, such as multiplying the number of encryption bases obtained by each value in the pseudo-random number, and the last value of each product is used as the transposition number.

[0040] For example, the encryption base is obtained from the information to be encrypted for the third time, and the number of encryption bases obtained is 3, the pseudo-random number is 4768, and the first value "4" of the pseudo-random number is multiplied by "3", and the product is 12. The last value "2" of 12 is used as the first value in the transposed digit.

[0041] S124: Perform encryption operation on the basic data and the transposition bit number to obtain corresponding ciphertext data.

[0042] The basic data and the transposition digit can be encrypted to obtain the corresponding ciphertext data. Each value in the transposition digit is the carry digit of the value in the basic data. The encryption operation is performed on each value in the basic data by the transposition digit to obtain the ciphertext data corresponding to the basic data. The number of digits of the values ​​in the basic data and the ciphertext data is equal. In the process of encrypting each value in the basic data, the corresponding value can be carried according to the encoding rules of the basic data.

[0043] For example, if the first numerical value in the basic data is "g" and the first numerical value in the transposed digit is "2", then "g" is incremented by 2 to obtain "i", and the ciphertext value corresponding to the first numerical value in the basic data is "i". By obtaining the ciphertext values ​​corresponding to each numerical value in the basic data through the above method, the ciphertext data corresponding to the basic data can be obtained.

[0044] In a specific embodiment, Figure 3 As shown, step S125 is also included after step S124.

[0045] S125. Write the obtained ciphertext data into a cache.

[0046] The acquired ciphertext data may be written into a cache, which may be a storage space in a storage medium (such as a memory) of a user terminal or a management server that is dedicated to storing ciphertext data. The cache may be used to temporarily store ciphertext data.

[0047] In a specific embodiment, Figure 4 As shown, step S121 also includes step S1211 after step S121.

[0048] S1211. If the information to be encrypted does not contain unencrypted data, read the ciphertext data stored in the cache and write them into the data file in sequence for storage.

[0049] If the information to be encrypted does not contain unencrypted data, it means that all data in the information to be encrypted has been encrypted; the ciphertext data stored in the cache can be obtained and written into the data file in sequence for storage, and the data file can be used to persistently store the ciphertext data.

[0050] S130. Concatenate the ciphertext data of each of the basic data to obtain encrypted data information corresponding to the information to be encrypted.

[0051] The encrypted data information corresponding to the information to be encrypted is obtained by splicing the ciphertext data of each of the basic data. The ciphertext data corresponding to the basic data can be spliced. Specifically, the ciphertext data can be sequentially spliced ​​according to the order of the basic data corresponding to the ciphertext data, so as to obtain the encrypted data information corresponding to the information to be encrypted.

[0052] In a specific embodiment, Figure 5 As shown, step S130 includes sub-steps S131 and S132.

[0053] S131. Read the stored ciphertext data.

[0054] S132. Concatenate the ciphertext data of each basic data according to the position of the basic data in the information to be encrypted to obtain corresponding encrypted data information.

[0055] Specifically, the ciphertext data stored in the cache or the ciphertext data stored in the data file can be read to determine the position of each basic data in the information to be encrypted, and the ciphertext data of each basic data can be spliced ​​in sequence according to the position of the basic data to obtain the encrypted data information. The order of each ciphertext data in the encrypted data information is consistent with the position of the basic data corresponding to the ciphertext data in the information to be encrypted.

[0056] In a specific embodiment, Figure 6 As shown, step S140 is further included after step S130.

[0057] S140: Send the encrypted data information and the encrypted seed.

[0058] After obtaining the encrypted data information, the encrypted data information can be combined with the encryption seed and sent. After the receiving end receives the encrypted data information and the encryption seed, it can decrypt and restore the encrypted data information according to the encryption seed to obtain the decrypted information. The specific process of decryption and restoration is the opposite of the above encryption operation process; if the decryption is correct, the decrypted information obtained is the original information to be encrypted.

[0059] In the information encryption method based on pseudo-random numbers provided in the embodiment of the present invention, the method includes: if the input information to be encrypted is received, randomly generate an encryption seed; the encryption seed includes an encryption base and a pseudo-random number corresponding to the encryption base; read the basic data corresponding to the encryption base from the information to be encrypted in sequence, and perform transposition encryption on the basic data according to the pseudo-random number to obtain the corresponding ciphertext data; splice the ciphertext data of each basic data to obtain the encrypted data information corresponding to the information to be encrypted. Through the above method, an encryption seed is randomly generated, and the basic data read in sequence from the information to be encrypted are transposition encrypted according to the encryption seed to obtain the corresponding encrypted data information; the data to be encrypted is transposition encrypted by randomly generating an encryption seed, which greatly reduces the complexity of the encryption operation and shortens the time consumption of the encryption process.

[0060] The embodiment of the present invention further provides an information encryption device based on pseudo-random numbers, which is configured in a user terminal or a management server, and is used to execute any embodiment of the information encryption method based on pseudo-random numbers. Figure 7 , Figure 7 A schematic block diagram of an information encryption device based on pseudo-random numbers provided by an embodiment of the present invention.

[0061] like Figure 7 As shown, the information encryption device 100 based on pseudo-random numbers includes an encryption seed generation unit 110 , a ciphertext data generation unit 120 and an encryption data information acquisition unit 130 .

[0062] The encryption seed generation unit 110 is used to randomly generate an encryption seed upon receiving input information to be encrypted; the encryption seed includes an encryption base and a pseudo-random number corresponding to the encryption base.

[0063] The ciphertext data generating unit 120 is used to sequentially read basic data corresponding to the encryption base from the information to be encrypted, and perform transposition encryption on the basic data according to the pseudo-random number to obtain corresponding ciphertext data.

[0064] The encrypted data information acquisition unit 130 is used to concatenate the ciphertext data of each of the basic data to obtain the encrypted data information corresponding to the information to be encrypted.

[0065] The pseudo-random number-based information encryption device provided in the embodiment of the present invention applies the above-mentioned pseudo-random number-based information encryption method. If the input information to be encrypted is received, an encryption seed is randomly generated; the encryption seed includes an encryption base and a pseudo-random number corresponding to the encryption base; the basic data corresponding to the encryption base is read from the information to be encrypted in sequence, and the basic data is transposed and encrypted according to the pseudo-random number to obtain the corresponding ciphertext data; the ciphertext data of each basic data is spliced ​​to obtain the encrypted data information corresponding to the information to be encrypted. Through the above method, an encryption seed is randomly generated, and the basic data read in sequence from the information to be encrypted are transposed and encrypted according to the encryption seed to obtain the corresponding encrypted data information; the encryption seed is randomly generated to transpose and encrypt the data to be encrypted, which greatly reduces the complexity of the encryption operation and shortens the time consumption of the encryption process.

[0066] The steps performed by the above-mentioned information encryption device based on pseudo-random numbers can be implemented in the form of a computer program. The information encryption device based on pseudo-random numbers can be implemented in the form of a computer device. The computer program can be implemented in the form of a computer device. Figure 8 Runs on the computer device shown.

[0067] See also Figure 8 , Figure 8 The computer device provided in the embodiment of the present invention is a schematic block diagram. The computer device may be a user terminal or a management server for executing an information encryption method based on pseudo-random numbers to perform transposition encryption on input information to be encrypted to obtain encrypted data information.

[0068] See also Figure 8 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .

[0069] The storage medium 503 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can execute an information encryption method based on pseudo-random numbers, wherein the storage medium 503 can be a volatile storage medium or a non-volatile storage medium.

[0070] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0071] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute an information encryption method based on pseudo-random numbers.

[0072] The network interface 505 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0073] The processor 502 is used to run the computer program 5032 stored in the memory to implement the corresponding functions in the above-mentioned information encryption method based on pseudo-random numbers.

[0074] Those skilled in the art will understand that Figure 8 The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 8 The embodiments shown are consistent and will not be described again here.

[0075] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0076] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps included in the above-mentioned information encryption method based on pseudo-random numbers are implemented.

[0077] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed 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 exceed the scope of the present invention.

[0078] In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, 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. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.

[0079] 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 embodiments of the present invention.

[0080] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0081] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk or an optical disk.

[0082] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for information encryption based on pseudo-random numbers, characterized in that: The method comprises: If the input information to be encrypted is received, an encryption seed is randomly generated; the encryption seed includes an encryption base and a pseudo-random number corresponding to the encryption base; Reading basic data corresponding to the encryption base from the information to be encrypted in sequence, and performing transposition encryption on the basic data according to the pseudo-random number to obtain corresponding ciphertext data; The step of sequentially reading basic data corresponding to the encryption base from the information to be encrypted, and performing transposition encryption on the basic data according to the pseudo-random number to obtain corresponding ciphertext data includes: Determining whether the information to be encrypted contains unencrypted data; If the information to be encrypted contains unencrypted data, sequentially reading basic data corresponding to the encryption base from the information to be encrypted; Generate a corresponding transposition number according to the pseudo-random number; Perform encryption operation on the basic data and the transposition number to obtain corresponding ciphertext data; The transposition digit is the carry digit of the value in the basic data. In the process of performing encryption operation on each value in the basic data, the corresponding value is carried according to the encoding rule of the basic data. The ciphertext data of each of the basic data are concatenated to obtain encrypted data information corresponding to the information to be encrypted.

2. The information encryption method based on pseudo-random numbers according to claim 1, characterized in that: After the basic data and the transposition bit are encrypted to obtain the corresponding ciphertext data, the method further includes: The obtained ciphertext data is written into the cache.

3. The information encryption method based on pseudo-random numbers according to claim 2, characterized in that: After determining whether the information to be encrypted contains unencrypted data, the method further includes: If the information to be encrypted does not contain unencrypted data, the ciphertext data stored in the cache is read and written into the data file in sequence for storage.

4. The information encryption method based on pseudo-random numbers according to claim 1, characterized in that: The step of concatenating the ciphertext data of each of the basic data to obtain encrypted data information corresponding to the information to be encrypted includes: Read the stored ciphertext data; The ciphertext data of each basic data are concatenated according to the position of the basic data in the information to be encrypted to obtain corresponding encrypted data information.

5. The information encryption method based on pseudo-random numbers according to claim 1, characterized in that: After the ciphertext data of each of the basic data are concatenated to obtain the encrypted data information corresponding to the information to be encrypted, the method further includes: The encrypted data information and the encrypted seed are sent.

6. An information encryption device based on pseudo-random numbers, characterized in that the device comprises the following units: An encryption seed generation unit, configured to randomly generate an encryption seed upon receiving the input information to be encrypted; the encryption seed includes an encryption base and a pseudo-random number corresponding to the encryption base; A ciphertext data generating unit, configured to sequentially read basic data corresponding to the encryption base from the information to be encrypted, and perform transposition encryption on the basic data according to the pseudo-random number to obtain corresponding ciphertext data; The ciphertext data generating unit comprises: A judging unit, used to judge whether the information to be encrypted contains unencrypted data; A basic data reading unit, configured to read basic data corresponding to the encryption base from the information to be encrypted in sequence if the information to be encrypted contains unencrypted data; A transposition number generating unit, used to generate a corresponding transposition number according to the pseudo-random number; An encryption operation unit, used to perform encryption operation on the basic data and the transposition bit number to obtain corresponding ciphertext data; The transposition digit is the carry digit of the value in the basic data. In the process of performing encryption operation on each value in the basic data, the corresponding value is carried according to the encoding rule of the basic data. The encrypted data information acquisition unit is used to concatenate the ciphertext data of each of the basic data to obtain the encrypted data information corresponding to the information to be encrypted.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the pseudo-random number-based information encryption method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the information encryption method based on pseudo-random numbers as claimed in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Data encryption and decryption methods and devices

    CN102064936A

  • XDR data information encryption method, device and equipment, and medium

    CN108377183A

  • Data encryption method and device, and data decryption method and device

    CN109218010A

  • Encryption method and device, equipment and medium

    CN109617680A

  • Digital information encryption method and device, computer equipment and storage medium

    CN110336662A