CN103067162B - A kind of method and device of data transmission - Google Patents

A kind of method and device of data transmission Download PDF

Info

Publication number
CN103067162B
CN103067162B CN201210461232.8A CN201210461232A CN103067162B CN 103067162 B CN103067162 B CN 103067162B CN 201210461232 A CN201210461232 A CN 201210461232A CN 103067162 B CN103067162 B CN 103067162B
Authority
CN
China
Prior art keywords
encrypted data
sent
data
random number
character
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
CN201210461232.8A
Other languages
Chinese (zh)
Other versions
CN103067162A (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.)
Sina Technology China Co Ltd
Original Assignee
Sina Technology China 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 Sina Technology China Co Ltd filed Critical Sina Technology China Co Ltd
Priority to CN201210461232.8A priority Critical patent/CN103067162B/en
Publication of CN103067162A publication Critical patent/CN103067162A/en
Application granted granted Critical
Publication of CN103067162B publication Critical patent/CN103067162B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses the method and device of a kind of data transmission, in order to solve the problem that in prior art, the safety of data transmission is relatively low.The method transmitting terminal generates random number m, and the ASCII value of each character in data to be sent is converted into the m system number specifying figure place, the data to be sent after being encrypted, then the data to be sent after this random number m and encryption are sent to receiving terminal.Due to when in the embodiment of the present invention, data to be sent are encrypted by transmitting terminal every time, it is that the ASCII value of character each in data to be sent is converted into random m system number, therefore, even if when sending identical multiple data to be sent, the result obtained after being encrypted these multiple data to be sent is also different, thus effectively reduce the risk that AES is cracked, improve the safety of data transmission.

Description

