CN110266682B - Data encryption method and device, mobile terminal and decryption method - Google Patents

Data encryption method and device, mobile terminal and decryption method Download PDF

Info

Publication number
CN110266682B
CN110266682B CN201910525708.1A CN201910525708A CN110266682B CN 110266682 B CN110266682 B CN 110266682B CN 201910525708 A CN201910525708 A CN 201910525708A CN 110266682 B CN110266682 B CN 110266682B
Authority
CN
China
Prior art keywords
character
character string
data
encrypted
decrypted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910525708.1A
Other languages
Chinese (zh)
Other versions
CN110266682A (en
Inventor
叶亮
游道军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Aicai Network Technology Co ltd
Original Assignee
Hangzhou Aicai Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Aicai Network Technology Co ltd filed Critical Hangzhou Aicai Network Technology Co ltd
Priority to CN201910525708.1A priority Critical patent/CN110266682B/en
Publication of CN110266682A publication Critical patent/CN110266682A/en
Application granted granted Critical
Publication of CN110266682B publication Critical patent/CN110266682B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Abstract

The invention discloses a data encryption method, a data encryption device, a mobile terminal and a data decryption method, and relates to the technical field of data processing. The invention comprises the following steps: s1: acquiring data to be encrypted; s2: randomly selecting an encryption method and generating random numbers, selecting an appointed character string and appointed characters according to the random numbers, encrypting the appointed character string according to the randomly selected encryption method, and generating an encrypted appointed character string; s3: step S4 is entered after the encryption processing of the rest characters in the character string to be encrypted is completed; s4: and sequentially arranging and combining the plurality of encrypted designated character strings after the encryption processing to generate an encrypted character string. The invention carries out encryption processing on the data by randomly selecting the encryption method, can carry out encryption and decryption quickly, not only ensures the safety of the data, but also reduces the consumption on the performance of equipment, and the selection algorithm of the designated character string is only stored in the service terminal and the client, thereby fully ensuring the safety of the data.

Description

Data encryption method and device, mobile terminal and decryption method
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a data encryption method, a data encryption device, a mobile terminal and a data decryption method based on network data transmission.
Background
With the rapid development of mobile internet and the popularization of smart phones, the internet surfing of mobile phones is an indispensable requirement for work, life and entertainment of people, and the requirement is rapidly increasing. Under the popularization of the internet surfing of the mobile phone, various types of mobile phone applications bring convenience for work and life and more entertainment contents to people. How to improve the security of the mobile internet and protect the privacy information of the user becomes an important topic of mobile phone application platform developers.
The basic loading process of network data transmission is as follows: when the mobile network application is used and certain data needs to be acquired, the mobile terminal sends a requirement to the server side, the server side encrypts the received requirement and transmits the encrypted data to the mobile terminal through the network, and finally the mobile terminal decrypts the received data and can see the original text. At present, most of applications adopt a more complex encryption technology, although the security of data is improved, the encryption and decryption processes are often too complex and consume more performance and time, and certain common encryption and decryption technologies are easy to crack.
On the other hand, in a scenario where the requirement on the encryption degree is not too high but the encryption efficiency is pursued, for example, a large amount of user information of picture or text types in a platform for a network, in order to prevent privacy leakage and ensure the acquisition speed of the information. How to reduce the performance and time consumption of network data encryption and decryption and how to make the encryption and decryption difficult becomes the key point for solving the problems.
Disclosure of Invention
The invention aims to provide a data encryption method, a data encryption device, a mobile terminal and a data decryption method, which can quickly encrypt and decrypt data, ensure the safety of the data and reduce the consumption of equipment performance, and the selection algorithm of a designated character string is not transmitted through a network, but only stored in a service terminal and a client, so that the safety of the data is fully ensured.
The invention aims to provide a data encryption method, a data encryption device, a mobile terminal and a data decryption method.
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
To solve any of the above objects, the present invention provides a data encryption method, comprising the steps of:
s1: acquiring data to be encrypted, wherein the data to be encrypted is a character string to be encrypted; and
s2: randomly selecting an encryption method and generating random numbers, selecting an appointed character string and appointed characters according to the random numbers, encrypting the appointed character string according to the randomly selected encryption method, and generating an encrypted appointed character string;
the encryption method comprises a character adding encryption method and a transposition encryption method, the specified character string is a part selected from an editing position of the character string to be encrypted according to the value of the random number, and the specified character is a corresponding character of the value of the random number in the specified character string;
s3: continuing to encrypt the rest characters in the character string to be encrypted by the encryption method in the step S2, and then entering the step S4;
s4: the plurality of encrypted specified strings encrypted in step S3 are sequentially arranged and combined to generate an encrypted string.
Optionally, the character adding encryption method further includes:
and generating a random character, and adding the random character to the specified character.
Optionally, the transposition encryption method further includes:
and exchanging the first character of the specified character string with the specified character.
Optionally, the step S2 further includes:
setting an algorithm, substituting the random numbers into the algorithm to calculate values, generating a specified value, and determining the number of the characters subjected to the encryption processing according to the specified value;
and if the value of the random number and the specified value are both larger than the number of the residual characters, respectively assigning the value of the number of the residual characters to the value of the random number and the specified value.
Optionally, the encrypting the designated character string according to the randomly selected encryption method further includes:
and adding an identification character before the first character of the appointed character string, and adding the random number after the identification character, wherein the identification character is used for identifying the encryption method adopted by the appointed character string.
An aspect of the invention also provides a data encryption apparatus for implementing encryption of data by applying the method as claimed in any one of claims 1 to 5.
Another aspect of the present invention also provides a mobile terminal, which employs the data encryption apparatus as described above.
Other aspects of the present invention also provide a data decryption method, including the steps of:
s01: acquiring data to be decrypted;
the data to be decrypted is a character string to be decrypted, the character string to be decrypted comprises a plurality of appointed character strings to be decrypted, an identification character and a random number are added before the first character of each appointed character string to be decrypted, and the appointed character string to be decrypted is a part selected from an editing position of the data to be decrypted according to the value of the random number; and
s02: reading the identification character and judging an encryption method adopted by the character string to be decrypted, reading the random number, selecting an appointed character string to be decrypted and an appointed character according to the random number, decrypting the appointed character string to be decrypted by correspondingly using a decryption method according to the encryption method, and generating a decrypted appointed character string, wherein the decryption method comprises a character deletion decryption method and a transposition decryption method;
s03: step S4 is performed after the encryption processing of the remaining characters in the data to be decrypted is completed;
s04: and sequentially arranging and combining the plurality of the appointed character strings to be decrypted after the encryption processing to generate the decrypted character strings.
Optionally, the character deletion decryption method further includes:
and deleting the random character after the designated character.
Optionally, the transposition decryption method further includes:
and exchanging the specified character with the first character of the specified character string.
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method of encrypting data in accordance with an aspect of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
referring to fig. 1, in the present embodiment, a data encryption method is provided, which includes the following steps:
s1: acquiring and storing data to be encrypted, wherein the data to be encrypted is a character string to be encrypted;
specifically, in this embodiment, the processor creates a first null character, where the first null character is used to store a character after data to be encrypted is encrypted, and adds an identification character in the first null character, where the identification character may be "# ds #" and is used by the encrypted data receiving end to identify the encrypted data, where "d" and "s" may be used to distinguish one of the encryption methods used for specifying the character string.
S2: randomly selecting an encryption method and generating random numbers, selecting an appointed character string and appointed characters according to the random numbers, encrypting the appointed character string according to the randomly selected encryption method, and generating an encrypted appointed character string;
the encryption method comprises a character adding encryption method and a transposition encryption method, wherein the designated character string is a part selected from an editing position of the character string to be encrypted according to the value of the random number, and the designated character is a corresponding character of the value of the random number in the designated character string;
specifically, in this embodiment, both the random number and the randomly selected encryption method can be generated from the current system time, and "0" or "1" is randomly generated according to the system time, where "0" indicates that the d method is used and "1" indicates that the s method is used; the editing position is the position in front of the rest characters in the character string to be encrypted; when a designated character is selected, if the value of the random number is e, the e-th character in the designated character string is the designated character.
S3: step S4 is entered after the encryption processing of the rest characters in the character string to be encrypted is completed;
s4: sequentially arranging and combining the encrypted designated character strings to generate an encrypted character string;
specifically, in this embodiment, each time a section of specified character string is encrypted, the generated encrypted specified character string is added to the end of the first empty character, and after all the remaining characters in the character string to be encrypted are encrypted, the generated encrypted character string is subjected to data encapsulation, and the encapsulated data is sent to the terminal through the communication protocol.
In one aspect of this embodiment, the character addition encryption method further includes:
generating a random character, and adding the random character to the designated character;
specifically, in this embodiment, when the encryption method is randomly selected according to the step in step S2, if the character-adding encryption method is selected, an invalid character is randomly generated, and is added to the designated character, and then the encrypted designated character string is generated, where the invalid character may be 0 to 9, or a to Z; in the character adding encryption method, the value of the random number is in the range of 0 to 9, and optionally, the value of the random number may be set in the range of 0 to the number of the remaining characters in the character string to be encrypted.
In another aspect of this embodiment, the transposition encryption method further includes:
exchanging the first character of the designated character string with the designated character;
specifically, in this embodiment, when the encryption method is randomly selected following the step in step S2, if the transposition encryption method is selected, the first character of the designated character string is exchanged with the designated character, and the encrypted designated character string is generated; in the transposition encryption method, the value of the random number is in the range of 2-9, if the value of the generated random number is not in the range of 2-9, the value of the number of the remaining characters is assigned to the value of the random number, and optionally, the value of the random number can be set in the range of 2-the number of the remaining characters according to the number of the remaining characters in the character string to be encrypted.
In other aspects of this embodiment, step S2 further includes:
setting an algorithm, substituting random numbers into the algorithm to calculate values, generating a specified value, and determining the number of the characters subjected to the encryption processing according to the specified value;
and if the value of the random number and the designated value are both larger than the number of the residual characters, respectively assigning the value of the number of the residual characters to the value of the random number and the designated value.
Specifically, in this embodiment, the algorithm is a formula agreed by the encryption end and the decryption end, the specified value generated by the formula is used to determine the number of the characters of the current encryption processing, and the formula can be stored only in the encryption end and the decryption end and is used to enhance data security; if the specified value calculated by the formula is larger than the number of the residual characters in the character string to be encrypted, assigning the value of the number of the residual characters to the specified value, wherein the assigned specified value is the number of the characters of the encryption processing, and generating the specified character string according to the number; and if the value of the random number is larger than the number of the residual characters in the character string to be encrypted, assigning the value of the number of the residual characters to the value of the random number, and generating the specified character string according to the number.
In other aspects of this embodiment, the encrypting the specified string according to the randomly selected encryption method further includes:
and adding an identification character before the first character of the designated character string, and adding a random number after the identification character, wherein the identification character is used for identifying the encryption method adopted by the designated character string.
Specifically, in this embodiment, after the specified character string is generated, according to the encryption method adopted by the specified character string, "d" or "s" is added before the first character of the specified character string, so as to identify that the specified character string adopts a character addition encryption method or a transposition encryption method.
The application of one aspect of the embodiment is as follows: for example, the original character is "Nsb 8905c995286452ajk490c00 dsam", assuming that a character adding encryption method is randomly adopted, the value of a random number is 8, the random invalid character is S, assuming that the value of the random number is substituted into a formula to calculate out a specified value of 11, the specified character string at that position is "Nsb 8905c 995", and after processing, the obtained "d 8Nsb8905cS 995" is the encrypted specified character string of the specified character string;
continuing encryption processing on the residual character '286452 ajk490c00 dsam', assuming that a transposition encryption method is randomly adopted, the value of a random number is 7, assuming that the value of the random number is substituted into a specified value calculated by a formula to be 16, the specified character string at the position is '286452 ajk490c 00', obtaining's 72286455ajk490c 00' after processing, namely the encrypted specified character string of the specified character string, and adding the encrypted specified character string at the position to the encrypted specified character string;
continuing to encrypt the residual characters 'dsam', assuming that a transposition encryption method is randomly adopted, as the number of the residual characters is less than 10 and is not in the range of 2-9, the value of the random number can be set in the range of 2-4 of the residual characters, and the value of the number of the residual characters can be assigned to the random number after the random number is generated; assuming that the random value is 4, the specified value calculated by substituting the formula is 13, since the specified value is larger than the number of the remaining characters, that is, the number of the characters represented by the specified value exceeds the number of the remaining characters, the specified value is assigned to 4, after the processing, "s 4 msad" can be obtained, the encrypted character is added to the end of the character stream of the data transmission, and finally the encrypted character is generated as follows:
“#ds#d8Nsb8905cS995s72286455ajk490c00s4msad”。
example 2:
referring to embodiment 1, in this embodiment, a data encryption apparatus is provided, where the apparatus implements data encryption by applying the data encryption method described in embodiment 1, and specifically includes:
the device comprises a to-be-encrypted data acquisition unit, a to-be-encrypted data acquisition unit and a to-be-encrypted data acquisition unit, wherein the to-be-encrypted data is a to-be-encrypted character string; and
the encryption method and random number random selection unit is used for selecting the designated character string and the designated character according to the random number, encrypting the designated character string according to the randomly selected encryption method and generating an encrypted designated character string;
the encryption method comprises a character adding encryption method and a transposition encryption method, wherein the designated character string is a part selected from an editing position of the character string to be encrypted according to the value of the random number, and the designated character is a corresponding character of the value of the random number in the designated character string;
and the encrypted character string generating unit is used for sequentially arranging and combining the encrypted designated character strings after encryption processing to generate the encrypted character string after the encryption processing of the rest characters in the character string to be encrypted is completed.
Example 3:
referring to embodiment 2, in this embodiment, a mobile terminal is provided, where the mobile terminal employs the data encryption apparatus described in embodiment 2, and specifically includes:
the device for acquiring the data to be encrypted comprises a device for acquiring the data to be encrypted, wherein the data to be encrypted is a character string to be encrypted; and
an encryption method and random number random selection device configured to select a specified character string and a specified character according to a random number, encrypt the specified character string according to a randomly selected encryption method, and generate an encrypted specified character string;
the encryption method comprises a character adding encryption method and a transposition encryption method, wherein the designated character string is a part selected from an editing position of the character string to be encrypted according to the value of the random number, and the designated character is a corresponding character of the value of the random number in the designated character string;
and the encrypted character string generating device is configured to sequentially arrange and combine the encrypted specified character strings after encryption processing to generate the encrypted character string after the encryption processing of the rest characters in the character string to be encrypted is completed.
Example 4:
referring to embodiment 1, in this embodiment, a data decryption method is provided, which may be used to decrypt any encrypted data in embodiments 1 to 3, and specifically includes:
s01: acquiring data to be decrypted;
the data to be decrypted is a character string to be decrypted, the character string to be decrypted comprises a plurality of designated character strings to be decrypted, an identification character and a random number are added before the first character of each designated character string to be decrypted, and the designated character strings to be decrypted are selected parts from an editing position of the data to be decrypted according to the value of the random number;
specifically, in this embodiment, a second empty character is created and a memory space is allocated, where the memory space is used to store the decryption string and delete the identification character at the front of the string to be decrypted, i.e., "# ds #".
S02: reading the identification character and judging the encryption method adopted by the character string to be decrypted, reading the random number, selecting the appointed character string to be decrypted and the appointed character according to the random number, decrypting the appointed character string to be decrypted by correspondingly using the decryption method according to the encryption method, and generating the decrypted appointed character string, wherein the decryption method comprises a character deletion decryption method and a transposition decryption method;
specifically, in this embodiment, an identification character, i.e., "d" or "s", after an identification character at the front of a character string to be decrypted is read, an encryption method adopted by the character string to be decrypted is determined according to the identification character, and then the identification character is deleted; and reading the random number after the identification character, substituting the random number into an algorithm to obtain a specified value, selecting a specified character string to be decrypted according to the specified value, and selecting a specified character according to the random number.
S03: step S4 is entered after the encryption processing of the remaining characters in the data to be decrypted is completed;
s04: and sequentially arranging and combining the plurality of specified character strings to be decrypted after the encryption processing to generate the decrypted character strings.
Specifically, in this embodiment, each time a section of the designated character string to be decrypted is decrypted, the generated designated character string to be decrypted is added to the end of the second empty character, and after all the remaining characters in the character string to be decrypted are decrypted, the decrypted character string is generated.
In an aspect of this embodiment, the character deletion decryption method further includes:
and deleting the random character after the designated character.
In another aspect of this embodiment, the transposition decryption method further includes:
the designated character is exchanged with the first character of the designated string.
One specific application of this embodiment is:
and judging whether the head of the data to be decrypted has an identification character, namely, "# ds #", and if so, decrypting.
In this embodiment, the character adding encryption method and the transposition encryption method in the data encryption method in embodiment 1 may be reversely operated, for example:
the data to be decrypted is "# ds # d8Nsb8905cS995s72286455ajk490c00s4 msad";
deleting "# ds #", "d 8" indicates that the 8 th character needs to be deleted, substituting 8 into the algorithm to obtain the specified value of 11, and obtaining "Nsb 8905c 995" after processing, namely the decryption specified character string is "Nsb 8905c 995; "s 7" indicates that the first character of the remaining characters needs to be exchanged with the 7 th character after the first character, and the specified value is calculated to be 16 by substituting 7 into the algorithm, so that "5286452 ajk490c 00" can be obtained after processing, namely, the decrypted specified character string is "5286452 ajk490c 00"; "s 4" indicates that the first character of the remaining characters needs to be exchanged with the 4 th character after the first character, 4 is substituted into the character number formula to calculate the specified value 13, since the specified value is larger than the number of the remaining characters, that is, the number of characters represented by the specified value exceeds the number of the remaining characters, the specified value is assigned to 4, and after processing, "dsam" is obtained, and finally the decrypted complete character is "Nsb 8905c995286452ajk490c00 dsam".
It should be noted that in the description of the present specification, descriptions such as "first", "second", etc. are only used for distinguishing features, and do not have an actual order or meaning, and the present application is not limited thereto.
In the description herein, references to the description of "one embodiment," "an example," "a specific example" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It should be noted that, in the above system embodiment, each included unit is only divided according to functional logic, but is not limited to the above division as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
In addition, it can be understood by those skilled in the art that all or part of the steps in the method for implementing the embodiments described above can be implemented by instructing the relevant hardware through a program, and the corresponding program can be stored in a computer-readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, or the like.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (10)

1. A data encryption method, comprising the steps of:
s1: acquiring data to be encrypted, wherein the data to be encrypted is a character string to be encrypted; and
s2: randomly selecting an encryption method and generating random numbers, selecting an appointed character string and appointed characters according to the random numbers, encrypting the appointed character string according to the randomly selected encryption method, and generating an encrypted appointed character string;
the encryption method comprises a character adding encryption method and a transposition encryption method, the specified character string is a part selected from an editing position of the character string to be encrypted according to the value of the random number, and the specified character is a corresponding character of the value of the random number in the specified character string;
s3: continuing to encrypt the rest characters in the character string to be encrypted by the encryption method in the step S2, and then entering the step S4;
s4: the plurality of encrypted specified strings encrypted in step S3 are sequentially arranged and combined to generate an encrypted string.
2. The data encryption method according to claim 1, wherein the character addition encryption method further comprises:
and generating a random character, and adding the random character to the specified character.
3. The data encryption method of claim 1, wherein the transposition encryption method further comprises:
and exchanging the first character of the specified character string with the specified character.
4. The data encryption method according to any one of claims 1 to 3, wherein the step S2 further includes:
setting an algorithm, substituting the random numbers into the algorithm to calculate values, generating a specified value, and determining the number of the characters subjected to the encryption processing according to the specified value;
and if the value of the random number and the specified value are both larger than the number of the residual characters, respectively assigning the value of the number of the residual characters to the value of the random number and the specified value.
5. A data encryption method according to any one of claims 1 to 3, wherein said encrypting said specified character string according to a randomly selected encryption method further comprises:
and adding an identification character before the first character of the appointed character string, and adding the random number after the identification character, wherein the identification character is used for identifying the encryption method adopted by the appointed character string.
6. Data encryption apparatus, characterized in that the apparatus implements encryption of data by applying the method according to any of claims 1-5.
7. A mobile terminal, characterized in that the terminal employs the data encryption device according to claim 1.
8. A method for decrypting data, comprising the steps of:
s01: acquiring data to be decrypted;
the data to be decrypted is a character string to be decrypted, the character string to be decrypted comprises a plurality of appointed character strings to be decrypted, an identification character and a random number are added before the first character of each appointed character string to be decrypted, and the appointed character string to be decrypted is a part selected from an editing position of the data to be decrypted according to the value of the random number; and
s02: reading the identification character and judging an encryption method adopted by the character string to be decrypted, reading the random number, selecting an appointed character string to be decrypted and an appointed character according to the random number, decrypting the appointed character string to be decrypted by correspondingly using a decryption method according to the encryption method, and generating a decrypted appointed character string, wherein the decryption method comprises a character deletion decryption method and a transposition decryption method;
s03: step S4 is performed after the decryption process for the remaining characters in the data to be decrypted is completed;
s04: and sequentially arranging and combining the plurality of decrypted appointed character strings to generate a decrypted character string.
9. The data decryption method of claim 8, wherein the character deletion decryption method further comprises:
and deleting the random character after the designated character.
10. The data decryption method of claim 8, wherein the transposition decryption method further comprises:
and exchanging the specified character with the first character of the specified character string.
CN201910525708.1A 2019-06-18 2019-06-18 Data encryption method and device, mobile terminal and decryption method Active CN110266682B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910525708.1A CN110266682B (en) 2019-06-18 2019-06-18 Data encryption method and device, mobile terminal and decryption method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910525708.1A CN110266682B (en) 2019-06-18 2019-06-18 Data encryption method and device, mobile terminal and decryption method

Publications (2)

Publication Number Publication Date
CN110266682A CN110266682A (en) 2019-09-20
CN110266682B true CN110266682B (en) 2021-11-02

Family

ID=67919087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910525708.1A Active CN110266682B (en) 2019-06-18 2019-06-18 Data encryption method and device, mobile terminal and decryption method

Country Status (1)

Country Link
CN (1) CN110266682B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113783887B (en) * 2021-09-22 2023-07-18 广东九联科技股份有限公司 Remote control method, system and storage medium based on network communication
CN114221792B (en) * 2021-11-23 2023-06-16 杭州天宽科技有限公司 Internet data transmission encryption system
CN114553491A (en) * 2022-01-24 2022-05-27 大唐互联科技(武汉)有限公司 Data grading encryption method, system and storage medium
CN114915805B (en) * 2022-07-18 2022-11-08 广州万协通信息技术有限公司 Video stream transmission method based on double encryption mechanism and security chip device
CN115225935B (en) * 2022-09-20 2023-01-06 广州万协通信息技术有限公司 Method and device for cross-encrypting bytes of video stream and audio stream
CN115714644B (en) * 2022-10-31 2023-08-15 北京海泰方圆科技股份有限公司 Random number generation method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811298A (en) * 2015-05-14 2015-07-29 中国联合网络通信集团有限公司 Method and device for realizing encryption
CN107135062A (en) * 2017-05-08 2017-09-05 桂林电子科技大学 A kind of encryption method of improved big file
CN107147616A (en) * 2017-03-31 2017-09-08 武汉斗鱼网络科技有限公司 Data ciphering method and device
CN107592636A (en) * 2017-08-17 2018-01-16 深圳市诚壹科技有限公司 A kind of method of processing information, terminal and server
CN107634832A (en) * 2017-09-12 2018-01-26 云南撇捺势信息技术有限公司 Character string encryption, verification method, device, computer-readable recording medium
CN108418684A (en) * 2018-03-09 2018-08-17 江苏科建教育软件有限责任公司 A kind of character string symmetric cryptography and decryption method
CN109040090A (en) * 2018-08-17 2018-12-18 北京海泰方圆科技股份有限公司 A kind of data ciphering method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7406174B2 (en) * 2003-10-21 2008-07-29 Widevine Technologies, Inc. System and method for n-dimensional encryption
US20170264427A1 (en) * 2016-03-11 2017-09-14 Microsoft Technology Licensing, Llc Data encryption techniques

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104811298A (en) * 2015-05-14 2015-07-29 中国联合网络通信集团有限公司 Method and device for realizing encryption
CN107147616A (en) * 2017-03-31 2017-09-08 武汉斗鱼网络科技有限公司 Data ciphering method and device
CN107135062A (en) * 2017-05-08 2017-09-05 桂林电子科技大学 A kind of encryption method of improved big file
CN107592636A (en) * 2017-08-17 2018-01-16 深圳市诚壹科技有限公司 A kind of method of processing information, terminal and server
CN107634832A (en) * 2017-09-12 2018-01-26 云南撇捺势信息技术有限公司 Character string encryption, verification method, device, computer-readable recording medium
CN108418684A (en) * 2018-03-09 2018-08-17 江苏科建教育软件有限责任公司 A kind of character string symmetric cryptography and decryption method
CN109040090A (en) * 2018-08-17 2018-12-18 北京海泰方圆科技股份有限公司 A kind of data ciphering method and device

Also Published As

Publication number Publication date
CN110266682A (en) 2019-09-20

Similar Documents

Publication Publication Date Title
CN110266682B (en) Data encryption method and device, mobile terminal and decryption method
CN105450620B (en) A kind of information processing method and device
CN108259171B (en) Shader file protection method and device
CN104834868A (en) Electronic data protection method, device and terminal equipment
CN112751855B (en) Cross-browser user data security management system based on encryption technology
CN103378971B (en) A kind of data encryption system and method
CN109271798A (en) Sensitive data processing method and system
CN107786331A (en) Data processing method, device, system and computer-readable recording medium
CN105101183A (en) Method and system for protecting private contents at mobile terminal
US20230027142A1 (en) Method and apparatus for encrypting and decrypting and reading and writing messages, computer device, and storage medium
CN108667784B (en) System and method for protecting internet identity card verification information
CN107395620A (en) A kind of network transmission encrypting and decrypting method based on random bytes mapping
CN111414635A (en) File encryption and decryption method, device, equipment and storage medium
CN111934873A (en) Bidding file encryption and decryption method and device
CN112291268A (en) Information transmission method, device, equipment and storage medium
CN109039997B (en) Secret key obtaining method, device and system
CN106203141A (en) The data processing method of a kind of application and device
CN107359989A (en) Data ciphering method, safety chip and computer-readable recording medium
CN112887297B (en) Privacy-protecting differential data determining method, device, equipment and system
CN106254226B (en) A kind of information synchronization method and device
CN110611568B (en) Dynamic encryption and decryption method, device and equipment based on multiple encryption and decryption algorithms
CN116455572A (en) Data encryption method, device and equipment
CN110990848A (en) Sensitive word encryption method and device based on hive data warehouse and storage medium
CN108985109B (en) Data storage method and device
CN111241556A (en) Data security storage method and device, storage medium and terminal

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
GR01 Patent grant
GR01 Patent grant