CN114239027A - Data encryption method and apparatus, data decryption method and apparatus, electronic device, and medium - Google Patents

Data encryption method and apparatus, data decryption method and apparatus, electronic device, and medium Download PDF

Info

Publication number
CN114239027A
CN114239027A CN202111561464.6A CN202111561464A CN114239027A CN 114239027 A CN114239027 A CN 114239027A CN 202111561464 A CN202111561464 A CN 202111561464A CN 114239027 A CN114239027 A CN 114239027A
Authority
CN
China
Prior art keywords
data
particle
digit
value
determining
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.)
Pending
Application number
CN202111561464.6A
Other languages
Chinese (zh)
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202111561464.6A priority Critical patent/CN114239027A/en
Publication of CN114239027A publication Critical patent/CN114239027A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The present disclosure provides a data encryption method and apparatus, a decryption method and apparatus, an electronic device, and a medium, wherein the data encryption method includes: determining an N-order particle matrix for the cryptographic algorithm engine; determining a preset particle factor corresponding to the N-order particle matrix; processing the N-order particle matrix through the particle factors to obtain a processed N-order determinant; determining the particle factor as a key of the data, and determining the N-order determinant as a value of the data; and assembling the keys and the values into a verification object, and merging the verification object and the encrypted data and sending the merged verification object to a receiver. Through the embodiment of the disclosure, the security and the processing efficiency of data encryption are improved, and the efficiency of data decryption and the system reliability are improved.

Description