Data transmission method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for data transmission.
Background
At present, in order to ensure the security of data transmission, when a sending end sends data to a receiving end, the data is usually encrypted for transmission.
In the prior art, a method for a sending end to perform encrypted transmission on data to be sent specifically includes: and respectively converting each character in the data to be transmitted into an encrypted string according to a specified conversion rule, combining the encrypted strings converted respectively according to each character to obtain encrypted data to be transmitted, and transmitting the encrypted data to be transmitted to a receiving end. And when the receiving end receives the encrypted data, decrypting the encrypted data according to the inverse process of the encryption process to obtain the original data.
However, in the prior art, when a sending end encrypts data to be sent, because a single encryption algorithm is used, for a plurality of same data to be sent, results obtained by encrypting the plurality of data to be sent are the same, which increases the risk of cracking the encryption algorithm and reduces the security of data transmission.
Disclosure of Invention
The embodiment of the invention provides a data transmission method and device, which are used for solving the problem of low safety of data transmission in the prior art.
The data sending method provided by the embodiment of the invention comprises the following steps:
a sending end generates a random number m; and are
For each character in data to be transmitted, converting the ASCII value of the character into an m-ary number with a specified number of digits; and
combining the m-system numbers of the designated digits converted respectively for each character to obtain encrypted data to be sent;
and the sending end sends the random number m and the encrypted data to be sent to a receiving end.
The data receiving method provided by the embodiment of the invention comprises the following steps:
a receiving end receives encrypted data sent by a sending end and a random number m corresponding to the encrypted data; and are
Dividing the received encrypted data into a plurality of units by adopting a specified dividing method, wherein the specified dividing method comprises the following steps: dividing every n characters in the encrypted data into a unit, wherein n is a designated digit; and
for each divided cell, treating all characters contained in the cell as an m-ary number, converting the m-ary number into a decimal number, and determining an ASCII value as the character of the converted decimal number;
and the receiving end combines the characters determined respectively aiming at each divided unit to obtain the original data corresponding to the encrypted data.
The data sending device provided by the embodiment of the invention comprises:
a generation module for generating a random number m;
the conversion module is used for converting the ASCII value of each character in the data to be transmitted into an m-ary number with a specified number of digits;
the combination module is used for combining the m-system numbers of the designated digits converted respectively aiming at each character to obtain encrypted data to be sent;
and the sending module is used for sending the random number m and the encrypted data to be sent to a receiving end.
The data receiving device provided by the embodiment of the invention comprises:
a receiving module, configured to receive encrypted data sent by a sending end and a random number m corresponding to the encrypted data;
a dividing module, configured to divide the received encrypted data into a plurality of units by using a specified dividing method, where the specified dividing method is: dividing every n characters in the encrypted data into a unit, wherein n is a designated digit;
a conversion module for, for each of the divided units, taking all the characters contained in the unit as an m-ary number, converting the m-ary number into a decimal number, and determining an ASCII value as a character of the converted decimal number;
and the combination module is used for combining the characters determined respectively aiming at each divided unit to obtain the original data corresponding to the encrypted data.
The embodiment of the invention provides a method and a device for data transmission. In the embodiment of the invention, each time the sending end encrypts the data to be sent, the ASCII value of each character in the data to be sent is converted into the random m-ary number, so that even when a plurality of same data to be sent are sent, the results obtained after encrypting the plurality of data to be sent are different, thereby effectively reducing the risk of cracking the encryption algorithm and improving the safety of data transmission.
Drawings
Fig. 1 is a data transmission process provided in an embodiment of the present invention;
fig. 2 is a data receiving process provided by an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data transmission apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data receiving apparatus according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method and a device for data transmission. In the embodiment of the invention, each time the sending end encrypts the data to be sent, the ASCII value of each character in the data to be sent is converted into the random m-ary number, so that even when a plurality of same data to be sent are sent, the results obtained after encrypting the plurality of data to be sent are different, thereby effectively reducing the risk of cracking the encryption algorithm and improving the safety of data transmission.
The following detailed description of embodiments of the invention refers to the accompanying drawings.
Fig. 1 is a data transmission process provided in an embodiment of the present invention, which specifically includes the following steps:
s101: the transmitting end generates a random number m.
In the embodiment of the invention, when a sending end needs to send data to be sent, a random number m is randomly generated. Wherein, an integer can be randomly generated within the range of 2-127 as the random number m.
For example, when data to be transmitted is "CL", the transmitting end randomly generates a random number m.
S102: for each character in the data to be transmitted, the ASCII value of the character is converted to an m-ary number of a specified number of bits.
After the random number m is generated, the transmitting end converts the ASCII value of each character in the data to be transmitted into an m-ary number with a specified number of bits. The designated bit number is marked as n, the designated bit number n should be not less than 8, and the designated bit number n can be agreed with the receiving end in advance. Specifically, for each character in data to be transmitted, the transmitting end may convert an ASCII value of the character into an m-ary number, and if the number of bits of the converted m-ary number is less than a specified number of bits n, complement 0 before the converted m-ary number, so that the number of bits of the m-ary number after complementing 0 reaches the specified number of bits n. For example, if the number of bits of an m-ary number obtained by converting the ASCII value of a certain character is k bits and k is smaller than n, n-k 0's may be complemented before the converted m-ary number, so that the number of bits of the m-ary number after complementing 0's is n bits.
Continuing with the above example, assuming that the random number m generated in step S101 is 16 and the number of bits n previously agreed with the receiving end is 8, then:
firstly, aiming at a character "C" in the data "CL" to be transmitted, a transmitting end determines that the ASCII value of the character "C" is 67, converts the ASCII value 67 of the character "C" into a 16-system number, the converted 16-system number is 43, and as the converted 16-system number 43 has only two bits and less than 8 bits, 8-2= 60 s are supplemented before the converted 16-system number, so that the bit number of the 16-system number after 0 supplementation is 8 bits, and the 16-system number after 0 supplementation is 00000043;
the transmitting end determines that the ASCII value of the character "L" is 76 for the character "L" in the data "CL" to be transmitted, converts the ASCII value 76 of the character "L" into a 16-ary number, and the converted 16 prohibited number is 4C, because the converted 16-ary number is 4C with only two bits and less than 8 bits, 8-2=6 0's are supplemented before the converted 16-ary number, so that the number of bits of the 16-ary number after 0 supplementation is 8 bits, and the 16-ary number after 0 supplementation is 0000004C.
Thus, the character "C" in the data to be transmitted is converted into the encryption string 00000043 of the specified number of bits (8 bits), and the character "L" in the data to be transmitted is converted into the encryption string 0000004C of the specified number of bits (8 bits).
The reason why the number of designated bits n is not less than 8 is: for a character, the smaller the converted binary number is, the more the number of bits converted into the binary number is, and the minimum binary number is 2, that is, the minimum binary number is binary, the maximum ASCII value in the ASCII table is 255 (the range of ASCII values in the ASCII table is 0 to 255, where each character corresponding to ASCII values of 0 to 127 can be input and displayed by a keyboard and each character corresponding to ASCII values of 128 to 255 cannot be input but can be displayed by a keyboard), and 255 is converted into the minimum binary number (binary number) of 11111111, which has 8 bits in total, so the specified number of bits n should be not less than 8.
S103: and combining the m-system numbers of the specified digits converted respectively for each character to obtain encrypted data to be sent.
After each character in the data to be transmitted is converted into an m-ary number through the step S102, the transmitting end may arrange the n-bit (designated bit number) m-ary numbers converted for each character according to the sequence of each character in the data to be transmitted, so as to obtain encrypted data to be transmitted.
Continuing with the above example, since the character "C" in the data to be transmitted has been converted into the 8-bit 16-ary number 00000043, and the character "L" in the data to be transmitted has been converted into the 8-bit 16-ary number 0000004C, the converted binary numbers are arranged as follows according to the sequence of the characters "C" and "L" in the data to be transmitted: 000000430000004C, the obtained 000000430000004C is the encrypted data to be sent, that is, the encrypted string corresponding to the data "CL" to be sent.
S104: and the sending end sends the random number m and the encrypted data to be sent to the receiving end.
After obtaining the encrypted data to be sent in step S103, the sending end sends the generated random number m and the encrypted data to be sent to the receiving end, so that the receiving end decrypts the encrypted data to be sent by using a decryption process corresponding to the encryption process according to the random number m.
Through the above process shown in fig. 1, the sending end actually converts the ASCII value of each character in the data to be sent into an m-ary number to encrypt the data to be sent, and since the m-ary number to be converted is randomly generated by the sending end, that is, the m-ary number to be converted is almost impossible to be consistent each time the data to be sent is sent, even if the sending end sends the same multiple data to be sent, the results obtained by encrypting the same multiple data to be sent are different, which effectively reduces the risk of cracking the encryption algorithm and improves the security of data transmission.
In this embodiment of the present invention, a method for a sending end to convert an ASCII value of a character in data to be sent into an m-ary number may specifically be: and determining a quotient and a remainder of dividing the ASCII value of the character by a random number m, if the obtained quotient is greater than m, continuing to determine the quotient and the remainder of dividing the obtained quotient by m until the obtained quotient is less than m, when the obtained quotient is less than m, arranging the remainders obtained each time according to a designated sequence, and placing the quotient obtained last time before the arranged remainders to obtain a converted m-ary number. Wherein, the specified sequence is as follows: the reverse order of the remainder is obtained. And, if the resulting remainder (or last resulting quotient) is greater than 9, a sum of the resulting remainder (or last resulting quotient) and 55 can be determined, and a character having an ASCII value as the sum can be determined, with the determined character replacing the resulting remainder (or last resulting quotient).
Continuing with the above example, when the character "L" in the above example is converted into a 16-ary number, the ASCII value of the character "L" is 76, the quotient obtained by dividing the ASCII value 76 by 16 is 4, and the remainder is 12, since the quotient is 4 and less than 16, 4 is the last quotient obtained, and the remainder 12 is greater than 9, it is determined that the sum of the remainders 12 and 55 is 67, and since the character with the ASCII value of 67 is C, the obtained remainder 12 is replaced by the character C, and the last obtained quotient 4 is placed before the obtained remainder (replaced by C), so that the converted 16-ary number 4C can be obtained.
Specifically, the pseudo code for converting the ASCII value of the characters in the data to be transmitted into an n-bit m-ary number may be as follows:
wherein, the parameter m in the code is the random number m generated by the sending end.
Accordingly, when the transmitting end transmits data by using the method shown in fig. 1, the receiving end may receive data by using the method shown in fig. 2. Fig. 2 is a data receiving process provided in the embodiment of the present invention, which specifically includes the following steps:
s201: the receiving end receives the encrypted data transmitted from the transmitting end and a random number m corresponding to the encrypted data.
In the embodiment of the present invention, when the sending end sends the encrypted data and the random number m to the receiving end by using the method shown in fig. 1, the receiving end correspondingly receives the encrypted data and the random number m sent by the sending end.
Continuing with the above example, if the encrypted data sent by the sender to the receiver is 000000430000004C and the random number m sent is 16, the receiver receives the encrypted data 000000430000004C and the random number 16 accordingly.
S202: dividing received encrypted data into a plurality of units by adopting a specified dividing method, wherein the specified dividing method comprises the following steps: dividing every n characters in the encrypted data into a unit, wherein n is a designated digit.
Wherein, the designated bit n is predetermined by the transmitting end and the receiving end.
Continuing with the above example, since the designated number n of bits agreed in advance by the sender and the receiver is 8, after the receiver receives the encrypted data 000000430000004C, the receiver divides each 8 bits of the encrypted data into one unit, and divides the unit into two units, namely 00000043 and 0000004C.
S203: for each divided cell, all characters contained in the cell are taken as an m-ary number, the m-ary number is converted into a decimal number, and an ASCII value is determined as the character of the decimal number.
Since the receiving end has received the random number m transmitted from the transmitting end, for each divided unit, all characters contained in the unit can be regarded as an m-ary number, and converted into a decimal number, and then the ASCII value is determined as the character of the decimal number.
Continuing with the above example, since the receiving end receives the random number 16 transmitted from the transmitting end, for the first divided cell 00000043, all the characters contained in the first cell are regarded as a 16-ary number, that is, 00000043 is regarded as a 16-ary number, and the 16-ary number is converted into a decimal number of 67, and the receiving end can determine that the ASCII value is the character "C" of the converted decimal number 67 from the stored ASCII table.
Similarly, with respect to the divided second unit 0000004C, all the characters contained in the second unit are also regarded as a 16-ary number, that is, 0000004C is regarded as a 16-ary number, the 16-ary number is converted into a decimal number of 76, and the receiving end can determine that the ASCII value is the character of the converted decimal number 76 as the character "L" from the stored ASCII table.
S204: and the receiving end combines the characters determined respectively aiming at each divided unit to obtain the original data corresponding to the encrypted data.
After the receiving end determines the characters for each divided unit, the determined characters can be arranged according to the sequence of each unit in the encrypted data, and the original data corresponding to the encrypted data can be obtained.
Continuing with the above example, since in the received encrypted data 000000430000004C the first cell 00000043 is divided before and the second cell 0000004C after, and the character determined for the first cell is the character "C" and the character determined for the second cell is the character "L", the determined characters are arranged in the order of the cells in the encrypted data as follows: CL, the obtained "CL" is the original data corresponding to the encrypted data 000000430000004C.
As can be seen from the data receiving process shown in fig. 2, how the receiving end decrypts the received encrypted data completely depends on the random number m sent by the sending end, and the random number m is different, even though the encrypted data is different, the decrypted original data is also different, thereby improving the security of data transmission.
Specifically, the receiving end in step S203 divides the unit of the encrypted data, takes all the characters contained in each unit as an m-ary number and converts the m-ary number into a decimal number, and determines that the ASCII value is the pseudo code of the character of the decimal number as follows:
wherein, the parameter m in the pseudo code is the random number m received by the receiving end.
Preferably, in order to further improve the security of data transmission, after the sending end obtains the encrypted data to be sent, the method for sending the generated random number m and the encrypted data to be sent to the receiving end through step S104 shown in fig. 1 may be: the sending end sets the same mark for the random number m and the encrypted data to be sent respectively, sends the random number with the mark to the receiving end through a first communication link, and sends the encrypted data to be sent with the mark to the receiving end through a second communication link. Wherein the set indicia includes, but is not limited to, a timestamp.
That is, the same mark is set for the random number m and the obtained encryption string, and the random number m and the encryption string with the same mark are sent to the receiving end through different communication links, so that even if the random number m or the encryption string transmitted in a certain communication link is intercepted, the encryption algorithm can still be ensured not to be cracked, and the security of data transmission is further improved.
Correspondingly, when the sending end sets the same mark for the random number m and the encrypted string, and sends the random number m and the encrypted string to the receiving end through different communication links, as shown in fig. 2, the method for the receiving end to receive the encrypted data sent by the sending end and the random number m corresponding to the encrypted data in step S201 is specifically as follows: and the receiving end receives the encrypted data (namely the encrypted string) sent by the sending end through the second communication link, determines the marks set in the received encrypted data, and selects a random number with the set mark being the same as the mark set in the encrypted data from the random numbers received through the first communication link as a received random number m corresponding to the encrypted data.
In addition, the method for the sending end to send the generated random number m and the encrypted data to be sent to the receiving end through the step S104 may also be: and the sending end inserts the random number m into the position appointed in advance in the encrypted data to be sent according to the position appointed in advance with the receiving end, and sends the encrypted data to be sent into which the random number m is inserted to the receiving end.
Correspondingly, when the sending end inserts the random number m into the pre-determined position in the encrypted data to be sent and sends the random number m to the receiving end, as shown in fig. 2, the method for the receiving end to receive the encrypted data sent by the sending end and the random number m corresponding to the encrypted data in step S201 is specifically as follows: the receiving end receives encrypted data (namely the encrypted data to be sent) sent by the sending end, and extracts a random number m corresponding to the encrypted data at a position appointed in advance in the encrypted data according to the position appointed in advance with the sending end. At this time, the method for dividing the encrypted data by the receiving end in step S202 specifically includes: and dividing the encrypted data after the random number m is extracted into a plurality of units by adopting a specified dividing method.
Continuing with the above example, assuming that the position agreed with the receiving end in advance is the first 2 bits, after the transmitting end obtains 000000430000004C of the encrypted string (encrypted data to be transmitted), the random number 16 may be inserted into the first 2 bits of the encrypted string, and the encrypted string with the random number 16 inserted is: 16000000430000004C, the transmitter transmits the encrypted string 16000000430000004C with the random number 16 inserted therein to the receiver.
When the receiving end receives the encrypted data (the above-mentioned encryption string) 16000000430000004C into which the random number is inserted, the first 2 bits in the encrypted data are extracted as the random number corresponding to the encrypted data based on the position (the first 2 bits) previously agreed with the transmitting end, and the extracted first 2 bits are 16. The encrypted data after the first 2 bits are extracted is 000000430000004C, so the receiving end adopts a specified method to divide the encrypted data 000000430000004C after the random number 16 is extracted into a plurality of units and continues to perform the subsequent steps.
Based on the same inventive concept, the embodiments of the present invention further provide a data transmission apparatus and a data reception apparatus, as shown in fig. 3 and fig. 4.
Fig. 3 is a schematic structural diagram of a data transmission apparatus according to an embodiment of the present invention, which specifically includes:
a generating module 301, configured to generate a random number m;
a conversion module 302, configured to, for each character in data to be transmitted, convert an ASCII value of the character into an m-ary number of a specified number of bits;
the combining module 303 is configured to combine the m-ary numbers of the designated digits converted for each character to obtain encrypted data to be sent;
a sending module 304, configured to send the random number m and the encrypted data to be sent to a receiving end.
The conversion module 302 is specifically configured to, for each character in data to be transmitted, convert an ASCII value of the character into an m-ary number, and when the number of bits of the converted m-ary number is less than a specified number of bits, complement 0 before the converted m-ary number, so that the number of bits of the m-ary number after 0 complementation reaches the specified number of bits, where the specified number of bits is not less than 8.
The sending module 304 is specifically configured to set the same flag for the random number m and the encrypted data to be sent respectively, send the random number m with the flag set to a receiving end through a first communication link, and send the encrypted data to be sent with the flag set to the receiving end through a second communication link; or, according to a position predetermined with a receiving end, inserting the random number m into a predetermined position in the encrypted data to be sent, and sending the encrypted data to be sent into which the random number m is inserted to the receiving end.
Fig. 4 is a schematic structural diagram of a data receiving device according to an embodiment of the present invention, which specifically includes:
a receiving module 401, configured to receive encrypted data sent by a sending end and a random number m corresponding to the encrypted data;
a dividing module 402, configured to divide the received encrypted data into a plurality of units by using a specified dividing method, where the specified dividing method is: dividing every n characters in the encrypted data into a unit, wherein n is a designated digit;
a conversion module 403 for, for each divided unit, taking all characters contained in the unit as an m-ary number, converting the m-ary number into a decimal number, and determining an ASCII value as a character of the converted decimal number;
and a combining module 404, configured to combine the characters determined for each divided unit, to obtain original data corresponding to the encrypted data.
The receiving module 401 is specifically configured to receive, through the second communication link, the encrypted data sent by the sending end, determine a flag set in the received encrypted data, and select, from the random numbers received through the first communication link, a random number whose set flag is the same as the flag set in the encrypted data, as a received random number m corresponding to the encrypted data.
The receiving module 401 is specifically configured to receive encrypted data sent by a sending end, and extract a random number m corresponding to the encrypted data at a position agreed in advance in the encrypted data according to a position agreed in advance with the sending end;
the dividing module 402 is specifically configured to divide the encrypted data after the random number m is extracted into a plurality of units by using a specified dividing method.
The embodiment of the invention provides a method and a device for data transmission. In the embodiment of the invention, each time the sending end encrypts the data to be sent, the ASCII value of each character in the data to be sent is converted into the random m-ary number, so that even when a plurality of same data to be sent are sent, the results obtained after encrypting the plurality of data to be sent are different, thereby effectively reducing the risk of cracking the encryption algorithm and improving the safety of data transmission.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A method of data transmission, comprising:
a sending end generates a random number m; and are
For each character in data to be transmitted, converting the ASCII value of the character into an m-ary number with a specified number of digits; and
combining the m-system numbers of the designated digits converted respectively for each character to obtain encrypted data to be sent;
the sending end sends the random number m and the encrypted data to be sent to a receiving end;
the sending end sends the random number m and the encrypted data to be sent to a receiving end, and specifically includes:
the sending end inserts the random number m into a pre-agreed position in the encrypted data to be sent according to the pre-agreed position with the receiving end, and sends the encrypted data to be sent into which the random number m is inserted to the receiving end; or,
the sending end sets the same marks for the random number m and the encrypted data to be sent respectively, sends the random number m with the marks to the receiving end through a first communication link, and sends the encrypted data to be sent with the marks to the receiving end through a second communication link.
2. The method of claim 1, wherein converting the ASCII value of the character to an m-ary number of specified digits comprises:
and converting the ASCII value of the character into an m-ary number, and supplementing 0 before the converted m-ary number when the number of digits of the converted m-ary number is less than a designated number of digits so that the number of digits of the m-ary number after 0 supplementation reaches the designated number of digits, wherein the designated number of digits is not less than 8.
3. A method of data reception, comprising:
a receiving end receives encrypted data sent by a sending end and a random number m corresponding to the encrypted data; and are
Dividing the received encrypted data into a plurality of units by adopting a specified dividing method, wherein the specified dividing method comprises the following steps: dividing every n characters in the encrypted data into a unit, wherein n is a designated digit; and
for each divided cell, treating all characters contained in the cell as an m-ary number, converting the m-ary number into a decimal number, and determining an ASCII value as the character of the converted decimal number;
the receiving end combines the characters determined respectively aiming at each divided unit to obtain original data corresponding to the encrypted data;
the receiving end receives encrypted data sent by the sending end and a random number m corresponding to the encrypted data, and the method specifically includes:
the receiving end receives the encrypted data sent by the sending end through a second communication link; and are
Determining a flag set in the received encrypted data; and
selecting a random number with a set flag identical to the flag set in the encrypted data, from among random numbers received through a first communication link, as a received random number m corresponding to the encrypted data; or,
the receiving end receives the encrypted data sent by the sending end; and are
And extracting a random number m corresponding to the encrypted data from a position appointed in advance in the encrypted data according to the position appointed in advance with the transmitting end.
4. The method of claim 3, wherein the dividing the received encrypted data into a plurality of units by using a specified dividing method specifically comprises:
and dividing the encrypted data after the random number m is extracted into a plurality of units by adopting a specified dividing method.
5. An apparatus for data transmission, comprising:
a generation module for generating a random number m;
the conversion module is used for converting the ASCII value of each character in the data to be transmitted into an m-ary number with a specified number of digits;
the combination module is used for combining the m-system numbers of the designated digits converted respectively aiming at each character to obtain encrypted data to be sent;
the sending module is used for inserting the random number m into a preset position in the encrypted data to be sent according to a position appointed with a receiving end in advance, and sending the encrypted data to be sent into which the random number m is inserted to the receiving end; or, the same mark is set for the random number m and the encrypted data to be sent respectively, the random number m with the mark set is sent to a receiving end through a first communication link, and the encrypted data to be sent with the mark set is sent to the receiving end through a second communication link.
6. The apparatus according to claim 5, wherein the conversion module is specifically configured to, for each character in the data to be transmitted, convert the ASCII value of the character into an m-ary number, and when the number of bits of the converted m-ary number is less than a specified number of bits, complement 0 before the converted m-ary number, so that the number of bits of the m-ary number after 0 complementation reaches the specified number of bits, where the specified number of bits is not less than 8.
7. An apparatus for data reception, comprising:
a receiving module, configured to receive encrypted data sent by a sending end and a random number m corresponding to the encrypted data;
a dividing module, configured to divide the received encrypted data into a plurality of units by using a specified dividing method, where the specified dividing method is: dividing every n characters in the encrypted data into a unit, wherein n is a designated digit;
a conversion module for, for each of the divided units, taking all the characters contained in the unit as an m-ary number, converting the m-ary number into a decimal number, and determining an ASCII value as a character of the converted decimal number;
the combination module is used for combining the characters determined respectively aiming at each divided unit to obtain original data corresponding to the encrypted data;
the receiving module is specifically configured to receive, through a second communication link, encrypted data sent by the sending end, determine a flag set in the received encrypted data, and select, from among random numbers received through a first communication link, a random number whose set flag is the same as a flag set in the encrypted data, as a received random number m corresponding to the encrypted data; or receiving encrypted data sent by a sending end, and extracting a random number m corresponding to the encrypted data at a position appointed in advance in the encrypted data according to a position appointed in advance with the sending end.
8. The apparatus according to claim 7, wherein the dividing module is specifically configured to divide the encrypted data after the random number m is extracted into a plurality of units by using a specified dividing method.
CN201210461232.8A 2012-11-15 2012-11-15 A kind of method and device of data transmission Active CN103067162B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210461232.8A CN103067162B (en) 2012-11-15 2012-11-15 A kind of method and device of data transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210461232.8A CN103067162B (en) 2012-11-15 2012-11-15 A kind of method and device of data transmission

Publications (2)

Publication Number Publication Date
CN103067162A CN103067162A (en) 2013-04-24
CN103067162B true CN103067162B (en) 2016-08-03

Family

ID=48109633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210461232.8A Active CN103067162B (en) 2012-11-15 2012-11-15 A kind of method and device of data transmission

Country Status (1)

Country Link
CN (1) CN103067162B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103441841B (en) * 2013-08-08 2016-06-22 唐山松下产业机器有限公司 A kind of welding data is from encrypting and decrypting system and method
CN105187192B (en) * 2015-09-08 2018-11-13 广州六米网络科技有限公司 The method for improving data transmission security in a computer network
CN105262769A (en) * 2015-11-04 2016-01-20 宁波亿拍客网络科技有限公司 Main-auxiliary cooperation communication method
CN105721882B (en) * 2016-04-18 2021-01-05 上海泥娃通信科技有限公司 Method for separating coding and decoding
CN107463542B (en) * 2017-08-08 2023-10-20 郭铮铮 Method for representing binary number by using ASCII (ASCII) to print characters
CN107786331B (en) * 2017-09-28 2020-03-17 平安普惠企业管理有限公司 Data processing method, device, system and computer readable storage medium
CN108616515A (en) * 2018-04-09 2018-10-02 华北水利水电大学 A kind of processing method of enterprise communication information
CN109286493A (en) * 2018-11-27 2019-01-29 浙江万朋教育科技股份有限公司 It is a kind of that ip in local area network is generated into 6 random character encipher-decipher methods
CN111324897B (en) * 2018-12-13 2022-08-09 中国科学院深圳先进技术研究院 Image encryption method and device and image decryption method and device
CN112333204B (en) * 2020-11-29 2023-04-07 国网辽宁省电力有限公司电力科学研究院 5G network transmission security device based on TCP IP protocol disorder feature code
CN114189554B (en) * 2021-11-17 2023-09-15 中国兵器工业计算机应用技术研究所 Information interaction method, device and readable storage medium
CN114553511A (en) * 2022-02-14 2022-05-27 山东浪潮通软信息科技有限公司 Data security transmission method, equipment and medium based on industrial production
CN115296887B (en) * 2022-08-02 2023-11-17 中国电子科技集团公司信息科学研究院 Data transmission method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988441A (en) * 2005-12-21 2007-06-27 中国银联股份有限公司 Data safety transmission method
CN101621390A (en) * 2008-07-01 2010-01-06 中兴通讯股份有限公司 Protection method and system thereof for data download service in broadcast multicast
WO2010146715A1 (en) * 2009-06-19 2010-12-23 富士通株式会社 Data transfer method, code conversion circuit, and device
CN102043801A (en) * 2009-10-16 2011-05-04 无锡华润上华半导体有限公司 Inter-database data interaction method and system, database of transmitter and database of receiver

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101192926B (en) * 2006-11-28 2011-03-30 北京握奇数据系统有限公司 Account protection method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988441A (en) * 2005-12-21 2007-06-27 中国银联股份有限公司 Data safety transmission method
CN101621390A (en) * 2008-07-01 2010-01-06 中兴通讯股份有限公司 Protection method and system thereof for data download service in broadcast multicast
WO2010146715A1 (en) * 2009-06-19 2010-12-23 富士通株式会社 Data transfer method, code conversion circuit, and device
CN102043801A (en) * 2009-10-16 2011-05-04 无锡华润上华半导体有限公司 Inter-database data interaction method and system, database of transmitter and database of receiver

