[go: up one dir, main page]

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

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

Info

Publication number
CN115514482B
CN115514482B CN202211241505.8A CN202211241505A CN115514482B CN 115514482 B CN115514482 B CN 115514482B CN 202211241505 A CN202211241505 A CN 202211241505A CN 115514482 B CN115514482 B CN 115514482B
Authority
CN
China
Prior art keywords
encryption
information
data
encrypted
basic data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211241505.8A
Other languages
Chinese (zh)
Other versions
CN115514482A (en
Inventor
周程伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Zhishi Zhihe Technology Co ltd
Original Assignee
Shenzhen Zhishi Zhihe Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhishi Zhihe Technology Co ltd filed Critical Shenzhen Zhishi Zhihe Technology Co ltd
Priority to CN202211241505.8A priority Critical patent/CN115514482B/en
Publication of CN115514482A publication Critical patent/CN115514482A/en
Application granted granted Critical
Publication of CN115514482B publication Critical patent/CN115514482B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses an information encryption method, device, equipment and medium based on pseudo random numbers, wherein the method comprises the following steps: if the input information to be encrypted is received, randomly generating an encryption seed; the encryption seed comprises an encryption base and a pseudo random number corresponding to the encryption base; 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; and splicing the ciphertext data of each piece of basic data to obtain encrypted data information corresponding to the information to be encrypted. By the method, encryption seeds are randomly generated, and basic data read from the information to be encrypted in sequence are subjected to transposition encryption according to the encryption seeds to obtain corresponding encrypted data information; the method has the advantages that the data to be encrypted are subjected to transposition encryption in a mode of randomly generating encryption seeds, so that the complexity of encryption operation is greatly reduced, and the time consumption of an encryption process is shortened.

Description

Information encryption method, device, equipment and medium based on pseudo random number
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an information encryption method, apparatus, device, and medium based on pseudo random numbers.
Background
In order to improve the security of data information transmission, the data information can be encrypted and then transmitted through a network, however, the encryption method for the data information in the prior art generally needs to carry out encryption calculation by complex calculation and consumes more resources, so that a large amount of calculation resources are occupied, and the encryption process of the data information is long in time consumption and low in cost efficiency. Therefore, the prior art method has a problem of long time consumption in the process of encrypting the data information.
Disclosure of Invention
The embodiment of the invention provides an information encryption method, device, equipment and medium based on pseudo random numbers, which aim to solve the problem of long time consumption in the process of encrypting data information in the prior art.
In a first aspect, an embodiment of the present invention provides an information encryption method based on a pseudo random number, where the method includes:
if the input information to be encrypted is received, randomly generating an encryption seed; the encryption seed comprises an encryption base and a pseudo random number corresponding to the encryption base;
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;
and splicing the ciphertext data of each piece of basic data to obtain encrypted data information corresponding to the information to be encrypted.
In a second aspect, an embodiment of the present invention provides an information encryption apparatus based on a pseudo random number, including:
the encryption seed generation unit is used for randomly generating encryption seeds if the input information to be encrypted is received; the encryption seed comprises an encryption base and a pseudo random number corresponding to the encryption base;
The ciphertext data generation unit is used for 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;
and the encrypted data information acquisition unit is used for splicing the ciphertext data of each piece of basic data to obtain encrypted data information corresponding to the information to be encrypted.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, where the processor implements the information encryption method based on pseudo random numbers according to the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, which when executed by a processor, implements the information encryption method based on pseudo random numbers as described in the first aspect above.
The embodiment of the invention provides an information encryption method, device, equipment and medium based on pseudo random numbers. If the input information to be encrypted is received, randomly generating an encryption seed; the encryption seed comprises an encryption base and a pseudo random number corresponding to the encryption base; 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; and splicing the ciphertext data of each piece of basic data to obtain encrypted data information corresponding to the information to be encrypted. By the method, encryption seeds are randomly generated, and basic data read from the information to be encrypted in sequence are subjected to transposition encryption according to the encryption seeds to obtain corresponding encrypted data information; the method has the advantages that the data to be encrypted are subjected to transposition encryption in a mode of randomly generating encryption seeds, so that the complexity of encryption operation is greatly reduced, and the time consumption of an encryption process is shortened.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an information encryption method based on pseudo random numbers according to an embodiment of the present invention;
FIG. 2 is a schematic sub-flowchart of an information encryption method based on pseudo random numbers according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of another sub-flowchart of an information encryption method based on pseudo random numbers according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another sub-flow of the pseudo-random number based information encryption method according to the embodiment of the present invention;
FIG. 5 is a schematic diagram of another sub-flow of the pseudo-random number based information encryption method according to the embodiment of the present invention;
FIG. 6 is a schematic flow chart of another method for encrypting information based on pseudo random number according to an embodiment of the present invention;
FIG. 7 is a schematic block diagram of an information encryption device based on pseudo random numbers according to an embodiment of the present invention;
fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1, fig. 1 is a flow chart of an information encryption method based on pseudo random numbers according to an embodiment of the invention; the information encryption method based on the pseudo-random number is applied to a user terminal or a management server, the information encryption method based on the pseudo-random number is executed through application software installed in the user terminal or the management server, the user terminal can receive information to be encrypted input by a user and obtain encrypted data information after transposition encryption, and the user terminal can be terminal equipment such as a desktop computer, a notebook computer, a tablet computer or a mobile phone; the management server can receive the information to be encrypted from the user terminal, obtain encrypted data information after transposition encryption and feed the encrypted data information back to the server side of the user terminal, such as a server side built in an enterprise or government department. As shown in fig. 1, the method includes steps S110 to S130.
S110, if the input information to be encrypted is received, an encryption seed is randomly generated.
If the input information to be encrypted is received, randomly generating an encryption seed; the encryption seed includes a encryption base and a pseudorandom 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, the information to be encrypted can also be files such as pictures or documents, and the corresponding character information can be obtained after the files such as pictures or documents are analyzed. The management server may randomly generate an encryption seed, wherein the encryption seed includes an encryption base and a pseudorandom number corresponding to the encryption base. The encryption base can be 1bit, 2bit, 4bit, 8bit … …, etc., 1bit is a character digit, the encryption base is 4bit and corresponds to four character digits, and the numerical digits contained in the pseudo random number are equal to the digit of the encryption base. Specifically, in the process of generating the encryption seed, one of the numbers can be randomly selected as a corresponding encryption base, a pseudo-random number with corresponding numerical digits is generated according to the randomly selected encryption base, each numerical value in the pseudo-random number is randomly generated, and the numerical value of the pseudo-random number can be an integer (an integer corresponding to a decimal number) within [0,9 ]; alternatively, the value may be an integer (integer corresponding to hexadecimal number) within [0,F ].
For example, if the randomly selected encryption base is 4 bits, correspondingly generating a pseudo random number containing 4 values, and randomly generating the 4 values in the pseudo random number at the moment; if the randomly selected encryption base is 8 bits, correspondingly generating a pseudo random number containing 8 values, and randomly generating the 8 values in the pseudo random number at the moment.
And S120, 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.
And 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. And sequentially reading basic data corresponding to the encryption base from the information to be encrypted, wherein each basic data is equal to the bit number of the encryption base, and transposition encryption is carried out on the basic data through pseudo random numbers, so that ciphertext data corresponding to each basic data is obtained. The basic data is subjected to transposition encryption through the pseudo random number, so that the complexity of encryption operation can be greatly reduced, and the time consumption of the encryption process is shortened compared with the traditional encryption method.
In a specific embodiment, as shown in fig. 2, step S120 includes substeps S121, S122, S123, and S124.
S121, judging whether the information to be encrypted contains unencrypted data.
S122, if the information to be encrypted contains unencrypted data, sequentially reading basic data corresponding to the encryption base from the information to be encrypted.
In a specific process, whether the information to be encrypted contains unencrypted data can be judged first, if the information to be encrypted contains unencrypted data, basic data corresponding to the encryption base number are sequentially read 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 number.
S123, generating a corresponding transposition number according to the pseudo random number.
And generating a corresponding bit conversion number according to the pseudo random number. In the specific application process, the pseudo random number can be directly used as a transposition number; or generating a corresponding transposition number according to the pseudo-random number and the acquired number of the encryption base, for example, multiplying each numerical value in the pseudo-random number according to the acquired number of the encryption base, and taking the last numerical value of each product as the transposition number.
For example, the third time the encryption base is obtained from the information to be encrypted, the number of obtained encryption bases is 3, the pseudo random number is 4768, the first value "4" of the pseudo random number is multiplied by "3", the product is 12, and the last value "2" of 12 is used as the first value in the bit number.
S124, performing encryption operation on the basic data and the transposition number to obtain corresponding ciphertext data.
The basic data and the transposition number can be subjected to encryption operation so as to obtain corresponding ciphertext data, each numerical value in the transposition number, namely the advancing number of the numerical value in the basic data, and each numerical value in the basic data is subjected to encryption operation through the transposition number so as to obtain ciphertext data corresponding to the basic data, wherein the numerical value in the basic data is equal to the advancing number of the numerical value in the ciphertext data. In the process of carrying out encryption operation on each bit value in the basic data, carrying out carry on the corresponding value according to the coding rule of the basic data.
For example, if the first numerical value in the basic data is "g", and the first numerical value in the bit conversion number is "2", then carrying 2 bits on "g" to obtain "i", and the ciphertext numerical value corresponding to the first numerical value in the basic data is "i"; and obtaining ciphertext values corresponding to the bit values in the basic data by the method, so as to obtain ciphertext data corresponding to the basic data.
In a specific embodiment, as shown in fig. 3, step S125 is further included after step S124.
S125, writing the acquired ciphertext data into a cache.
The obtained ciphertext data can be written into a buffer memory, the buffer memory can be a storage space special for ciphertext data storage in a storage medium (such as a memory) of the user terminal or the management server, and the buffer memory can be used for temporarily storing ciphertext data.
In a specific embodiment, as shown in fig. 4, step S121 is further followed by step S1211.
S1211, if the information to be encrypted does not contain unencrypted data, reading the ciphertext data stored in the cache and sequentially writing the ciphertext data into a data file for storage.
If the information to be encrypted does not contain unencrypted data, indicating that all data in the information to be encrypted are subjected to encryption operation; ciphertext data stored in the cache can be acquired and sequentially written into a data file for storage, and the data file can be used for carrying out persistent storage on the ciphertext data.
S130, splicing the ciphertext data of each piece of basic data to obtain encrypted data information corresponding to the information to be encrypted.
And splicing the ciphertext data of each piece of basic data to obtain encrypted data information corresponding to the information to be encrypted. Ciphertext data corresponding to the basic data can be spliced, and specifically, each ciphertext data can be spliced sequentially according to the sequence of the basic data corresponding to the ciphertext data, so that encrypted data information corresponding to the information to be encrypted is obtained.
In one embodiment, as shown in fig. 5, the step S130 includes sub-steps S131 and S132.
S131, reading the stored ciphertext data.
And S132, splicing ciphertext data of each piece of basic data according to the position of the basic data in the information to be encrypted to obtain corresponding encrypted data information.
Specifically, the ciphertext data stored in the cache or the ciphertext data stored in the data file can be read, the position of each basic data in the information to be encrypted is determined, the ciphertext data of each basic data are spliced in sequence according to the position of the basic data, so as to obtain encrypted data information, and the sequence 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.
In a specific embodiment, as shown in fig. 6, step S130 is further followed by step S140.
And S140, transmitting the encrypted data information and the encrypted seed.
After the encrypted data information is obtained, the encrypted data information and the encrypted seed can be combined and then transmitted. After receiving the encrypted data information and the encrypted seed, the receiving end can decrypt and restore the encrypted data information according to the encrypted seed to obtain decryption information. The specific process of decryption and restoration is opposite to the process of encryption operation; if the decryption is correct, the obtained decryption information is the original information to be encrypted.
In the information encryption method based on pseudo random numbers provided by the embodiment of the invention, the method comprises the following steps: if the input information to be encrypted is received, randomly generating an encryption seed; the encryption seed comprises an encryption base and a pseudo random number corresponding to the encryption base; 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; and splicing the ciphertext data of each piece of basic data to obtain encrypted data information corresponding to the information to be encrypted. By the method, encryption seeds are randomly generated, and basic data read from the information to be encrypted in sequence are subjected to transposition encryption according to the encryption seeds to obtain corresponding encrypted data information; the method has the advantages that the data to be encrypted are subjected to transposition encryption in a mode of randomly generating encryption seeds, so that the complexity of encryption operation is greatly reduced, and the time consumption of an encryption process is shortened.
The embodiment of the invention also provides a pseudo-random number-based information encryption device which is configured in the user terminal or the management server and is used for executing any embodiment of the pseudo-random number-based information encryption method. In particular, referring to fig. 7, fig. 7 is a schematic block diagram of an information encryption device based on pseudo random numbers according to an embodiment of the present invention.
As shown in fig. 7, the pseudo-random number-based information encryption apparatus 100 includes an encryption seed generation unit 110, a ciphertext data generation unit 120, and an encrypted data information acquisition unit 130.
An encryption seed generating unit 110, configured to randomly generate an encryption seed if the input information to be encrypted is received; the encryption seed includes a encryption base and a pseudorandom number corresponding to the encryption base.
And the ciphertext data generating unit 120 is 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.
And the encrypted data information obtaining unit 130 is configured to splice ciphertext data of each piece of the basic data to obtain encrypted data information corresponding to the information to be encrypted.
The information encryption device based on the pseudo random number provided by the embodiment of the invention applies the information encryption method based on the pseudo random number, and if the input information to be encrypted is received, encryption seeds are randomly generated; the encryption seed comprises an encryption base and a pseudo random number corresponding to the encryption base; 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; and splicing the ciphertext data of each piece of basic data to obtain encrypted data information corresponding to the information to be encrypted. By the method, encryption seeds are randomly generated, and basic data read from the information to be encrypted in sequence are subjected to transposition encryption according to the encryption seeds to obtain corresponding encrypted data information; the method has the advantages that the data to be encrypted are subjected to transposition encryption in a mode of randomly generating encryption seeds, so that the complexity of encryption operation is greatly reduced, and the time consumption of an encryption process is shortened.
The steps performed by the above-described pseudo-random number based information encrypting means may be implemented in the form of a computer program, and the pseudo-random number based information encrypting means may be implemented in the form of a computer device, which is operable on a computer device as shown in fig. 8.
Referring to fig. 8, fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device may be a user terminal or a management server for performing a pseudo-random number based information encryption method to transpose and encrypt the input information to be encrypted to obtain encrypted data information.
With reference to FIG. 8, the computer device 500 includes a processor 502, a memory, and a network interface 505, connected by a system bus 501, where the memory may include a storage medium 503 and an internal memory 504.
The storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform a pseudo-random number based information encryption method, wherein the storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform a pseudo-random number based information encryption method.
The network interface 505 is used for network communication, such as providing for transmission of data information, etc. It will be appreciated by those skilled in the art that the architecture shown in fig. 8 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting of the computer device 500 to which the present inventive arrangements may be implemented, as a particular computer device 500 may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
The processor 502 is configured to execute a computer program 5032 stored in a memory to implement the corresponding functions in the above-described information encryption method based on pseudo random numbers.
Those skilled in the art will appreciate that the embodiment of the computer device shown in fig. 8 is not limiting of the specific construction of the computer device, and in other embodiments, the computer device may include more or less components than those shown, or certain components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may include only a memory and a processor, and in such embodiments, the structure and function of the memory and the processor are consistent with the embodiment shown in fig. 8, and will not be described again.
It should be appreciated that in embodiments of the present invention, the Processor 502 may be a central processing unit (Central Processing Unit, CPU), the Processor 502 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application SPECIFIC INTEGRATED Circuits (ASICs), off-the-shelf Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a volatile or nonvolatile computer readable storage medium. The computer readable storage medium stores a computer program which when executed by a processor implements the steps included in the pseudo-random number based information encryption method described above.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, device and unit described above may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein. Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the units is merely a logical function division, there may be another division manner in actual implementation, or units having the same function may be integrated into one unit, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present invention.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention is essentially or part of what contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a computer-readable storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (8)

1. A method for encrypting information based on pseudo random numbers, the method comprising:
if the input information to be encrypted is received, randomly generating an encryption seed; the encryption seed comprises an encryption base and a pseudo random number corresponding to the encryption base;
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;
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 comprises the following steps:
judging whether the information to be encrypted contains unencrypted data or not;
If the information to be encrypted contains unencrypted data, sequentially reading basic data corresponding to the encryption base from the information to be encrypted;
generating a corresponding transposition number according to the pseudo random number;
performing encryption operation on the basic data and the transposition number to obtain corresponding ciphertext data;
The bit number is the advancing number of the numerical value in the basic data, and in the process of carrying out encryption operation on each numerical value in the basic data, the corresponding numerical value is carried according to the coding rule of the basic data;
and splicing the ciphertext data of each piece of basic data to obtain encrypted data information corresponding to the information to be encrypted.
2. The method for encrypting information based on pseudo random numbers according to claim 1, wherein after performing encryption operation on the base data and the transposition number to obtain corresponding ciphertext data, further comprising:
And writing the acquired ciphertext data into a cache.
3. The method for encrypting information based on pseudo random number according to claim 2, wherein said determining whether said information to be encrypted contains unencrypted data further comprises:
And if the information to be encrypted does not contain unencrypted data, reading the ciphertext data stored in the cache and sequentially writing the ciphertext data into a data file for storage.
4. The method for encrypting information based on pseudo random numbers according to claim 1, wherein said concatenating ciphertext data of each of said basic data to obtain encrypted data information corresponding to said information to be encrypted, comprises:
reading stored ciphertext data;
and splicing the ciphertext data of each piece of basic data according to the position of the basic data in the information to be encrypted to obtain corresponding encrypted data information.
5. The method for encrypting information based on pseudo random number according to claim 1, wherein after said concatenating ciphertext data of each of said basic data to obtain encrypted data information corresponding to said information to be encrypted, further comprises:
and sending the encrypted data information and the encrypted seed.
6. An information encryption device based on pseudo random numbers, characterized in that the device comprises the following units:
the encryption seed generation unit is used for randomly generating encryption seeds if the input information to be encrypted is received; the encryption seed comprises an encryption base and a pseudo random number corresponding to the encryption base;
The ciphertext data generation unit is used for 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;
the ciphertext data generation unit includes:
the judging unit is used for judging whether the information to be encrypted contains unencrypted data or not;
the basic data reading unit is used for sequentially reading basic data corresponding to the encryption base from the information to be encrypted if the information to be encrypted contains unencrypted data;
the transposition number generating unit is used for generating a corresponding transposition number according to the pseudo random number;
the encryption operation unit is used for carrying out encryption operation on the basic data and the transposition number to obtain corresponding ciphertext data;
The bit number is the advancing number of the numerical value in the basic data, and in the process of carrying out encryption operation on each numerical value in the basic data, the corresponding numerical value is carried according to the coding rule of the basic data;
and the encrypted data information acquisition unit is used for splicing the ciphertext data of each piece of basic data to obtain encrypted data information corresponding to the information to be encrypted.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the pseudo-random number based information encryption method according to any one of claims 1 to 5 when the computer program is executed.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when executed by a processor, implements the pseudo-random number based information encryption method according to any one of claims 1 to 5.
CN202211241505.8A 2022-10-11 2022-10-11 Information encryption method, device, equipment and medium based on pseudo-random numbers Active CN115514482B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211241505.8A CN115514482B (en) 2022-10-11 2022-10-11 Information encryption method, device, equipment and medium based on pseudo-random numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211241505.8A CN115514482B (en) 2022-10-11 2022-10-11 Information encryption method, device, equipment and medium based on pseudo-random numbers

Publications (2)

Publication Number Publication Date
CN115514482A CN115514482A (en) 2022-12-23
CN115514482B true CN115514482B (en) 2024-11-12

Family

ID=84510728

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211241505.8A Active CN115514482B (en) 2022-10-11 2022-10-11 Information encryption method, device, equipment and medium based on pseudo-random numbers

Country Status (1)

Country Link
CN (1) CN115514482B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109617680A (en) * 2018-12-06 2019-04-12 中国移动通信集团福建有限公司 Encryption method, apparatus, equipment and medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5533128A (en) * 1995-01-18 1996-07-02 Vobach; Arnold Pseudo-random transposition cipher system and method
US6304657B1 (en) * 1999-05-26 2001-10-16 Matsushita Electric Industrial Co., Ltd. Data encryption apparatus using odd number of shift-rotations and method
CN102064936B (en) * 2010-11-29 2012-08-22 北京卓微天成科技咨询有限公司 Data encryption and decryption methods and devices
CN109218010B (en) * 2017-07-04 2021-11-30 阿波罗智能技术(北京)有限公司 Data encryption method and device and data decryption method and device
CN108377183B (en) * 2017-12-20 2020-11-13 中国移动通信集团福建有限公司 XDR data information encryption method, device, equipment and medium
CN111615106B (en) * 2019-02-25 2023-09-26 阿里巴巴集团控股有限公司 Encryption method and device for voice data packet
CN110336662B (en) * 2019-06-06 2022-02-18 平安科技(深圳)有限公司 Digital information encryption method and device, computer equipment and storage medium
CN114465712B (en) * 2022-03-28 2024-10-29 蜂巢能源科技(无锡)有限公司 Data encryption method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109617680A (en) * 2018-12-06 2019-04-12 中国移动通信集团福建有限公司 Encryption method, apparatus, equipment and medium

Also Published As

Publication number Publication date
CN115514482A (en) 2022-12-23

Similar Documents

Publication Publication Date Title
EP4000214B1 (en) Cryptographic architecture for cryptographic permutation
JP6182132B2 (en) Random number generation system based on noise at memory startup
US8036379B2 (en) Cryptographic processing
US11381381B2 (en) Privacy preserving oracle
EP1440535A2 (en) Memory encrytion system and method
KR101767655B1 (en) Dynamic encryption keys for use with xts encryption systems employing reduced-round ciphers
US9727755B2 (en) Processing information
CA2793810A1 (en) Method and system for securing data utilizing redundant secure key storage
US12155754B2 (en) Secure integer comparison using binary trees
US20210006391A1 (en) Data processing method, circuit, terminal device and storage medium
CN107534549B (en) Readable storage medium, method and system for encrypting data stream block
US8364955B1 (en) Systems and methods for effectively removing access to individual files on magnetic tape media
CN116346316A (en) Process object key update during process creation in secret-state computing
US20100031088A1 (en) Method and system for processing information
CN115514482B (en) Information encryption method, device, equipment and medium based on pseudo-random numbers
CN111368316B (en) File encryption and decryption method and device
JP4863279B2 (en) Memory system and memory access method
US12206757B2 (en) Efficient random masking of values while maintaining their sign under fully homomorphic encryption (FHE)
US20220398339A1 (en) Protection of stored and communicated secret data against side-channel attacks
US20220014381A1 (en) Message authentication code (mac) generation for live migration of encrypted virtual machiness
CN112487448B (en) Encryption information processing device, method and computer equipment
CN119004562B (en) Field programmable gate array encryption method, system, device, equipment and medium
US10771655B2 (en) System and method for transferring a document
CN119740245A (en) Device data encryption method, computer device, storage medium, and program product
CN119961975A (en) Method, system and device for implementing dynamic encryption desensitization based on format retention

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20241009

Address after: 1216 Hanggang Fuchun Business Building, 6031 Shennan Avenue, Tian'an Community, Shatou Street, Futian District, Shenzhen City, Guangdong Province 518000

Applicant after: Shenzhen Zhishi Zhihe Technology Co.,Ltd.

Country or region after: China

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: Shenzhen Lianrong Technology Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant