Information encrypting method
A technology of information encryption and encrypted ciphertext, which is applied to key distribution, can solve the problems of high time cost, unfavorable communication encryption of large data volume, and increased economic cost
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0039] The data encryption method according to Embodiment 1 of the present invention is described below. The character map has a length of 256.
[0040] First, randomly generate a character mapping table, the character mapping table has 256 pages, and the content of each page is all 256 ASCII characters (that is, all 256 ASCII characters appear only once in each page of the character mapping table), recorded as Dict1[ 256][256].
[0041] In more detail, each page of the character mapping table can be generated in the following manner: (1) the initial content of the array P[256] is set (for example, the initial content of the array P[256] can be the content of the standard ASCII character table ); (2) Randomly take two random numbers R1 and R2, (0≤R1≤255, 0≤R2≤255); exchange P[R1] with P[R2]; (3) Repeat operation (2) , loop N times (for example, N≥128).
[0042] The contents of the character map thus generated are random. The generated character mapping table can be copied ...
Embodiment 2
[0048] In the encryption method according to Embodiment 1 of the present invention, each character of the information is encoded into 2 bytes, which doubles the length of the encrypted information. The data encryption method according to Embodiment 2 of the present invention has been improved as follows :
[0049] The character mapping table has only 1 page, and the content is all 256 ASCII characters, and each ASCII code character only appears once in the character mapping table, and the character mapping table is marked as Dict2[256], and a page of character mapping table is generated according to embodiment 1 The content method to generate random 1-page character map content. Since the content of one page of the character map is relatively small, the character map can be compiled as a source program into the communication program to complete the distribution of the character map.
[0050] Communication node A encodes information M before sending information M, and the enco...
Embodiment 3
[0055] image 3 and Figure 4 The encryption flow and the decryption flow of the data encryption method according to Embodiment 3 of the present invention are respectively shown.
[0056] In the encryption method according to Embodiment 2 of the present invention, although the information code does not become longer, it is necessary to look up the position of the character m in the decrypted character mapping table during decoding, and the decoding speed is not fast enough. According to the data encryption method of Embodiment 3 of the present invention The method has been improved as follows.
[0057] The content and generation method of the character mapping table are consistent with the embodiment 2, and the distribution method of the character mapping table is also consistent with the embodiment 2, and the character mapping table is marked as Dict3_enc[256].
[0058] Before the communication node A sends the information M, it encodes the information M. The encoding proce...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 