Also Published As

Publication number Publication date
CN103067162A (en) 2013-04-24

Similar Documents

Publication Publication Date Title
CN103067162B (en) A kind of method and device of data transmission
CN109510703B (en) Data encryption and decryption method and device
CN102546181B (en) Cloud storage encrypting and deciphering method based on secret key pool
CN107086915B (en) Data transmission method, data sending end and data receiving end
US8942371B2 (en) Method and system for a symmetric block cipher using a plurality of symmetric algorithms
CN102437910A (en) Data encryption/decryption checking method and system
CN113904808B (en) Private key distribution and decryption method, device, equipment and medium
CN103368975B (en) A kind of method and system of batch data safe transmission
CN103905187A (en) Network communication encryption method based on contents
CN105024807A (en) Data processing method and system
CN104038339A (en) Method for encrypting file or communication message by use of multiple password algorithms and multiple keys
CN104378196A (en) Method and device for safely executing encryption and decryption algorithm
CN104396182A (en) Method of encrypting data
CN105099653A (en) Distributed data processing method, device and system
CN113726725A (en) Data encryption and decryption method and device, electronic equipment and storage medium
CN103561024A (en) Data transmission method based on weighing instrument and remote server
CN106789053A (en) Random ciphertext generation method and system, decryption method and system
CN108141353B (en) Method and equipment for upgrading cryptographic algorithm
CN109450642A (en) The treating method and apparatus of network ciphertext data
CN102394746B (en) Data transmission method of weighing system based on digital sensor
CN110889695A (en) Method and device for saving and recovering private data based on secure multi-party computing
CN103117850A (en) Cryptosystem based on random sequence database
CN104113410A (en) Method and device for data encryption transmission based on multi-table encryption method
CN111740831B (en) Electric power data encryption transmission method, system and readable medium for multiplex and production detection
KR20140078917A (en) Apparatas and method for security message transmission and reception of vehicle network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant