CN110190947B - Information encryption and decryption method, terminal and computer readable storage medium - Google Patents
Information encryption and decryption method, terminal and computer readable storage medium Download PDFInfo
- Publication number
- CN110190947B CN110190947B CN201910277508.9A CN201910277508A CN110190947B CN 110190947 B CN110190947 B CN 110190947B CN 201910277508 A CN201910277508 A CN 201910277508A CN 110190947 B CN110190947 B CN 110190947B
- Authority
- CN
- China
- Prior art keywords
- data
- sequence
- information
- ring
- decimal
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/7243—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M2250/00—Details of telephonic subscriber devices
- H04M2250/22—Details of telephonic subscriber devices including a touch pad, a touch sensor or a touch detector
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Human Computer Interaction (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses an information encryption and decryption method, a terminal and a computer readable storage medium, aiming at the problems that the encryption mode is simple, a ciphertext is easy to decode and the information security is not high in a related information encryption scheme. Moreover, because the Joseph ring parameters are variable, even if the data number in the decimal data array obtained by converting the original information is not changed, a different Joseph ring array can be obtained, so that the key matrix is diversified, and the information security is enhanced. The embodiment of the invention also provides a terminal and a computer readable storage medium, which improve the information security, enhance the information security guarantee of users and maintain the user experience.
Description
Technical Field
The present invention relates to the field of information security, and more particularly, to an information encryption and decryption method, a terminal, and a computer-readable storage medium.
Background
With the development of network technology, information security is increasingly valued by users. In order to prevent information from being maliciously attacked and intercepted in the transmission process, so that information leakage is caused, a user can encrypt the information during information transmission, for example, when the user at an information sending end needs to transmit sensitive information, an encryption algorithm is adopted to encrypt the sensitive information, an encrypted ciphertext is transmitted to an information receiving end, the information sending end and the information receiving end can agree with an information encryption mode in advance, and therefore after the information receiving end receives the ciphertext, the ciphertext can be reversely processed according to the agreed encryption algorithm to obtain original sensitive information.
However, the security of the current information encryption algorithm is not high, and the current information encryption algorithm can be decrypted and decoded easily after being maliciously intercepted by other people, so that the information security is seriously threatened, and various losses are brought to a user.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the technical problems are solved by providing a new information encryption and decryption scheme, and providing an information encryption and decryption method, a terminal and a computer readable storage medium.
In order to solve the above technical problem, the present invention provides an information encryption method, including:
acquiring original information to be encrypted, acquiring a decimal data number sequence corresponding to the original information, and determining the number of data in the decimal data number sequence;
setting Joseph ring parameters (N, K, M) according to the number of data, and generating a Joseph ring number sequence containing N decimal data according to the Joseph ring parameters, wherein the value of N is the same as the number of data in the decimal data number sequence;
synthesizing the decimal data array and the Joseph ring array to obtain a synthesized array comprising N decimal data, wherein the nth data in the synthesized array is obtained by synthesizing the nth data in the Joseph ring array and the nth data in the decimal data array;
and carrying out secondary synthesis on the synthesized sequence and the Joseph ring parameters to obtain encrypted information.
Optionally, the obtaining the decimal data sequence corresponding to the original information includes:
the original information is converted to decimal data array according to ASCII table.
Optionally, synthesizing the decimal data sequence and the joseph ring sequence to obtain a synthesized sequence including N decimal data includes:
and carrying out one of four arithmetic operations on the nth data in the Joseph ring array and the nth data in the decimal data array to obtain the nth data in the synthesized array.
Optionally, performing one of four arithmetic operations on the nth data in the joseph ring array and the nth data in the decimal data array to obtain the nth data in the synthesized array includes:
and adding the nth data in the Joseph ring array and the nth data in the decimal data array to obtain the nth data in the synthesized array.
Optionally, after performing a second synthesis on the synthesized sequence and the josephson ring parameter to obtain the encrypted information, the method further includes:
and transmitting the encrypted information to an information receiving end.
Optionally, performing a second synthesis on the synthesized sequence and the josephson ring parameter to obtain the encrypted information includes:
inserting the three data in the josephson loop parameters into the synthesized sequence of numbers results in a quadratic synthesized sequence of numbers containing N +3 decimal data.
In order to solve the above technical problem, the present invention provides an information decryption method, wherein the information decryption method includes:
acquiring encrypted information to be decrypted;
disassembling the encrypted information to obtain Joseph ring parameters (N, K, M) and a synthesized sequence, wherein the synthesized sequence comprises N decimal data;
generating a Joseph ring sequence comprising N decimal data from the Joseph ring parameters;
resolving the synthesized sequence of numbers according to the Joseph ring sequence of numbers to obtain a decimal data sequence containing N decimal data, wherein the nth data in the decimal data sequence is obtained according to the nth data in the Joseph ring sequence of numbers and the nth data in the synthesized sequence of numbers;
the decimal data series is converted into the original information.
Optionally, the disassembling the encrypted information to obtain josephson ring parameters (N, K, M) and a synthesis sequence includes:
extracting first three-digit data in the encrypted information as N, K and M in Joseph ring parameters;
or the like, or, alternatively,
and extracting the last three-digit data in the encrypted information as N, K and M in the Joseph ring parameters.
Further, the invention also provides a terminal, which comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is used for executing the information encryption program stored in the memory to realize the steps of the information encryption method as any one of the above; or the processor is used for executing the information decryption program stored in the memory to realize the steps of the information decryption method.
Further, the present invention also provides a computer-readable storage medium storing at least one of an information encryption program and an information decryption program, the information encryption program being executable by one or more processors to implement the steps of the information encryption method as any one of the above; the information decryption program may be executed by one or more processors to implement the steps of the information decryption method as in any one of the above.
Advantageous effects
The invention provides an information encryption and decryption method, a terminal and a computer readable storage medium, aiming at the problems of simple encryption mode, easy decryption of ciphertext and low information safety degree in a related information encryption scheme. Subsequently, a josephson ring number sequence containing N decimal data is generated from the josephson ring parameters, synthesis processing is performed on the decimal data number sequence and the josephson ring number sequence to obtain a synthesized number sequence including N decimal data, and at the time of the synthesis processing, the nth data in the synthesized number sequence is obtained by the nth data synthesis processing in the josephson ring number sequence and the nth data in the decimal data number sequence. And after the synthesis sequence is obtained, carrying out secondary synthesis on the synthesis sequence and the Joseph ring parameters to obtain encrypted information. In addition, the embodiment of the invention also provides an information decryption method, which carries out reverse processing on the encrypted ciphertext obtained in the information decryption process according to the process of the information encryption method, and restores the encrypted ciphertext to obtain the original information before encryption. In the information encryption and decryption scheme provided by the embodiment of the invention, because the Joseph ring is applied to generate the Joseph ring number sequence, each data in the decimal data number sequence obtained by converting the original information is processed differently, thereby enhancing the decryption difficulty after the ciphertext is intercepted. Moreover, because the Joseph ring parameters are variable, even if the data number in the decimal data number sequence obtained by converting the original information is not changed, different Joseph ring number sequences can be obtained, so that the key matrix has diversification, and the information security is enhanced. The embodiment of the invention also provides a terminal and a computer readable storage medium, which improve the information security, enhance the information security guarantee of the user and maintain the user experience.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
fig. 1 is a schematic diagram of a hardware structure of an optional mobile terminal for implementing various embodiments of the present invention.
FIG. 2 is a diagram of a wireless communication system for the mobile terminal shown in FIG. 1;
fig. 3 is a flowchart of an information encryption method provided in a first embodiment of the present invention;
FIG. 4 is a schematic diagram of a clock ring shown in a first embodiment of the present invention;
FIG. 5 is a flowchart of an information decryption method according to a second embodiment of the present invention;
fig. 6 is a schematic diagram of bidirectional communication between a first terminal and a second terminal according to a second embodiment of the present invention;
fig. 7 is a schematic view of a handset shown in a third embodiment of the invention;
fig. 8 is an interaction flowchart of encrypted communication between a mobile phone and a tablet computer according to a third embodiment of the present invention;
fig. 9 is a schematic diagram of a hardware structure of a terminal according to a fourth embodiment of the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division multiplexing-Long Term Evolution), and TDD-LTE (Time Division multiplexing-Long Term Evolution), etc.
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, the description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, can collect touch operations of a user (e.g., operations of a user on the touch panel 1071 or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory) thereon or nearby and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. The eNodeB2021 may be connected with other eNodeB2022 via backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
First embodiment
If m pieces of data are included in original information to be subjected to security protection, according to an information encryption scheme provided in the related art, when the original information is encrypted, processing on each of the m pieces of data is the same, for example, for a character string "I low YOU", a typical encryption manner in the related art is to add k to each value of the character string, for example, in one scheme, a value of k is 1, a ciphertext obtained after encryption is "J MPWF ZPV", it is easy to see that comparing the original information and the ciphertext, since processing on each piece of data is the same, the same data in the original information is also the same in the ciphertext. For this encryption scheme, the mapping relationship is simple, once the ciphertext is intercepted, the risk of being decrypted is very high, which seriously threatens the information security of the user, and in order to solve this problem, this embodiment provides an information encryption scheme, please refer to the flowchart shown in fig. 3:
s302: the encryption terminal obtains original information to be encrypted, obtains a decimal data number sequence corresponding to the original information, and determines the data number in the decimal data number sequence.
In this embodiment, the encryption terminal may be any one of a mobile phone, a desktop computer, a notebook computer, a tablet computer, and the like. The information to be encrypted may be any one of integer, long integer, character, string, etc. After the encryption terminal acquires the original information, the encryption terminal may acquire the decimal data number sequence corresponding to the original information, for example, in an example of the present embodiment, the encryption terminal may convert the original information into the decimal data number sequence in accordance with an ASCII table. Here, the description will be given with the original information as a character string "ILOVE YOU":
after the encryption terminal acquires the original information to be encrypted, namely the character string "I LOVE YOU", the encryption terminal can query the ASCII table to convert each character (including a blank space) in the character string into corresponding decimal data, and form a sequence of the data according to the corresponding position of the data in the character string, wherein the sequence of the data is a decimal data sequence. The conversion result for the string "I level YOU" is {73,32,76,79,86,69,32,89,79,85 }.
It can be understood that when converting the character string in the original information according to the ASCII table, the original character string contains spaces for how many characters there are, and there are many decimal data after the conversion. And the arrangement position of each decimal data corresponds to the arrangement position of each character in the character string.
After the encryption terminal determines the sequence of decimal data, the encryption terminal may determine how many decimal data are in total in the sequence of decimal data, the number of decimal data being related to the setting of subsequent joseph ring parameters.
S304: and the encryption terminal sets Josephson ring parameters (N, K, M) according to the determined data number, and generates a Josephson ring number sequence containing N decimal data according to the Josephson ring parameters.
After the number of data in the decimal data sequence is determined, the joseph ring parameter (N, K, M) may be set according to the number of data, where the value of N is equal to the number of data in the decimal data sequence, for example, for the decimal data sequence obtained by converting the character string "I low YOU", the number of data is 10, and the value of N in the joseph ring parameter is 10.
The joseph ring is briefly described below:
the josephson ring (i.e., the josephson problem) is a mathematical application problem: n persons (numbered 1, 2, 3.. N, respectively) are known to sit around a round table. Counting from 1 to M from the person with the number K; the next person counts again from 1 and the person counting to M continues to be listed … … in this order until all people around the round table are listed.
With further reference to fig. 4, fig. 4 shows a clock ring, in which 12 (i.e., parameter N) digits from 1 to 12 are arranged in a ring, and assuming that the number of the digits "4" (i.e., parameter M) is listed from the number 1 (i.e., parameter K), the digit "4" will be reported to "4" in the first round of the number of the digits, so that the listed digit "4" forms the first bit of data in the joseph ring. In the second round of counts, the digit "8" will report to "4", thereby forming a dequeue, and the dequeue digit "8" will constitute the second bit of data … … in the Joseph ring sequence, which will cycle through until all data are dequeued, resulting in a Joseph ring sequence as follows:
{4,8,12,5,10,3,11,7,6,9,1,2};
therefore, by setting the parameter N of the joseph ring according to the number of data in the decimal data sequence, it is possible to ensure that the number of data in the generated joseph ring sequence is the same as the number of data in the decimal data sequence. In this way, when the josephson ring sequence and the decimal data sequence are subjected to the synthesis processing, for each data in the decimal data sequence, there is one data corresponding to the direction of the josephson ring sequence at the corresponding position.
It should be understood that if any one of the three joseph ring parameters (N, K, M) changes, the resulting joseph ring sequence will be different. In this embodiment, the value of the parameter N in the josephson ring parameter is determined, but the values of the other two parameters can be determined by the encryption terminal itself.
In the decimal data sequence {73,32,76,79,86,69,32,89,79,85}, the encryption terminal in the embodiment sets the joseph ring parameters to be (10,0,3), and the joseph ring sequence generated by the encryption terminal is {3,6,9,2,7,1,8,5,10,4 }.
S306: and the encryption terminal synthesizes the decimal data sequence and the Joseph ring sequence to obtain a synthesized sequence comprising N decimal data.
After the encryption terminal generates the josephson ring number sequence from the josephson ring parameter, the synthesis process may be performed on the josephson ring number sequence and the decimal data number sequence. It should be understood that, as for the 1 st data in the decimal data sequence corresponding to the 1 st data in the joseph ring sequence, the 2 nd data in the decimal data sequence corresponding to the 2 nd data in the joseph ring sequence, the 3 rd data in the decimal data sequence, which is successively analogized to … … corresponding to the 3 rd data in the joseph ring sequence, the nth data in the decimal data sequence corresponding to the nth data in the joseph ring sequence, when the synthesis processing is performed on the joseph ring sequence and the decimal data sequence, the nth data in the synthesized data sequence can be obtained by synthesizing the nth data in the joseph ring sequence together with the nth data in the decimal data sequence.
In some examples of this embodiment, the encryption terminal may directly combine the nth data in the joseph ring sequence with the nth data in the decimal data sequence to form a new decimal data, for example, when the decimal data sequence {73,32,76,79,86,69,32,89,79,85} and the joseph ring sequence {3,6,9,2,7,1,8,5,10,4} are combined, the encryption terminal may combine "73" and "3" (i.e., 03) to form "7303", so that "7303" becomes the first data in the combined sequence. The "32" and "6" (i.e. 06) are combined into "3206", and "3206" is the first data … … in the synthesized sequence, and by deducing the class, the synthesized sequence {7303,32067609,7902,8607,6901,3208,8905,7910,8504} composed of ten data can be obtained.
In other examples of this embodiment, the encryption terminal may perform an operation on the nth data in the joseph ring sequence and the nth data in the decimal data sequence to obtain the nth data in the synthesized sequence, where the operation includes some relatively complex formula operations or may be a simple four-way operation, for example, in an example of this embodiment, the encryption terminal performs a synthesis process on the joseph ring sequence and the decimal data sequence by using an addition operation: the encryption terminal adds "73" and "3" to obtain data "76", takes "76" as the first data in the combined sequence, "32" and "6" to obtain data "38", takes "38" as the second data … … in the combined sequence, "85" and "4" to obtain data "89", and "89" is the last data in the combined sequence. Therefore, by this way of combining processing, the encryption terminal will get the combined series {76,38,85,81,93,70,40,94,89,89 }.
It should be understood that in other examples of the embodiment, the encryption terminal may also perform operations such as subtraction, multiplication or division on the nth data in the joseph ring sequence and the nth data in the decimal data sequence, or perform more complex operations, for example, in an example of the embodiment, the encryption terminal performs the operation by a n *5-b n 3+2 to synthesize the nth data in the Joseph ring sequence and the nth data in the decimal data sequence, wherein a n Is the nth data in the Joseph Ring array, and b n Is the nth data in the decimal data array.
S308: and the encryption terminal carries out secondary synthesis on the synthesized sequence and the Joseph ring parameter to obtain encryption information.
After the encryption terminal synthesizes the joseph ring number sequence and the decimal data number sequence and obtains a synthesized number sequence, the encryption terminal can carry out secondary synthesis on the synthesized number sequence and the joseph parameter so as to obtain final encryption information. In this embodiment, the encryption terminal performs secondary synthesis on the synthesized sequence and the joseph parameter, mainly carries the joseph parameter in the encryption information, so that the decryption terminal can obtain the decryption key, that is, the joseph parameter, from the encryption information after obtaining the encryption information.
In some examples of this embodiment, the encryption terminal may insert joseph parameters into the data of the synthesized sequence to form a sequence including N +3 data, for example, in one example of this embodiment, the encryption terminal may insert three of the joseph parameters into the forefront of the synthesized sequence, for example, in such a way that the synthesized sequence {76,38,85,81,93,70,40,94,89,89} and the joseph ring parameters (10,0,3) will be twice synthesized to obtain a new sequence {10,0,3,76,38,85,81,93,70,40,94,89,89 }. In another example of this embodiment, the cryptographic terminal may insert three of the josephson parameters into the last of the synthesized sequence of numbers, for example, in this way, the synthesized sequence of numbers {76,38,85,81,93,70,40,94,89,89} and the josephson ring parameters (10,0,3) will be twice synthesized to obtain a new sequence of numbers {76,38,85,81,93,70,40,94,89,89,10,0,3 }.
Of course, in some examples of this embodiment, the encryption terminal may also insert three parameters of the josephson ring parameters into the composite sequence separately, for example, insert N into the first data and the second data of the composite sequence as the second data of the encryption information, insert K into the 4 th data of the composite sequence as the 6 th data of the encryption information, and insert M into the last data of the composite sequence as the last data of the encryption information, for example, by the twice-synthesis, the encryption terminal may obtain the encryption information {76,10,38,85,81,0,93,70,40,94,89,89,3 }.
After the encryption of the original information is completed and the encrypted information is obtained, if the encryption terminal needs to transmit the encrypted information to other objects, the encryption terminal can transmit the encrypted information to a corresponding receiving terminal.
In the information encryption method provided by this embodiment, the joseph ring number arrays with the same number of data are generated according to the number of data in the decimal data number array corresponding to the original information, so that the joseph ring number arrays are used as an encryption matrix for encrypting the decimal data number array corresponding to the original information, the processing modes of each data in the decimal data number array are different, and the difficulty in decoding the encrypted information is improved. In addition, the josephson ring parameters can be carried in the encrypted information and transmitted to the information receiving end, so that the decryption terminal of the information receiving end directly obtains the josephson ring parameters under the condition of knowing the decryption rule, and generates a josephson ring number sequence, thereby realizing decryption of the encrypted information and obtaining the original information. The Joseph ring parameters can be set by an encryption terminal of an information sending end, different Joseph ring parameters can be set in different information transmission processes, the problem that information safety is reduced due to the fact that fixed Joseph ring parameters are used for a long time is solved, and information safety is improved.
Second embodiment
The present embodiment provides an information decryption method corresponding to the information encryption method in the first embodiment, please refer to the flowchart of the information decryption method shown in fig. 5:
s502: and the decryption terminal acquires the encrypted information to be decrypted.
It should be understood that the decryption terminal may receive the encrypted information through the network, for example, the mobile phone of user a and the mobile phone of user B perform encrypted communication, and after the mobile phone of user a encrypts the original information to generate the encrypted information, the encrypted information is transmitted to the mobile phone of user B through the network, in which case the mobile phone of user B obtains the encrypted information from the network. Of course, those skilled in the art will understand that the way of the decryption terminal to obtain the encrypted information also includes many others, for example, copying the encrypted information from other terminals through a usb disk, etc.
In addition, it should be noted that, in this embodiment, the encryption terminal that encrypts the original information and the terminal that decrypts the encrypted information may be the same, for example, after one terminal decrypts the original information to obtain the encrypted information, one terminal may send one copy to the other terminal, and at the same time, one copy of the encrypted information may be retained for subsequent viewing. When the terminal views the encrypted information, it needs to operate as a decryption terminal. In addition, in more scenarios, during the encrypted communication between two terminals, any one of the two terminals needs to be operated as both an encryption terminal and a decryption terminal. For example, in fig. 6, the first terminal 601 performs bidirectional encrypted communication with the second terminal 602, and after the first terminal 601 transmits the first encrypted information to the second terminal 602, the second terminal 602 is likely to need to transmit the second encrypted information to the first terminal. Then, during the communication of the first encrypted information, the first terminal 601 operates as an encryption terminal and the second terminal 602 operates as a decryption terminal, but during the communication of the second encrypted information, the first terminal 601 operates as a decryption terminal and the second terminal 602 operates as an encryption terminal.
It is assumed in this embodiment that the encrypted information acquired by the decryption terminal is {76,38,85,81,93,70,40,94,89,89,10,0,3 }.
S504: and the decryption terminal disassembles the encrypted information to obtain Joseph ring parameters (N, K, M) and a synthesis sequence.
After the decryption terminal acquires the encrypted information, the encrypted information can be disassembled, so that josephson ring parameters (N, K, M) and a synthesis sequence are obtained. As can be seen from the description of the first embodiment, the josephson ring parameter may be inserted into the synthesized sequence to form encrypted information, and therefore, after the decryption terminal knows the insertion rule of the josephson ring parameter, the encrypted information can be split, so as to obtain the synthesized sequence and the josephson ring parameter.
For example, assuming that the encryption terminal inserts three parameters of joseph parameters into the last of the combined sequence of numbers in the encryption rule agreed by the encryption terminal and the decryption terminal, the decryption terminal may extract three data from the last of the encrypted information as joseph ring parameters, respectively. For example, for the encrypted information {76,38,85,81,93,70,40,94,89,89,10,0,3}, the josephson ring parameter disassembled by the decryption terminal is (10,0,3), and the composite number is {76,38,85,81,93,70,40,94,89,89 }.
It is needless to say that in the encryption rule agreed by the encryption terminal and the decryption terminal, the way of disassembling the encrypted information may be other ways, for example, if the encryption terminal inserts three parameters of joseph parameters into the head of the synthesized sequence, the decryption terminal may extract the first three data of the encrypted information as joseph ring parameters. For other ways, they are not described in detail here.
It is understood that, after the decryption terminal disassembles the joseph ring parameters and the synthesized sequence, the decryption terminal may perform preliminary verification on the encrypted information in combination with N in the joseph ring parameters to determine whether the encrypted information is possibly tampered: the decryption terminal can determine whether the number of the data in the synthesized sequence is equal to N, because the number of the data in the synthesized sequence is equal to N under normal conditions, once the decryption terminal finds that the value of N is not equal to the number of the data in the synthesized sequence, the decryption terminal can determine that the encrypted information acquired by the decryption terminal has been tampered, and the encrypted information is not encrypted by the encryption terminal. However, if N in the josephson ring parameter is the same as the number of data in the synthesized sequence, the decryption terminal cannot be sure that the encrypted information is not tampered, and after all, the security of the encrypted information can be preliminarily verified by the verification method.
S506: the decryption terminal generates a Joseph ring number sequence containing N decimal data according to the Joseph ring parameters.
After the decryption terminal determines the joseph ring parameters (N, K, M), a joseph ring sequence consisting of N data may be generated from the joseph ring parameters (N, K, M), e.g., for the joseph ring parameters (10,0,3), the decryption terminal may generate the joseph ring sequence {3,6,9,2,7,1,8,5,10,4 }.
S508: and the decryption terminal disassembles the synthesized number sequence according to the Joseph ring number sequence to obtain a decimal data number sequence containing N decimal data.
After the decryption terminal acquires the Joseph ring number sequence, the synthesized number sequence can be analyzed according to the Joseph ring number sequence, so that a decimal data number sequence is obtained. The nth data in the synthesized sequence is synthesized by the nth data in the decimal data sequence and the nth data in the joseph ring sequence, where the synthesizing process may be some more complex formula operation processes or may be a simple four-way operation process, for example, in some examples of the present embodiment, the nth data in the synthesized sequence is obtained by adding the nth data in the decimal data sequence and the nth data in the joseph ring sequence, and then in order to restore the decimal data sequence according to the synthesized sequence and the joseph ring sequence, the decryption terminal may perform an inverse operation of the synthesizing process according to the nth data in the synthesized sequence and the nth data in the joseph ring sequence, so as to obtain the nth data in the decimal data sequence. For example, in the case where the synthesis process is an addition process, the decryption terminal subtracts the nth data in the josephson ring number sequence from the nth data in the synthesis number sequence, and takes the calculated difference value as the nth data in the decimal data number sequence.
Taking the joseph ring number as {3,6,9,2,7,1,8,5,10,4} and the synthesis number as {76,38,85,81,93,70,40,94,89,89}, the decimal data obtained by the decryption terminal is {73,32,76,79,86,69,32,89,79,85 }.
S510: the decryption terminal converts the decimal data sequence into the original information.
In some examples of the embodiment, after obtaining the decimal data sequence, the decryption terminal may convert the decimal data sequence into the original information, for example, the decryption terminal may perform conversion on the decimal data sequence according to an ASCII table, and for the decimal data sequence {73,32,76,79,86,69,32,89,79,85}, the decryption terminal queries the ASCII table to obtain the original information, i.e., the character string "I LOVE YOU".
The information decryption method provided in this embodiment is used in cooperation with the information encryption method provided in the first embodiment, and the josephson ring number array is used as an encryption matrix for encrypting the decimal data number array corresponding to the original information, so that the processing modes of each piece of data in the decimal data number array are different, and the difficulty in deciphering the encrypted information is improved.
And moreover, the Joseph ring parameters can be adjusted at any time, so that the problem of information safety reduction caused by long-term use of fixed Joseph ring parameters is solved, and the information safety is improved.
Third embodiment
In order to make the advantages and details of the information encryption method and the information decryption method provided by the present invention more clear to those skilled in the art, the process background management method will be further described in this embodiment with reference to examples: first, assuming that the terminal in this embodiment is a mobile phone, as shown in fig. 7, the mobile phone 700 communicates with another tablet computer, and assuming that the mobile phone 700 needs to transmit a file to the tablet computer, the information contained in the file is sensitive and needs to be highly secured, therefore, the mobile phone 700 and the tablet computer perform encrypted transmission on the file to be transmitted based on the information encryption and decryption scheme provided in the foregoing embodiment. Please refer to the interaction flow chart between the mobile phone 700 and the tablet pc provided in fig. 8:
s802: and the mobile phone converts the acquired original information into an ASCII value to obtain a decimal data array.
Assuming that the file to be protected by encryption includes the content "Public key", the mobile phone may obtain the decimal data number corresponding to the part of content as {80,117,98,108,105,99,32,107,101,121} by looking up the ASCII table.
S804: the handset determines the number of data contained in the decimal data sequence.
After the decimal data sequence is obtained, the mobile phone can determine that the number of data in the decimal data sequence {80,117,98,108,105,99,32,107,101,121} is 10.
S806: the mobile phone determines the Joseph ring parameters according to the number of data in the decimal data array.
Because the number of data in the decimal data array is 10, the mobile phone can determine that the value of N in the joseph ring parameter is 10, and for the other two parameters, the mobile phone sets them to 1 and 3, that is, the value of K is 1, and the value of M is 3, so that the formed joseph ring parameter is (10,1, 3).
S808: the handset generates a josephson ring sequence.
Based on the joseph ring parameters (10,1,3), the handset can generate joseph ring sequence, {4,7,10,3,8,2,9,6,1,5 }.
S810: the mobile phone synthesizes the Joseph ring number sequence and the decimal data number sequence based on addition operation to obtain a synthesized number sequence.
After obtaining the joseph ring number sequence, the mobile phone may synthesize the joseph ring number sequence and the decimal data number sequence obtained by converting the original information, and in this embodiment, the mobile phone adds the nth data in the joseph ring number sequence and the nth data in the decimal data number sequence to obtain the nth data in the synthesized number sequence. Thus, the handset can obtain the composite series {84,124,108,111,113,101,41,113,102,126 }.
S812: the mobile phone inserts the josephson ring parameters into the synthesized sequence of numbers to obtain the encrypted information.
After obtaining the synthesis sequence, the mobile phone needs to send the josephson ring parameters and the synthesis sequence to the information receiving end, i.e., the tablet computer, so as to enable the tablet computer to determine how the josephson ring sequence is generated. In other examples of this embodiment, the mobile phone may also give joseph ring parameters to the tablet computer through a separate channel, however, in this embodiment, the mobile phone may directly perform secondary synthesis on the joseph ring parameters and the synthesized sequence of numbers, so as to directly send the joseph ring parameters and the synthesized sequence of numbers to the tablet computer together, because in the case that other malicious attackers do not know about extracting the joseph ring parameters from the encrypted information, carrying the joseph ring parameters on the encrypted information can make them unclear which information in the encrypted information is encrypted information, which information is information for encryption, thereby confusing the other party and enhancing information security.
In an example of this embodiment, the handset may insert three of the joseph parameters directly into the last of the synthesized sequence of numbers, e.g., for the synthesized sequence of numbers {84,124,108,111,113,101,41,113,102,126} and the joseph ring parameters (10,1,3), a new sequence of numbers {84,124,108,111,113,101,41,113,102,126,10,1,3} will be synthesized twice.
S814: the mobile phone sends the encrypted information to the tablet computer.
After the encrypted information is obtained, the mobile phone completes the encryption of the original information, and the encrypted information obtained through encryption can be transmitted to the tablet computer. Because the original information in the encrypted information is encrypted layer by layer, the original information is difficult to decipher even if being intercepted by a malicious attacker.
S816: and finally extracting three Joseph ring parameters and a synthesized sequence from the encrypted information by the tablet computer.
The tablet computer obtains encryption information {84,124,108,111,113,101,41,113,102,126,10,1,3}, extracts Joseph ring parameters (10,1,3) from the end of the encryption information according to an encryption communication rule agreed with the mobile phone, and obtains a composite number sequence {84,124,108,111,113,101,41,113,102,126 }.
S818: the tablet generates a josephson ring sequence from the josephson ring parameters.
Based on josephson ring parameters (10,1,3), the tablet can generate a josephson ring sequence, {4,7,10,3,8,2,9,6,1,5 }.
S820: and the tablet personal computer analyzes the synthesized number sequence according to the Joseph ring number sequence to obtain a decimal data number sequence.
After the tablet personal computer obtains the Joseph ring sequence, the synthesized sequence can be analyzed according to the Joseph ring sequence, so that the decimal data sequence is obtained. For example, in the present embodiment, the tablet computer determines that the composition operation used in encryption is an addition operation according to the encryption communication rule agreed with the mobile phone, so the tablet computer needs to perform a subtraction operation when analyzing the composition data. And the tablet personal computer subtracts the nth data in the Joseph ring number array from the nth data in the synthesized number array, and uses the calculated difference value as the nth data in the decimal data number array.
When the Joseph ring number is {4,7,10,3,8,2,9,6,1,5}, the synthesized number is {84,124,108,111,113,101,41,113,102,126}, the decimal data obtained by the tablet computer is {80,117,98,108,105,99,32,107,101,121 }.
S822: and the tablet computer determines original information corresponding to the decimal data array according to the ASCII table.
Subsequently, the tablet computer determines the meaning represented by the decimal data sequence {80,117,98,108,105,99,32,107,101,121} from the ASCII table query, and determines the original information as the character string "Public key".
In the information encryption and decryption scheme provided by this embodiment, the joseph ring number array is used as the encryption matrix for encrypting the decimal data number array corresponding to the original information, so that the decryption difficulty of the encrypted information is improved, and the problem of reducing the information security due to the repeated use of the same joseph ring encryption communication is avoided based on the variability of the joseph ring parameters.
Fourth embodiment
The present embodiment will be described with respect to the terminal in the foregoing embodiment, but before describing the structure of the terminal, a computer-readable storage medium is provided:
the computer-readable storage medium stores one or more computer programs that can be read, compiled, or executed by the memory, wherein the computer programs include at least one of an information encryption program and an information decryption program, the information encryption program being executable by the processor to implement the information encryption method provided in the first or third embodiment, and the information decryption program being executable by the processor to implement the information decryption method provided in the second or third embodiment.
It should be understood that, in some examples of the embodiment, the computer-readable storage medium stores therein both the information encryption program and the information decryption program, because in most cases, the information encryption side also needs to be used as the information decryption side, and the information decryption side also has the possibility of being used as the information encryption side.
Meanwhile, the present embodiment further provides a terminal, please refer to fig. 9: the terminal 90 includes a processor 91, a memory 92, and a communication bus 93 for connecting the processor 91 and the memory 92, wherein the memory 92 may be the computer readable storage medium storing the information encryption program and/or the information decryption program. The processor 91 may read the information encryption program stored in the memory 92, compile and execute the information encryption method provided in the foregoing first or third embodiment:
the processor 91 acquires original information to be encrypted, acquires a decimal data number sequence corresponding to the original information, and determines a data number in the decimal data number sequence; subsequently, the processor 91 sets josephson ring parameters (N, K, M) according to the number of data, and generates a josephson ring number sequence containing N decimal data according to the josephson ring parameters, where the value of N is the same as the number of data in the decimal data number sequence; then, the processor 91 synthesizes the decimal data sequence and the joseph ring sequence to obtain a synthesized sequence comprising N decimal data, wherein the nth data in the synthesized sequence is obtained by synthesizing the nth data in the joseph ring sequence and the nth data in the decimal data sequence; finally, the processor 91 performs a second synthesis of the synthesized sequence and the joseph ring parameters to obtain encrypted information.
In one example of the present embodiment, the processor 91 converts the original information into a decimal data array according to an ASCII table.
In an example of the present embodiment, the processor 91 performs one of four arithmetic operations on the nth data in the josephson ring sequence and the nth data in the decimal data sequence to obtain the nth data in the synthesized sequence.
It will be appreciated that the processor 91 may insert the three data in the josephson ring parameters into the synthesized sequence of numbers to obtain a twice synthesized sequence of numbers containing N +3 decimal data.
In other cases, the processor 91 may read the information decryption program stored in the memory 92, compile and execute the information decryption method provided in the foregoing second or third embodiment:
the processor 91 acquires encrypted information to be decrypted, and then disassembles the encrypted information to obtain josephson ring parameters (N, K, M) and a synthesized number sequence, wherein the synthesized number sequence comprises N decimal data; subsequently, the processor 91 generates a josephson ring number sequence containing N decimal data according to the josephson ring parameters, and disassembles the synthesized number sequence according to the josephson ring number sequence to obtain a decimal data number sequence containing N decimal data, wherein the nth data in the decimal data number sequence is obtained according to the nth data in the josephson ring number sequence and the nth data in the synthesized number sequence; finally, the processor 91 converts the decimal data sequence into the original information.
Optionally, the processor 91 extracts the first three bits of data in the encrypted information as N, K, M in the joseph ring parameters;
alternatively, the processor 91 may further extract the last three bits of data in the encrypted information as N, K, and M in the joseph ring parameter, respectively.
The terminal and the computer readable storage medium provided by the embodiment of the invention apply the Joseph ring to generate the Joseph ring number sequence, so that each data in the decimal data number sequence obtained by converting the original information is processed differently, thereby enhancing the decoding difficulty after the ciphertext is intercepted. Moreover, because the Joseph ring parameters are variable, even if the data number in the decimal data number sequence obtained by converting the original information is not changed, different Joseph ring number sequences can be obtained, so that the key matrix has diversification, and the information security is enhanced.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element identified by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (8)
1. An information encryption method, characterized in that the information encryption method comprises:
acquiring original information to be encrypted;
converting the original information into a decimal data number sequence, and determining the number of data in the decimal data number sequence;
setting Josephson ring parameters (N, K, M) according to the data number, and generating a Josephson ring number sequence containing N decimal data according to the Josephson ring parameters, wherein N is the data number in the decimal data number sequence, K is the number of the data, and M is a number step;
synthesizing the decimal data array and the Joseph ring array to obtain a synthesized array comprising N decimal data, wherein the nth data in the synthesized array is obtained by synthesizing the nth data in the Joseph ring array and the nth data in the decimal data array;
performing secondary synthesis on the synthesis sequence and the Joseph ring parameter to obtain encrypted information, wherein the encrypted information comprises:
inserting three data in the Joseph ring parameters into the synthesized sequence of numbers to obtain a quadratic synthesized sequence of numbers comprising N +3 decimal data; or, performing one of four arithmetic operations on three data in the Joseph ring parameters and three data selected from the synthetic sequence, and sequentially replacing the three selected data in the synthetic sequence with the three calculated data to obtain a secondary synthetic sequence.
2. The information encryption method of claim 1, wherein said converting the original information into a decimal data series comprises:
and converting the original information into a decimal data array according to an ASCII table.
3. The information encryption method of claim 1, wherein said synthesizing the sequence of decimal data and the sequence of josephson ring numbers to obtain a synthesized sequence of N decimal data comprises:
and performing one of four arithmetic operations on the nth data in the Joseph ring array and the nth data in the decimal data array to obtain the nth data in the synthesized array.
4. The information encryption method of claim 3, wherein said performing one of four arithmetic operations on the nth data in the Joseph ring sequence and the nth data in the decimal data sequence to obtain the nth data in the resultant sequence comprises:
and adding the nth data in the Joseph ring array and the nth data in the decimal data array to obtain the nth data in the synthesized array.
5. The information encryption method according to claim 1, wherein after obtaining encryption information by secondarily synthesizing the synthesis sequence with the josephson ring parameter, further comprising:
and transmitting the encrypted information to an information receiving end.
6. An information decryption method, characterized by comprising:
acquiring encrypted information to be decrypted, the encrypted information being obtained by encrypting according to the information encryption method of any one of claims 1 to 5;
disassembling the encrypted information to obtain Joseph ring parameters (N, K, M) and a synthesis sequence, comprising: extracting first three-bit data in the encrypted information as N, K and M in the Joseph ring parameters respectively; or, extracting the last three-digit data in the encrypted information as N, K and M in the Joseph ring parameters; the synthesized sequence comprises N decimal data;
generating a Josephson ring number sequence comprising N decimal data from the Josephson ring parameters;
disassembling the synthesized sequence of numbers according to the Joseph ring sequence to obtain a decimal data sequence containing N decimal data, wherein the nth data in the decimal data sequence is obtained according to the nth data in the Joseph ring sequence and the nth data in the synthesized sequence;
and converting the decimal data array into original information.
7. A communication terminal, characterized in that the communication terminal comprises a processor, a memory and a communication bus;
the communication bus is used for realizing connection communication between the processor and the memory;
the processor is configured to execute an information encryption program stored in the memory to implement the steps of the information encryption method according to any one of claims 1 to 5; or the processor is used for executing the information decryption program stored in the memory to realize the steps of the information decryption method according to claim 6.
8. A computer-readable storage medium storing at least one of an information encryption program and an information decryption program, the information encryption program being executable by one or more processors to implement the steps of the information encryption method according to any one of claims 1 to 5; the information decryption program being executable by one or more processors to implement the steps of the information decryption method of claim 6.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910277508.9A CN110190947B (en) | 2019-04-08 | 2019-04-08 | Information encryption and decryption method, terminal and computer readable storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910277508.9A CN110190947B (en) | 2019-04-08 | 2019-04-08 | Information encryption and decryption method, terminal and computer readable storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110190947A CN110190947A (en) | 2019-08-30 |
| CN110190947B true CN110190947B (en) | 2022-09-13 |
Family
ID=67713787
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910277508.9A Active CN110190947B (en) | 2019-04-08 | 2019-04-08 | Information encryption and decryption method, terminal and computer readable storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110190947B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113014439B (en) * | 2021-04-19 | 2021-10-26 | 广州大一互联网络科技有限公司 | Virtual elastic management method for data center bandwidth |
| CN116634196A (en) * | 2023-05-29 | 2023-08-22 | 中电科长江数据有限公司 | Audio and video conference method and system with data encryption and decryption functions |
| CN117153355A (en) * | 2023-09-01 | 2023-12-01 | 广州圣勇信息科技有限公司 | Basic health management method and system applied to medical community |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101894244A (en) * | 2009-05-20 | 2010-11-24 | 鸿富锦精密工业(深圳)有限公司 | Electronic data encryption system and method |
| CN106844411A (en) * | 2016-10-19 | 2017-06-13 | 中科聚信信息技术(北京)有限公司 | A kind of big data random access system and method based on reducing subspaces |
| CN107273766A (en) * | 2017-05-15 | 2017-10-20 | 努比亚技术有限公司 | A kind of method and apparatus of data encryption and decryption |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108196762A (en) * | 2017-11-30 | 2018-06-22 | 努比亚技术有限公司 | A kind of terminal control method, terminal and computer readable storage medium |
| CN108616878B (en) * | 2018-03-28 | 2021-03-26 | 努比亚技术有限公司 | Encryption and decryption method, equipment and computer storage medium |
-
2019
- 2019-04-08 CN CN201910277508.9A patent/CN110190947B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101894244A (en) * | 2009-05-20 | 2010-11-24 | 鸿富锦精密工业(深圳)有限公司 | Electronic data encryption system and method |
| CN106844411A (en) * | 2016-10-19 | 2017-06-13 | 中科聚信信息技术(北京)有限公司 | A kind of big data random access system and method based on reducing subspaces |
| CN107273766A (en) * | 2017-05-15 | 2017-10-20 | 努比亚技术有限公司 | A kind of method and apparatus of data encryption and decryption |
Non-Patent Citations (1)
| Title |
|---|
| 约瑟夫环在加密算法中应用;王洋 等;《电子制作》;20151231;正文第41页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110190947A (en) | 2019-08-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110069229B (en) | Screen sharing method, mobile terminal and computer readable storage medium | |
| CN113395159A (en) | Data processing method based on trusted execution environment and related device | |
| CN110190947B (en) | Information encryption and decryption method, terminal and computer readable storage medium | |
| CN108616878B (en) | Encryption and decryption method, equipment and computer storage medium | |
| CN107147803A (en) | A kind of way of recording, terminal device and computer-readable recording medium | |
| CN110188524A (en) | Information ciphering method, information decryption method and terminal | |
| CN116541865A (en) | Password input method, device, equipment and storage medium based on data security | |
| CN109446794B (en) | Password input method and mobile terminal thereof | |
| CN108012270B (en) | Information processing method, equipment and computer readable storage medium | |
| US20120151575A1 (en) | Apparatus and method for certificating security in portable terminal | |
| CN116010991A (en) | Data encryption method, data decryption method, electronic device and readable storage medium | |
| CN115730331B (en) | A method, device, electronic device and storage medium for generating encrypted data | |
| CN109068317A (en) | Communication means, communication processing apparatus and computer readable storage medium | |
| CN115174758B (en) | Picture encryption method and device, electronic equipment and storage medium | |
| CN109190064B (en) | Inventory recording method, terminal and computer readable storage medium | |
| CN115589286B (en) | Data encryption and decryption method and device, electronic equipment and storage medium | |
| CN108876387B (en) | Payment verification method, payment verification equipment and computer-readable storage medium | |
| CN108197490B (en) | Method and terminal for preventing malicious acquisition of user authorization information | |
| CN113691528B (en) | Two-dimensional code processing method and device and electronic equipment | |
| CN110602708B (en) | Pseudo base station identification method, terminal and computer readable storage medium | |
| CN110048835A (en) | The method and apparatus of encryption, storage medium | |
| CN109005153B (en) | Conference joining request, control method, terminal and computer readable storage medium | |
| CN111050316B (en) | Card locking method and device, computer readable storage medium and terminal equipment | |
| CN109121087A (en) | Communication means, terminal and computer readable storage medium | |
| CN109347837B (en) | Bluetooth data encryption transmission method, Bluetooth device and computer readable storage medium |
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: 20220823 Address after: 4-4, Building 5, No. 8 Gangcheng East Road, Jiangbei District, Chongqing 400000 Applicant after: Chongqing kuihai Digital Technology Co.,Ltd. Address before: 10 / F, block a, Han's innovation building, 9018 Beihuan Avenue, gaoxinyuan, Nanshan District, Shenzhen, Guangdong Province Applicant before: NUBIA TECHNOLOGY Co.,Ltd. |
|
| GR01 | Patent grant | ||
| GR01 | Patent grant |