Data encryption method and apparatus, data decryption method and apparatus, electronic device, and medium
Technical Field
The present disclosure relates to the field of data encryption technologies, and in particular, to a data encryption method and apparatus, a data decryption method and apparatus, an electronic device, and a medium.
Background
Currently, data transmission is the communication process by which data is transferred from one place to another. Data transmission systems typically consist of a transmission channel and data circuit terminating equipment (DCE) at both ends of the channel, and in some cases, multiplexing equipment at both ends of the channel. The transmission channel may be a dedicated communication channel or may be provided by a data switching network, a telephone switching network or other types of switching networks. The input and output devices of a data transmission system are terminals or computers, generally called Data Terminal Equipment (DTE), and the data information sent by the DTE is generally a combination of letters, numbers and symbols, and each letter, number or symbol needs to be represented by a binary code in order to transmit the information. The commonly used binary codes include international five number (IA5), EBCDIC code, international telegraph two number (ITA2) and chinese character information exchange code (see data communication code).
In the related art, in the conventional data transmission mode, some data are transmitted in plaintext, and some data are encrypted and then transmitted.
However, the above data transmission includes at least the following drawbacks:
1. safety: the plaintext transmission is easy to capture transmission data by a capture packet, a request is forged, and even if a sender uses an encryption algorithm (such as MD5) for encryption, an attacker can restore a plaintext password through an open source algorithm. Even if the data cannot be restored through the open source algorithm, an attacker can directly obtain the MD5 character string, and the success of the request can be easily verified through the interface.
2. Energy consumption property: if the plaintext data to be transmitted is huge, the time consumption of the encryption and decryption algorithm is very long, and a large amount of network resources are occupied during data transmission.
3. Complexity: some encryption algorithms are relatively complex to use and are relatively cumbersome to use.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the present disclosure is to provide a data encryption method and apparatus, a decryption method and apparatus, an electronic device, and a medium, which overcome, at least to some extent, the problem of poor security of transmission data due to the limitations and disadvantages of the related art.
According to a first aspect of the embodiments of the present disclosure, there is provided a data encryption method, including: determining an N-order particle matrix for the cryptographic algorithm engine; determining a preset particle factor corresponding to the N-order particle matrix; processing the N-order particle matrix through the particle factors to obtain a processed N-order determinant; determining the particle factor as a key of data, determining the N-th determinant as a value of the data; and assembling the key and the value into a check object, and merging the check object and the encrypted data and sending the merged check object and the encrypted data to a receiver.
In an exemplary embodiment of the present disclosure, the particle factor is composed of M digits, a first digit of the particle factor takes a value of a first identifier or a second identifier, any two adjacent digits from a second digit to an M digit of the particle factor form a group of digits, a first digit of the group of digits represents a serial number of a corresponding digit in the "particle matrix", a second digit of the group of digits is a digit for replacing the digit corresponding to the serial number, and a range from the second digit to the M digit of the particle factor takes a value of the first identifier to N.
In an exemplary embodiment of the disclosure, the first digit is a first identifier and the digits in the particle matrix are sorted in a first order, and the second digit is a second identifier and the digits in the particle matrix are sorted in a second order.
In an exemplary embodiment of the present disclosure, assembling the key and the value into a check object, and merging the check object with the encrypted data and transmitting the merged check object to a receiving party includes: encrypting the data by using an MD5 algorithm; and assembling the key and the value into a check object, and merging the check object and the data encrypted by the MD algorithm and sending the merged data to a receiver.
According to a second aspect of the embodiments of the present disclosure, there is provided a data decryption method, including: receiving encrypted data and a verification object corresponding to the encrypted data; verifying the data according to the verification object; and determining to decrypt or abandon the encrypted data according to the verification result.
In an exemplary embodiment of the present disclosure, verifying the data according to the verification object includes: resolving the key and the value in the check object; determining a preset particle factor corresponding to the key; solving a particle matrix through the particle factors and the keys; and judging whether the solved particle matrix is the same as the particle matrix corresponding to the value.
In an exemplary embodiment of the present disclosure, determining to decrypt or discard the encrypted data according to a result of the verification includes: if the solved particle matrix is determined to be the same as the particle matrix corresponding to the value, decrypting the encrypted data; and if the solved particle matrix is determined to be different from the particle matrix corresponding to the value, giving up the encrypted data request.
According to a third aspect of the embodiments of the present disclosure, there is provided a data encryption apparatus including: a determination module configured to determine an N-order particle matrix for the cryptographic algorithm engine; the determining module is configured to determine a preset particle factor corresponding to the N-order particle matrix; the calculation module is used for processing the N-order particle matrix through the particle factors to obtain a processed N-order determinant; the determining module is configured to determine the particle factor as a key of data, and determine the N-th determinant as a value of the data; and the communication module is used for assembling the key and the value into a verification object, merging the verification object and the encrypted data and sending the merged data to a receiver.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a data decryption apparatus including: the communication module is used for receiving the encrypted data and a verification object corresponding to the encrypted data; the checking module is used for checking the data according to the checking object; and the decryption module is used for determining to decrypt or abandon the encrypted data according to the verification result.
According to a fifth aspect of the present disclosure, there is provided an electronic device comprising: a memory; and a processor coupled to the memory, the processor configured to perform the method of any of the above based on instructions stored in the memory.
According to a sixth aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements a data encryption method as recited in any one of the above.
In the embodiment of the disclosure, the encryption algorithm engine is used for calculating the matrix particles after the influence of the particle factors
Figure BDA0003413682580000041
Value, validation of data prior to transmission of data request, i.e.
Figure BDA0003413682580000042
Comparison of values by
Figure BDA0003413682580000043
The verification result of the value decrypts a small amount of sensitive data or abandons the request of data transmission, thereby not only improving the security and the processing efficiency of data encryption, but also improving the efficiency of data decryption and the reliability of a system.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 illustrates a schematic diagram of an exemplary system architecture to which an encryption scheme or decryption scheme of an embodiment of the present invention may be applied;
FIG. 2 is a flow chart of a method of data encryption in an exemplary embodiment of the present disclosure;
FIG. 3 is a flow chart of another method of data encryption in an exemplary embodiment of the present disclosure;
FIG. 4 is a flow chart of another method of data encryption in an exemplary embodiment of the present disclosure;
FIG. 5 is a flow chart of another method of data encryption in an exemplary embodiment of the present disclosure;
FIG. 6 is a flow chart of another method of data encryption in an exemplary embodiment of the present disclosure;
FIG. 7 is an interaction diagram of a data encryption scheme in an exemplary embodiment of the present disclosure;
FIG. 8 is an interaction diagram of another data encryption scheme in an exemplary embodiment of the present disclosure;
fig. 9 is a block diagram of a data encryption apparatus in an exemplary embodiment of the present disclosure;
fig. 10 is a block diagram of a data decryption apparatus in an exemplary embodiment of the present disclosure;
fig. 11 is a block diagram of an electronic device in an exemplary embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Further, the drawings are merely schematic illustrations of the present disclosure, in which the same reference numerals denote the same or similar parts, and thus, a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which an encryption scheme or a decryption scheme of an embodiment of the present invention may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like.
The server 105 may be a server that provides various services. For example, a user using the terminal device 103 (or the terminal device 101 or 102) may obtain a positioning time period and a time threshold for determining a position of each satellite search from the server 105, perform positioning according to the positioning time period and the time threshold for determining a position of each satellite search, and calculate the number of times of incomplete positioning, where the number of times of incomplete positioning includes the number of times of incomplete positioning within the range of the time threshold for determining a position of each satellite search, and switch the operating state of the satellite positioning module according to the number of times of incomplete positioning, so that missing of positioning information may be avoided, thereby improving positioning accuracy.
In some embodiments, the positioning method provided by the embodiments of the present invention is generally executed by the terminal 105, and accordingly, the positioning apparatus is generally disposed in the terminal device 103 (or the terminal device 101 or 102). In other embodiments, some servers may have similar functionality as the terminal device to perform the method. Therefore, the positioning method provided by the embodiment of the invention is not limited to be executed by the terminal equipment.
The following describes exemplary embodiments of the present disclosure in detail with reference to fig. 2 to 10.
Fig. 2 is a flowchart of a data encryption method in an exemplary embodiment of the present disclosure.
Referring to fig. 2, the step of the transmitting side performing the data encryption method may include:
step S202, an N-order particle matrix for the encryption algorithm engine is determined.
Step S204, determining a preset particle factor corresponding to the N-order particle matrix.
And step S206, processing the N-order particle matrix through the particle factors to obtain a processed N-order determinant.
Step S208, determining the particle factor as a key of data, and determining the N-th determinant as a value of the data.
Step S210, the key and the value are assembled into a check object, and the check object and the encrypted data are merged and sent to a receiving party.
In an exemplary embodiment of the present disclosure, "matrix particles" after the influence of the "particle factor" are calculated by the cryptographic algorithm engine
Figure BDA0003413682580000061
Value, to be carried out first when transmitting data requestsValidation of data, i.e.
Figure BDA0003413682580000062
Comparison of values by
Figure BDA0003413682580000063
The verification result of the value decrypts a small amount of sensitive data or abandons the request of data transmission, thereby not only improving the security and the processing efficiency of data encryption, but also improving the efficiency of data decryption and the reliability of a system.
In an exemplary embodiment of the present disclosure, the particle factor is composed of M digits, a first digit of the particle factor takes a value of a first identifier or a second identifier, any two adjacent digits from a second digit to an M digit of the particle factor form a group of digits, a first digit of the group of digits represents a serial number of a corresponding digit in the "particle matrix", a second digit of the group of digits is a digit for replacing the digit corresponding to the serial number, and a range from the second digit to the M digit of the particle factor takes a value of the first identifier to N.
In an exemplary embodiment of the disclosure, the first digit is a first identifier and the digits in the particle matrix are sorted in a first order, and the second digit is a second identifier and the digits in the particle matrix are sorted in a second order.
In one exemplary embodiment of the present disclosure, the requestor and the recipient agree on a "particle matrix" for the cryptographic algorithm engine, which is a matrix of 3 x 3 random numbers 0-9.
In an exemplary embodiment of the present disclosure, the "particle factor" is substituted into the "particle matrix" and the corresponding number is replaced in the corresponding direction, and a third-order determinant of the new "particle matrix" after being influenced by the "particle factor" is calculated, and the formula is as follows:
Figure BDA0003413682580000071
in one exemplary embodiment of the present disclosure, the particle matrix is as shown in table 1 below:
TABLE 1
1 6 4
7 3 6
5 8 2
In an exemplary embodiment of the present disclosure, the particle factor is as shown in table 2:
TABLE 2
0 2 7 4 3 5 8
In an exemplary embodiment of the present disclosure, the first bit of the particle factor is a first flag, for example, the first flag is 0, the sorting numbers in the first order are 1, 6, 4, 7, 3, 6, 5, 8 and 2, and the groups of numbers of the particle factor are b27、b74、b42、b35And b58According to b27Replacing the number 6 corresponding to the second sequence number in the particle matrix with 7 according to b74Replacing the number 5 corresponding to the seventh serial number in the particle matrix with 4 according to b42Replace the number 7 corresponding to the fourth sequence number in the particle matrix with 2, according to b35Replacing the number 4 corresponding to the third sequence number in the particle matrix with 5 according to b58The number 3 corresponding to the fifth number in the particle matrix is replaced by 8, and the third-order determinant of the new "particle matrix" after being influenced by the "particle factor" is shown in table 3:
TABLE 3
Figure BDA0003413682580000072
Figure BDA0003413682580000081
In an exemplary embodiment of the disclosure, as shown in fig. 3, assembling the key and the value into a check object, and merging the check object with the encrypted data and sending the merged check object to the receiving party includes:
and step S302, encrypting the data by adopting an MD5 algorithm.
And step S304, merging the data encrypted by the algorithm and sending the data to a receiver.
In an exemplary embodiment of the present disclosure, sensitive data in the data is determined, and the sensitive data can be encrypted only by using the MD5 algorithm, so that the amount of encryption operation for transmitting the data is reduced, and in addition, the security and reliability of the encrypted data are improved by checking the object.
Fig. 4 is a flowchart of a data encryption method in an exemplary embodiment of the present disclosure.
Referring to fig. 4, the step of the transmitting side performing the data encryption method may include:
step S402, receiving the encrypted data and the verification object corresponding to the encrypted data.
And S404, verifying the data according to the verification object.
Step S406, determining to decrypt or abandon the encrypted data according to the verification result.
In an exemplary embodiment of the present disclosure, "matrix particles" after the influence of the "particle factor" are calculated by the cryptographic algorithm engine
Figure BDA0003413682580000082
Value, validation of data prior to transmission of data request, i.e.
Figure BDA0003413682580000083
Comparison of values by
Figure BDA0003413682580000084
The verification result of the value decrypts a small amount of sensitive data or abandons the request of data transmission, thereby not only improving the security and the processing efficiency of data encryption, but also improving the efficiency of data decryption and the reliability of a system.
In an exemplary embodiment of the present disclosure, as shown in fig. 5, verifying the data according to the verification object includes:
step S502, analyzing the key and the value in the verification object.
Step S504, determining a preset particle factor corresponding to the key.
And step S506, solving a particle matrix through the particle factors and the keys.
Step S508, determining whether the solved particle matrix is the same as the particle matrix corresponding to the value.
In an exemplary embodiment of the disclosure, the sender encrypts the requested sensitive data by using an encryption algorithm such as MD5, and takes the "particle factor" as a key, and uses the key as the key
Figure BDA0003413682580000085
The key and the value are assembled into a verification object as a request parameter to be transmitted to the data receiving party together with the data, and based on the request parameter, after the encrypted data is received, whether the data is safe and reliable can be determined according to the verification object.
In an exemplary embodiment of the present disclosure, as shown in fig. 6, determining to decrypt or discard the encrypted data according to the result of the verification includes:
step S602, if it is determined that the solved particle matrix is the same as the particle matrix corresponding to the value, the encrypted data is decrypted.
Step S604, if it is determined that the solved particle matrix is not the same as the particle matrix corresponding to the value, the request for discarding the encrypted data is performed.
In an exemplary embodiment of the present disclosure, the receiving side receives the encrypted data and acquires the "particle factor" as the verification object key, the encrypted number generated by the encryption algorithm engine
Figure BDA0003413682580000091
Corresponding to value of object under test
Figure BDA0003413682580000092
Making a data validity request check according to
Figure BDA0003413682580000093
If the comparison result of (1) determines the next step of encrypting the data, if
Figure BDA0003413682580000094
If the data request is equal to the encrypted data request, the data request is verified to be passed, and the next sensitive data decryption and data processing are continued, otherwise, the encrypted data request processing is abandoned.
In an exemplary embodiment of the present disclosure, as shown in fig. 7, a requestor 702 transmits data in clear to a recipient 704, which processes the clear data directly.
In an exemplary embodiment of the present disclosure, as shown in fig. 7, a requestor 702 transmits data to a recipient 704 in full encryption, and the recipient decrypts and reprocesses the data.
In an exemplary embodiment of the present disclosure, as shown in fig. 8, a requesting party 802 encrypts sensitive data in data and determines a corresponding check object, and transmits the encrypted data and the check object to a receiving party 804, which directly processes plaintext data.
In an exemplary embodiment of the present disclosure, as shown in fig. 8, the receiver 804 verifies the data against the verification object, and if the verification is passed, the sensitive data is analyzed and processed, and if the verification is not passed, the request for transmitting the data is abandoned.
Fig. 9 is a block diagram of a data encryption apparatus in an exemplary embodiment of the present disclosure.
As shown in fig. 9, a data encryption apparatus 900 in an exemplary embodiment of the present disclosure includes: a determining module 902 arranged to determine an N-th order particle matrix for the cryptographic algorithm engine; the determining module 902 is configured to determine a preset particle factor corresponding to the N-th order particle matrix; a calculating module 904 configured to process the N-order particle matrix by the particle factor to obtain a processed N-order determinant; the determining module 902 configured to determine the particle factor as a key of data, and determine the N-th determinant as a value of the data; a communication module 906 configured to assemble the key and the value into a check object, and to merge the check object with the encrypted data and send the merged check object to a receiving party.
In an exemplary embodiment of the present disclosure, the particle factor is composed of M digits, a first digit of the particle factor takes a value of a first identifier or a second identifier, any two adjacent digits from a second digit to an M digit of the particle factor form a group of digits, a first digit of the group of digits represents a serial number of a corresponding digit in the "particle matrix", a second digit of the group of digits is a digit for replacing the digit corresponding to the serial number, and a range from the second digit to the M digit of the particle factor takes a value of the first identifier to N.
In an exemplary embodiment of the disclosure, the first digit is a first identifier and the digits in the particle matrix are sorted in a first order, and the second digit is a second identifier and the digits in the particle matrix are sorted in a second order.
In an exemplary embodiment of the disclosure, the communication module 906 is further configured to: encrypting the data by using an MD5 algorithm; and assembling the key and the value into a check object, and merging the check object and the data encrypted by the MD algorithm and sending the merged data to a receiver.
Fig. 10 is a block diagram of a data decryption apparatus in an exemplary embodiment of the present disclosure.
As shown in fig. 10, a data decryption apparatus 1000 in an exemplary embodiment of the present disclosure includes: a communication module 1002 configured to receive encrypted data and a verification object corresponding to the encrypted data; a verification module 1004 configured to verify the data according to the verification object; a decryption module 1006, configured to determine to decrypt or discard the encrypted data according to the result of the verification.
In an exemplary embodiment of the present disclosure, the verification module 1004 is further configured to: resolving the key and the value in the check object; determining a preset particle factor corresponding to the key; solving a particle matrix through the particle factors and the keys; and judging whether the solved particle matrix is the same as the particle matrix corresponding to the value.
In an exemplary embodiment of the disclosure, the decryption module 1006 is further configured to: if the solved particle matrix is determined to be the same as the particle matrix corresponding to the value, decrypting the encrypted data; and if the solved particle matrix is determined to be different from the particle matrix corresponding to the value, giving up the encrypted data request.
Since the functions of the data encryption device 900 and the data decryption device 1000 have been described in detail in the corresponding method embodiments, the detailed description of the disclosure is omitted here.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 1100 according to this embodiment of the invention is described below with reference to fig. 11. The electronic device 1100 shown in fig. 11 is only an example and should not bring any limitations to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 11, electronic device 1100 is embodied in the form of a general purpose computing device. The components of the electronic device 1100 may include, but are not limited to: the at least one processing unit 1110, the at least one memory unit 1120, and a bus 1130 that couples various system components including the memory unit 1120 and the processing unit 1110.
Wherein the storage unit stores program code that is executable by the processing unit 1110 to cause the processing unit 1110 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 1110 may perform the methods as shown in the embodiments of the present disclosure.
The storage unit 1120 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)11201 and/or a cache memory unit 11202, and may further include a read only memory unit (ROM) 11203.
Storage unit 1120 may also include a program/utility 11204 having a set (at least one) of program modules 11205, such program modules 11205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 1130 may be representative of one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 1100 may also communicate with one or more external devices 1140 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1100, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1100 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 1150. Also, the electronic device 1100 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 1160. As shown, the network adapter 1160 communicates with the other modules of the electronic device 1100 over the bus 1130. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
The program product for implementing the above method according to an embodiment of the present invention may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (11)

1. A method for data encryption, comprising:
determining an N-order particle matrix for the cryptographic algorithm engine;
determining a preset particle factor corresponding to the N-order particle matrix;
processing the N-order particle matrix through the particle factors to obtain a processed N-order determinant;
determining the particle factor as a key of data, determining the N-th determinant as a value of the data;
and assembling the key and the value into a check object, and merging the check object and the encrypted data and sending the merged check object and the encrypted data to a receiver.
2. The data encryption method according to claim 1, wherein the particle factor is composed of M digits, a first digit of the particle factor takes a value of a first identifier or a second identifier, any two adjacent digits from a second digit to an M digit of the particle factor form a group of digits, a first digit of the group of digits represents a serial number of a corresponding digit in the "particle matrix", a second digit of the group of digits is a digit for replacing the digit corresponding to the serial number, and a range from the second digit to the M digit of the particle factor takes a value of the first identifier to N.
3. The data encryption method of claim 2, wherein the first digit is a first identifier and the digits in the particle matrix are ordered in a first order, and wherein the second digit is a second identifier and the digits in the particle matrix are ordered in a second order.
4. A method for data encryption according to any one of claims 1-3, wherein assembling the key and the value into a check object and merging the check object with the encrypted data for transmission to a recipient comprises:
encrypting the data by using an MD5 algorithm;
and assembling the key and the value into a check object, and merging the check object and the data encrypted by the MD algorithm and sending the merged data to a receiver.
5. A method for data encryption, comprising:
receiving encrypted data and a verification object corresponding to the encrypted data;
verifying the data according to the verification object;
and determining to decrypt or abandon the encrypted data according to the verification result.
6. The data encryption method of claim 5, wherein verifying the data based on the verification object comprises:
resolving the key and the value in the check object;
determining a preset particle factor corresponding to the key;
solving a particle matrix through the particle factors and the keys;
and judging whether the solved particle matrix is the same as the particle matrix corresponding to the value.
7. The data encryption method of claim 6, wherein determining to decrypt or discard the encrypted data according to the result of the verification comprises:
if the solved particle matrix is determined to be the same as the particle matrix corresponding to the value, decrypting the encrypted data;
and if the solved particle matrix is determined to be different from the particle matrix corresponding to the value, giving up the encrypted data request.
8. A data encryption apparatus, comprising:
a determination module configured to determine an N-order particle matrix for the cryptographic algorithm engine;
the determining module is configured to determine a preset particle factor corresponding to the N-order particle matrix;
the calculation module is used for processing the N-order particle matrix through the particle factors to obtain a processed N-order determinant;
the determining module is configured to determine the particle factor as a key of data, and determine the N-th determinant as a value of the data;
and the communication module is used for assembling the key and the value into a verification object, merging the verification object and the encrypted data and sending the merged data to a receiver.
9. A data decryption apparatus, comprising:
the communication module is used for receiving the encrypted data and a verification object corresponding to the encrypted data;
the checking module is used for checking the data according to the checking object;
and the decryption module is used for determining to decrypt or abandon the encrypted data according to the verification result.
10. An electronic device, comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the data encryption method of any of claims 1-7 based on instructions stored in the memory.
11. A computer-readable storage medium on which a program is stored, which program, when executed by a processor, implements the data encryption method according to any one of claims 1 to 7.
CN202111561464.6A 2021-12-15 2021-12-15 Data encryption method and apparatus, data decryption method and apparatus, electronic device, and medium Pending CN114239027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111561464.6A CN114239027A (en) 2021-12-15 2021-12-15 Data encryption method and apparatus, data decryption method and apparatus, electronic device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111561464.6A CN114239027A (en) 2021-12-15 2021-12-15 Data encryption method and apparatus, data decryption method and apparatus, electronic device, and medium

Publications (1)

Publication Number Publication Date
CN114239027A true CN114239027A (en) 2022-03-25

Family

ID=80759225

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111561464.6A Pending CN114239027A (en) 2021-12-15 2021-12-15 Data encryption method and apparatus, data decryption method and apparatus, electronic device, and medium

Country Status (1)

Country Link
CN (1) CN114239027A (en)

Similar Documents

Publication Publication Date Title
US11263416B2 (en) Two-dimensional code generation and identification
US10769628B2 (en) Transaction messaging
CN106788995B (en) File encryption method and device
CN110138739B (en) Data information encryption method and device, computer equipment and storage medium
CN1599311A (en) Secure communication with a keyboard or related device
CN110177099B (en) Data exchange method, transmitting terminal and medium based on asymmetric encryption technology
CN111639325B (en) Merchant authentication method, device, equipment and storage medium based on open platform
CN112653556B (en) TOKEN-based micro-service security authentication method, device and storage medium
CN111131278A (en) Data processing method and device, computer storage medium and electronic equipment
CN113610526A (en) Data trust method and device, electronic equipment and storage medium
CN110048994A (en) A kind of communication means and device
CN107294704B (en) Password generation method, password execution method and terminal
CN114615031A (en) File storage method and device, electronic equipment and storage medium
CN110545542A (en) Main control key downloading method and device based on asymmetric encryption algorithm and computer equipment
US9203607B2 (en) Keyless challenge and response system
CN114239027A (en) Data encryption method and apparatus, data decryption method and apparatus, electronic device, and medium
CN113037760B (en) Message sending method and device
CN115333753A (en) Internet protocol address generation method and device, storage medium and electronic equipment
CN110517045B (en) Block chain data processing method, device, equipment and storage medium
CN113904865A (en) Log transmission method and device based on asymmetric algorithm
CN114465976B (en) Method and device for distributing and aggregating messages
CN113343269B (en) Encryption method and device
CN112926076B (en) Data processing method, device and system
CN116866029B (en) Random number encryption data transmission method, device, computer equipment and storage medium
CN105933105A (en) Intelligent terminal APP and server data communication encryption and decryption method

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