[go: up one dir, main page]

CN103905187B - A kind of network service encryption method based on content - Google Patents

A kind of network service encryption method based on content Download PDF

Info

Publication number
CN103905187B
CN103905187B CN201210575050.3A CN201210575050A CN103905187B CN 103905187 B CN103905187 B CN 103905187B CN 201210575050 A CN201210575050 A CN 201210575050A CN 103905187 B CN103905187 B CN 103905187B
Authority
CN
China
Prior art keywords
encryption
algorithm
key
data
byte
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
CN201210575050.3A
Other languages
Chinese (zh)
Other versions
CN103905187A (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.)
Xiamen Yaxon Zhilian Technology Co Ltd
Original Assignee
Xiamen Yaxon Networks 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 Xiamen Yaxon Networks Co Ltd filed Critical Xiamen Yaxon Networks Co Ltd
Priority to CN201210575050.3A priority Critical patent/CN103905187B/en
Publication of CN103905187A publication Critical patent/CN103905187A/en
Application granted granted Critical
Publication of CN103905187B publication Critical patent/CN103905187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)
  • Computer And Data Communications (AREA)

Abstract

一种基于内容的网络通信加密方法,在发送端和接收端分别设置对称加密算法,而后步骤如下:1)发送端根据本次待发送数据中的内容来确定加密算法因数,然后通过该加密算法因数来选择本次加密算法和对应算法的密钥所需的最少字节数N,再计算得到本次加密密钥;2)发送端使用本次加密算法和本次加密密钥对本次待发送数据中进行加密得到本次加密数据,生成本次通信密文并发送;3)接收端接收本次通信密文得到对应的解密算法因数和待解密数据,进行对应的解密生成本次通信明文。本发明根据待发送数据的内容计算选择所采用的加密算法编号、采用的密钥等,不需要传输额外的密钥信息、简单快捷、安全性高。A content-based network communication encryption method, in which a symmetric encryption algorithm is set at the sending end and the receiving end respectively, and then the steps are as follows: 1) The sending end determines the encryption algorithm factor according to the content of the data to be sent this time, and then passes the encryption algorithm factor to select the encryption algorithm and the minimum number of bytes N required for the key of the corresponding algorithm, and then calculate the encryption key; 2) The sender uses the encryption algorithm and the encryption key Encrypt the sent data to get the encrypted data, generate the ciphertext of this communication and send it; 3) The receiving end receives the ciphertext of this communication to obtain the corresponding decryption algorithm factor and the data to be decrypted, and performs corresponding decryption to generate the plaintext of this communication . The present invention calculates and selects the number of the encryption algorithm used, the key used, etc. according to the content of the data to be sent, does not need to transmit additional key information, is simple, quick and has high security.

Description

一种基于内容的网络通信加密方法A Content-Based Network Communication Encryption Method

技术领域technical field

本发明涉及网络的数据安全传输领域,特别是一种基于内容的网络通信加密方法。The invention relates to the field of network data security transmission, in particular to a content-based network communication encryption method.

背景技术Background technique

目前常用的的加密通信方法有很多种,根据密钥类型的不同可以大概分为两大类,对称加密(私密钥匙加密)通信和非对称加密(公开密钥加密)通信。There are many encryption communication methods commonly used at present, which can be roughly divided into two categories according to the type of key, symmetric encryption (private key encryption) communication and asymmetric encryption (public key encryption) communication.

对称加密通信时加密和解密均采用相同的密钥,即加密密钥也可以作为解密密钥,对称加密通信使用起来简单快捷,但是缺点也比较明显,需要传输额外的密钥信息,容易被黑客在中间拦截,并解密数据。The same key is used for encryption and decryption in symmetric encryption communication, that is, the encryption key can also be used as the decryption key. Symmetric encryption communication is simple and fast to use, but the disadvantages are also obvious. Additional key information needs to be transmitted, which is easy to be hacked Intercept in the middle, and decrypt the data.

非对称加密通信需要两个密钥,公开密钥和私有密钥,公开密钥与私有密钥是一对,如果使用公开密钥对数据进行加密,只有用对应的私有密钥才能解密;如果使用私有密钥对数据进行加密,那么只有用对应的公开密钥才能解密。非对称加密安全性高,在加密数据传输过程中,不传输密钥,所以即使数据被中途拦截,没有密钥也无法解开数据,缺点是速度慢,加密后的密文较长。Asymmetric encrypted communication requires two keys, a public key and a private key. The public key and the private key are a pair. If the public key is used to encrypt data, only the corresponding private key can be used to decrypt it; if Data is encrypted using a private key, which can only be decrypted with the corresponding public key. Asymmetric encryption is highly secure. During the transmission of encrypted data, the key is not transmitted, so even if the data is intercepted midway, the data cannot be unlocked without the key. The disadvantage is that the speed is slow and the encrypted ciphertext is longer.

发明内容Contents of the invention

本发明的主要目的在于克服现有技术中采用对称加密通信需额外传输密钥且容易被拦截,安全性不够高,采用非对称加密通信速度慢,加密后的密文较长的缺点,提出一种采用对称加密的基于内容的网络通信加密方法。The main purpose of the present invention is to overcome the disadvantages in the prior art that an additional transmission key is required for communication using symmetric encryption and is easy to be intercepted, the security is not high enough, the speed of communication using asymmetric encryption is slow, and the encrypted ciphertext is longer. A content-based network communication encryption method using symmetric encryption.

本发明采用如下技术方案:The present invention adopts following technical scheme:

一种基于内容的网络通信加密方法,其特征在于:在发送端设置A种加密算法以及每种加密算法的密钥所需的最少字节数,在接收端对应设置A种解密算法和每种解密算法的密钥所需的最少字节数,而后步骤如下:A content-based network communication encryption method is characterized in that: A kind of encryption algorithm and the minimum number of bytes required by the key of each encryption algorithm are set at the sending end, and A kind of decryption algorithm and each kind of decryption algorithm are correspondingly set at the receiving end. The minimum number of bytes required to decrypt the key of the algorithm, then the steps are as follows:

1)发送端根据本次待发送数据中的部分数据来确定加密算法因数,然后通过该加密算法因数来选择本次加密算法和对应算法的密钥所需的最少字节数N,根据加密算法因数和最少字节数N计算得到本次加密密钥;1) The sender determines the encryption algorithm factor based on part of the data to be sent this time, and then uses the encryption algorithm factor to select the encryption algorithm and the minimum number of bytes N required for the key of the corresponding algorithm. According to the encryption algorithm The encryption key is obtained by calculating the factor and the minimum number of bytes N;

2)发送端使用本次加密算法和本次加密密钥对本次待发送数据中的另一部分数据进行加密得到本次加密数据,根据加密算法因数和本次加密数据生成本次通信密文,将本次通信密文通过网络发送至接收端;2) The sender uses this encryption algorithm and this encryption key to encrypt another part of the data to be sent this time to obtain this encrypted data, and generates this communication ciphertext according to the encryption algorithm factor and this encrypted data, Send the ciphertext of this communication to the receiving end through the network;

3)接收端接收本次通信密文得到对应的解密算法因数和待解密数据,通过该解密算法因数来确定本次解密算法和对应算法的密钥所需的最少字节数N,而后再根据解密算法因数和最少字节数N进行计算得到本次解密密钥,使用本次解密密钥和本次解密算法对待解密数据进行解密得到本次解密数据,根据解密算法因数和本次解密数据生成本次通信明文。3) The receiving end receives the ciphertext of this communication to obtain the corresponding decryption algorithm factor and the data to be decrypted. The decryption algorithm factor is used to determine the minimum number of bytes N required for the decryption algorithm and the key of the corresponding algorithm, and then according to The decryption algorithm factor and the minimum number of bytes N are calculated to obtain the decryption key, and the decrypted data is decrypted using the decryption key and the decryption algorithm to obtain the decrypted data, which is generated according to the decryption algorithm factor and the decrypted data The plaintext of this communication.

进一步的,在步骤1)中,发送端取本次待发送数据的某个字节的数字作为加密算法因数。Further, in step 1), the sending end takes the number of a certain byte of the data to be sent this time as the encryption algorithm factor.

进一步的,所述加密算法为对称加密算法,所述解密算法为与所述加密算法相同的对称解密算法。Further, the encryption algorithm is a symmetric encryption algorithm, and the decryption algorithm is the same symmetric decryption algorithm as the encryption algorithm.

进一步的,在发送端和接收端中分别对A种加密算法和A种解密算法依次进行编号,且加密算法和解密算法编号为一一对应。Further, the encryption algorithm of type A and the decryption algorithm of type A are numbered sequentially in the sending end and the receiving end respectively, and the numbers of the encryption algorithm and the decryption algorithm are in one-to-one correspondence.

进一步的,在步骤1)中,发送端取本次待发送数据的第1个字节的数字作为加密算法因数。Further, in step 1), the sender takes the number of the first byte of the data to be sent this time as the encryption algorithm factor.

进一步的,在步骤1)中,发送端将加密算法因数除以A后取余数,将余数加1得到本次网络通信所采用的加密算法编号,根据该加密算法编号读取相应编号的加密算法得到本次加密算法和对应算法的密钥所需的最少字节数N。Further, in step 1), the sender divides the encryption algorithm factor by A and takes the remainder, adds 1 to the remainder to obtain the encryption algorithm number used in this network communication, and reads the corresponding numbered encryption algorithm according to the encryption algorithm number Obtain the minimum number of bytes N required for this encryption algorithm and the key of the corresponding algorithm.

进一步的,在步骤1)中,发送端将加密算法因数减1后的绝对值除以256,取余数得到本次加密密钥的第1个字节;将加密算法因数减2后的绝对值除以256,取余数得到本次加密密钥的第2个字节;依次类推,将加密算法因数减N后的绝对值除以256,取余数得到本次加密密钥的第N个字节;由此计算出本次加密密钥的第1个到第N个字节得到本次加密密钥。Further, in step 1), the sender divides the absolute value of the encryption algorithm factor minus 1 by 256, and takes the remainder to obtain the first byte of the encryption key; the absolute value of the encryption algorithm factor minus 2 Divide by 256, take the remainder to get the second byte of the encryption key; and so on, divide the absolute value of the encryption algorithm factor minus N by 256, take the remainder to get the Nth byte of the encryption key ; From this, calculate the first to Nth bytes of this encryption key to obtain this encryption key.

进一步的,在步骤2)中,发送端从本次待发送数据中取出第2个字节到最后1个字节之间的数据得到待加密数据,然后使用本次加密密钥和本次加密方法对该待加密数据进行加密得到本次加密数据。Further, in step 2), the sender extracts the data between the second byte and the last byte from the data to be sent this time to obtain the data to be encrypted, and then uses the encryption key of this time and the encryption key of this time The method encrypts the data to be encrypted to obtain the encrypted data.

进一步的,在步骤2)中,发送端生成的本次通信密文的第1个字节是加密算法因数,第2个字节至最后1个字节为本次加密数据。Further, in step 2), the first byte of the current communication ciphertext generated by the sender is the encryption algorithm factor, and the second byte to the last byte are the encrypted data of this time.

进一步的,在步骤3)中,接收端读取本次通信密文的第1个字节的数得到解密算法因数,并将该解密算法因数除以A取余数,将余数加1得到解密算法编号和对应算法的密钥所需的最少字节数N。Further, in step 3), the receiving end reads the number of the first byte of the communication ciphertext to obtain the decryption algorithm factor, divides the decryption algorithm factor by A to obtain the remainder, and adds 1 to the remainder to obtain the decryption algorithm Number and the minimum number of bytes N required for the key of the corresponding algorithm.

进一步的,在步骤3)中,接收端将解密算法因数减1的绝对值除以256,取余数得到本次解密密钥的第1个字节;接收端将解密算法因数减2的绝对值除以256,取余数得到本次解密密钥的第2个字节;依次类推,接收端将解密算法因数减N的绝对值除以256,取余数得到本次解密密钥的第N个字节;由此计算出本次解密密钥的第1到第N个字节得到本次解密密钥。Further, in step 3), the receiving end divides the absolute value of the decryption algorithm factor minus 1 by 256, and takes the remainder to obtain the first byte of the decryption key; the receiving end subtracts the absolute value of the decryption algorithm factor by 2 Divide by 256, take the remainder to get the second byte of the decryption key; and so on, the receiver divides the absolute value of the decryption algorithm factor minus N by 256, and take the remainder to get the Nth byte of the decryption key section; thus calculate the 1st to Nth bytes of the decryption key to obtain the decryption key this time.

进一步的,在步骤3)中,接收端从本次通信密文中取出第2个字节到最后1个字节之间的数据得到待解密数据,并使用本次解密密钥和本次解密算法对待解密数据进行解密得到本次解密数据。Further, in step 3), the receiving end extracts the data between the second byte and the last byte from the ciphertext of this communication to obtain the data to be decrypted, and uses the decryption key and the decryption algorithm of this time Decrypt the data to be decrypted to obtain the decrypted data.

进一步的,在步骤3)中,本次通信明文的第1个字节数是解密算法因数,第2个字节至最后1个字节是本次解密数据。Further, in step 3), the first byte of the plaintext of this communication is the factor of the decryption algorithm, and the second byte to the last byte are the decrypted data of this time.

由上述对本发明的描述可知,与现有技术相比,本发明具有如下有益效果:As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following beneficial effects:

本发明的一种基于内容的网络通信加密方法,采用对称加密算法根据数据内容进行加密和解密,在发送端和接收端分别预先设置多种一一对应的对称加密算法并进行编号,根据待发送数据的内容计算选择所采用的加密算法编号、采用的密钥等,不需要传输额外的密钥信息、简单快捷、安全性高。A content-based network communication encryption method of the present invention adopts a symmetric encryption algorithm to encrypt and decrypt data according to the content of the data. A variety of one-to-one corresponding symmetric encryption algorithms are preset and numbered at the sending end and the receiving end respectively. The data content calculation selects the encryption algorithm number used, the key used, etc., without the need to transmit additional key information, which is simple, fast, and highly secure.

具体实施方式Detailed ways

以下通过具体实施方式对本发明作进一步的描述。The present invention will be further described below through specific embodiments.

一种基于内容的网络通信加密方法,在发送端设置8种对称加密算法以及每种对称加密算法的密钥所需的最少字节数N,进行编号①、②、③、④、⑤、⑥、⑦、⑧;在接收端对应设置8种与发送端的对称加密算法相同的对称解密算法和每种解密算法的密钥所需的最少字节数N,进行编号①、②、③、④、⑤、⑥、⑦、⑧,同一种算法的编号与发送端保持一致,而后步骤如下:A content-based network communication encryption method, setting 8 kinds of symmetric encryption algorithms and the minimum number of bytes N required for the key of each symmetric encryption algorithm at the sending end, and numbering ①, ②, ③, ④, ⑤, ⑥ , ⑦, ⑧; 8 kinds of symmetric decryption algorithms that are the same as the symmetric encryption algorithm of the sender and the minimum number of bytes N required for the key of each decryption algorithm are correspondingly set at the receiving end, and numbered ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, the number of the same algorithm is consistent with that of the sender, and the steps are as follows:

1)发送端取本次待发送数据的第1个字节的数字作为加密算法因数,然后将加密算法因数除以8后取余数,将余数加1得到本次网络通信所采用的加密算法编号,根据该加密算法编号读取相应编号的加密算法得到本次加密算法和对应算法的密钥所需的最少字节数N。1) The sender takes the number of the first byte of the data to be sent this time as the encryption algorithm factor, then divides the encryption algorithm factor by 8 and takes the remainder, and adds 1 to the remainder to obtain the encryption algorithm number used in this network communication , according to the encryption algorithm number, read the corresponding numbered encryption algorithm to obtain the minimum number of bytes N required for this encryption algorithm and the key of the corresponding algorithm.

而后,发送端将加密算法因数减1后的绝对值除以256,取余数得到本次加密密钥的第1个字节;将加密算法因数减2后的绝对值除以256,取余数得到本次加密密钥的第2个字节;依次类推,将加密算法因数减N后的绝对值除以256,取余数得到本次加密密钥的第N个字节;由此计算出本次加密密钥的第1个到第N个字节得到本次加密密钥。Then, the sender divides the absolute value of the encryption algorithm factor minus 1 by 256, and takes the remainder to obtain the first byte of the encryption key; divides the absolute value of the encryption algorithm factor minus 2 by 256, and takes the remainder to get The second byte of this encryption key; and so on, divide the absolute value of the encryption algorithm factor minus N by 256, and take the remainder to get the Nth byte of this encryption key; thus calculate this time The 1st to Nth bytes of the encryption key get the current encryption key.

2)发送端从本次待发送数据中取出第2个字节到最后1个字节之间的数据得到待加密数据,然后使用本次加密密钥和本次加密方法对该待加密数据进行加密得到本次加密数据,根据加密算法因数和本次加密数据生成本次通信密文,该本次通信密文的第1个字节是加密算法因数,第2个字节至最后1个字节为本次加密数据,将本次通信密文通过网络发送至接收端。2) The sender takes out the data between the second byte and the last byte from the data to be sent this time to obtain the data to be encrypted, and then uses the encryption key and the encryption method of this time to encrypt the data to be encrypted Encrypt to get the encrypted data this time, and generate the communication ciphertext according to the encryption algorithm factor and the encrypted data this time, the first byte of the communication ciphertext is the encryption algorithm factor, the second byte to the last 1 word Section is the encrypted data of this time, and the ciphertext of this communication is sent to the receiving end through the network.

3)接收端读取本次通信密文的第1个字节的数得到解密算法因数,并将该解密算法因数除以8取余数,将余数加1得到解密算法编号和对应算法的密钥所需的最少字节数N。3) The receiving end reads the number of the first byte of the communication ciphertext to obtain the decryption algorithm factor, divides the decryption algorithm factor by 8 to get the remainder, and adds 1 to the remainder to obtain the decryption algorithm number and the key of the corresponding algorithm The minimum number of bytes N required.

接收端将解密算法因数减1的绝对值除以256,取余数得到本次解密密钥的第1个字节;接收端将解密算法因数减2的绝对值除以256,取余数得到本次解密密钥的第2个字节;依次类推,接收端将解密算法因数减N的绝对值除以256,取余数得到本次解密密钥的第N个字节;由此计算出本次解密密钥的第1到第N个字节得到本次解密密钥。The receiving end divides the absolute value of the decryption algorithm factor minus 1 by 256, and takes the remainder to obtain the first byte of the decryption key; the receiving end divides the absolute value of the decryption algorithm factor minus 2 by 256, and takes the remainder to obtain the current key. The second byte of the decryption key; and so on, the receiving end divides the absolute value of the decryption algorithm factor minus N by 256, and takes the remainder to obtain the Nth byte of the decryption key; thus, the decryption is calculated The 1st to Nth bytes of the key get the decryption key for this time.

接收端从本次通信密文中取出第2个字节到最后1个字节之间的数据得到待解密数据,并使用本次解密密钥和本次解密算法对待解密数据进行解密得到本次解密数据,根据解密算法因数和本次解密数据生成本次通信明文,本次通信明文的第1个字节数是解密算法因数,第2个字节至最后1个字节是本次解密数据。The receiving end takes the data between the second byte and the last byte from the ciphertext of this communication to obtain the data to be decrypted, and uses the decryption key and the decryption algorithm to decrypt the data to be decrypted to obtain the decryption Data, according to the decryption algorithm factor and the current decrypted data to generate the communication plaintext, the first byte of the communication plaintext is the decryption algorithm factor, and the second byte to the last byte is the current decryption data.

上述仅为本发明的一个具体实施方式,但本发明的设计构思并不局限于此,凡利用此构思对本发明进行非实质性的改动,均应属于侵犯本发明保护范围的行为。The above is only a specific embodiment of the present invention, but the design concept of the present invention is not limited thereto, and any insubstantial changes made to the present invention by using this concept should be an act of violating the protection scope of the present invention.

Claims (11)

1.一种基于内容的网络通信加密方法,其特征在于:在发送端设置A种加密算法并依次进行编号,以及每种加密算法的密钥所需的最少字节数,在接收端对应设置A种解密算法并依次进行编号,和每种解密算法的密钥所需的最少字节数,加密算法和解密算法编号为一一对应;而后步骤如下:1. A content-based network communication encryption method, characterized in that: A kind of encryption algorithm is set at the sending end and numbered sequentially, and the minimum number of bytes required for the key of each encryption algorithm is set correspondingly at the receiving end The decryption algorithm of type A is numbered in sequence, and the minimum number of bytes required for the key of each decryption algorithm, the encryption algorithm and the decryption algorithm number are in one-to-one correspondence; then the steps are as follows: 1)发送端根据本次待发送数据中的第一个字节来确定加密算法因数,然后通过该加密算法因数来选择本次加密算法和对应算法的密钥所需的最少字节数N,根据加密算法因数和最少字节数N计算得到本次加密密钥;1) The sending end determines the encryption algorithm factor according to the first byte in the data to be sent this time, and then selects the encryption algorithm and the minimum number of bytes N required by the key of the corresponding algorithm through the encryption algorithm factor, Calculate the encryption key according to the encryption algorithm factor and the minimum number of bytes N; 2)发送端使用本次加密算法和本次加密密钥对本次待发送数据中的另一部分数据进行加密得到本次加密数据,根据加密算法因数和本次加密数据生成本次通信密文,将本次通信密文通过网络发送至接收端;2) The sender uses the encryption algorithm and the encryption key to encrypt another part of the data to be sent this time to obtain the encrypted data, and generates the communication ciphertext according to the encryption algorithm factor and the encrypted data this time, Send the ciphertext of this communication to the receiving end through the network; 3)接收端接收本次通信密文得到对应的解密算法因数和待解密数据,通过该解密算法因数来确定本次解密算法和对应算法的密钥所需的最少字节数N,而后再根据解密算法因数和最少字节数N进行计算得到本次解密密钥,使用本次解密密钥和本次解密算法对待解密数据进行解密得到本次解密数据,根据解密算法因数和本次解密数据生成本次通信明文。3) The receiving end receives the ciphertext of this communication to obtain the corresponding decryption algorithm factor and the data to be decrypted, and determines the minimum number of bytes N required by the decryption algorithm and the key of the corresponding algorithm through the decryption algorithm factor, and then according to The decryption algorithm factor and the minimum number of bytes N are calculated to obtain the decryption key, and the decrypted data is decrypted using the decryption key and the decryption algorithm to obtain the decrypted data, which is generated according to the decryption algorithm factor and the decrypted data The plaintext of this communication. 2.如权利要求1所述的一种基于内容的网络通信加密方法,其特征在于:所述加密算法为对称加密算法,所述解密算法为与所述加密算法相同的对称解密算法。2. A content-based network communication encryption method according to claim 1, characterized in that: the encryption algorithm is a symmetric encryption algorithm, and the decryption algorithm is the same symmetric decryption algorithm as the encryption algorithm. 3.如权利要求2所述的一种基于内容的网络通信加密方法,其特征在于:在步骤1)中,发送端取本次待发送数据的第1个字节的数字作为加密算法因数。3. A content-based network communication encryption method as claimed in claim 2, characterized in that: in step 1), the sending end takes the number of the first byte of the data to be sent this time as the encryption algorithm factor. 4.如权利要求3所述的一种基于内容的网络通信加密方法,其特征在于:在步骤1)中发送端将加密算法因数除以A后取余数,将余数加1得到本次网络通信所采用的加密算法编号,根据该加密算法编号读取相应编号的加密算法得到本次加密算法和对应算法的密钥所需的最少字节数N。4. a kind of content-based network communication encryption method as claimed in claim 3, it is characterized in that: in step 1) in sending end, get remainder after dividing encryption algorithm factor by A, remainder adds 1 and obtains this network communication The number of the encryption algorithm used, according to the number of the encryption algorithm, read the encryption algorithm of the corresponding number to obtain the minimum number of bytes N required for the encryption algorithm and the key of the corresponding algorithm. 5.如权利要求3或4所述的一种基于内容的网络通信加密方法,其特征在于:在步骤1)中,发送端将加密算法因数减1后的绝对值除以256,取余数得到本次加密密钥的第1个字节;将加密算法因数减2后的绝对值除以256,取余数得到本次加密密钥的第2个字节;依次类推,将加密算法因数减N后的绝对值除以256,取余数得到本次加密密钥的第N个字节;由此计算出本次加密密钥的第1个到第N个字节得到本次加密密钥。5. a kind of content-based network communication encryption method as claimed in claim 3 or 4, is characterized in that: in step 1), sending end divides the absolute value after encryption algorithm factor minus 1 by 256, gets remainder to obtain The first byte of this encryption key; divide the absolute value of the encryption algorithm factor minus 2 by 256, and take the remainder to get the second byte of this encryption key; and so on, subtract N from the encryption algorithm factor The final absolute value is divided by 256, and the remainder is taken to obtain the Nth byte of the encryption key; thus, the first to N bytes of the encryption key are calculated to obtain the encryption key of this time. 6.如权利要求5所述的一种基于内容的网络通信加密方法,其特征在于:在步骤2)中,发送端从本次待发送数据中取出第2个字节到最后1个字节之间的数据得到待加密数据,然后使用本次加密密钥和本次加密方法对该待加密数据进行加密得到本次加密数据。6. a kind of content-based network communication encryption method as claimed in claim 5, is characterized in that: in step 2), sender takes out the 2nd byte to the last 1 byte from the data to be sent this time The data in between is obtained as the data to be encrypted, and then the data to be encrypted is encrypted by using the encryption key and the encryption method of this time to obtain the encrypted data this time. 7.如权利要求6所述的一种基于内容的网络通信加密方法,其特征在于:在步骤2)中,发送端生成的本次通信密文的第1个字节是加密算法因数,第2个字节至最后1个字节为本次加密数据。7. a kind of content-based network communication encryption method as claimed in claim 6, is characterized in that: in step 2), the 1st byte of this communication ciphertext that sender generates is encryption algorithm factor, the 1st byte 2 bytes to the last 1 byte are the encrypted data this time. 8.如权利要求6或7所述的一种基于内容的网络通信加密方法,其特征在于:在步骤3)中,接收端读取本次通信密文的第1个字节的数得到解密算法因数,并将该解密算法因数除以A取余数,将余数加1得到解密算法编号和对应算法的密钥所需的最少字节数N。8. a kind of content-based network communication encryption method as claimed in claim 6 or 7, it is characterized in that: in step 3), the receiving end reads the number of the 1st byte of this communication ciphertext and obtains decryption Algorithm factor, divide the decryption algorithm factor by A to get the remainder, and add 1 to the remainder to obtain the decryption algorithm number and the minimum number of bytes N required for the key of the corresponding algorithm. 9.如权利要求8所述的一种基于内容的网络通信加密方法,其特征在于:在步骤3)中,接收端将解密算法因数减1的绝对值除以256,取余数得到本次解密密钥的第1个字节;接收端将解密算法因数减2的绝对值除以256,取余数得到本次解密密钥的第2个字节;依次类推,接收端将解密算法因数减N的绝对值除以256取余数得到本次解密密钥的第N个字节;由此计算出本次解密密钥的第1到第N个字节得到本次解密密钥。9. A kind of network communication encryption method based on content as claimed in claim 8, it is characterized in that: in step 3), receiving end divides the absolute value of deciphering algorithm factor minus 1 by 256, gets remainder and obtains this deciphering The first byte of the key; the receiving end divides the absolute value of the decryption algorithm factor minus 2 by 256, and takes the remainder to obtain the second byte of the decryption key; and so on, the receiving end subtracts the decryption algorithm factor by N The absolute value of is divided by 256 and the remainder is obtained to obtain the Nth byte of the decryption key; thus, the 1st to Nth bytes of the decryption key are calculated to obtain the decryption key of this time. 10.如权利要求9所述的一种基于内容的网络通信加密方法,其特征在于:在步骤3)中,接收端从本次通信密文中取出第2个字节到最后1个字节之间的数据得到待解密数据,并使用本次解密密钥和本次解密算法对待解密数据进行解密得到本次解密数据。10. a kind of content-based network communication encryption method as claimed in claim 9, is characterized in that: in step 3) in, receiving end takes out the 2nd byte to last 1 byte from this communication ciphertext The data to be decrypted is obtained by using the decryption key and the decryption algorithm to decrypt the data to be decrypted to obtain the decrypted data. 11.如权利要求9或10所述的一种基于内容的网络通信加密方法,其特征在于:在步骤3)中,本次通信明文的第1个字节数是解密算法因数,第2个字节至最后1个字节是本次解密数据。11. a kind of content-based network communication encryption method as claimed in claim 9 or 10, it is characterized in that: in step 3) in, the 1st byte number of this communication plaintext is decryption algorithm factor, the 2nd The byte to the last byte is the decrypted data this time.
CN201210575050.3A 2012-12-26 2012-12-26 A kind of network service encryption method based on content Active CN103905187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210575050.3A CN103905187B (en) 2012-12-26 2012-12-26 A kind of network service encryption method based on content

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210575050.3A CN103905187B (en) 2012-12-26 2012-12-26 A kind of network service encryption method based on content

Publications (2)

Publication Number Publication Date
CN103905187A CN103905187A (en) 2014-07-02
CN103905187B true CN103905187B (en) 2018-04-03

Family

ID=50996344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210575050.3A Active CN103905187B (en) 2012-12-26 2012-12-26 A kind of network service encryption method based on content

Country Status (1)

Country Link
CN (1) CN103905187B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108768649A (en) * 2018-06-26 2018-11-06 苏州蜗牛数字科技股份有限公司 A kind of method and storage medium of dynamic encryption network data

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756717B (en) * 2014-10-16 2022-10-18 创新先进技术有限公司 Information processing method and device
CN104410616B (en) * 2014-11-20 2018-01-05 广州日滨科技发展有限公司 data encryption, decryption, transmission method and system
CN105072113B (en) * 2015-08-10 2018-07-24 南京邮电大学 A kind of wireless sensor network security guard method based on data packet dynamic encryption
CN105072125B (en) * 2015-08-26 2018-03-13 北京京东尚科信息技术有限公司 A kind of http communication system and method
CN105743917B (en) * 2016-04-05 2020-05-19 腾讯科技(深圳)有限公司 Message transmission method and terminal
CN108334786A (en) * 2017-11-19 2018-07-27 李朝玺 A kind of data ciphering method
CN108063756B (en) * 2017-11-21 2020-07-03 阿里巴巴集团控股有限公司 A key management method, device and device
CN108667599A (en) * 2018-05-21 2018-10-16 平安科技(深圳)有限公司 Encryption method, device, computer equipment and storage medium
CN109039605A (en) * 2018-08-15 2018-12-18 合肥云序科技有限公司 A kind of encryption method of network communication
CN109951501A (en) * 2019-05-07 2019-06-28 山东渔翁信息技术股份有限公司 A kind of network packet encryption method, decryption method and relevant apparatus
CN110138811B (en) * 2019-07-02 2021-07-30 重庆物源链科技有限公司 An encryption method for IoT data transmission
TWI823223B (en) * 2021-12-30 2023-11-21 新唐科技股份有限公司 Method and device for a secure data transmission

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101051892A (en) * 2007-03-14 2007-10-10 江中尧 Enciphering device and method for CPU special data
CN101388776A (en) * 2008-10-23 2009-03-18 武汉理工大学 Encryption and decryption method and device for printed document
CN101645773A (en) * 2008-08-05 2010-02-10 耶德托存取公司 Signcryption scheme based on elliptic curve cryptography
CN102129532A (en) * 2011-03-23 2011-07-20 阮晓迅 Method and system for digital copyright protection
CN102271037A (en) * 2010-06-03 2011-12-07 微软公司 Key protectors based on online keys
CN102404111A (en) * 2011-12-28 2012-04-04 王勇 Method for encrypting in sections by using uncertain encryption algorithm

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002141895A (en) * 2000-11-01 2002-05-17 Sony Corp Content distribution system and content distribution method
EP2039053B1 (en) * 2006-06-30 2018-05-23 Koninklijke Philips N.V. Method and apparatus for encrypting/decrypting data
US20100278338A1 (en) * 2009-05-04 2010-11-04 Mediatek Singapore Pte. Ltd. Coding device and method with reconfigurable and scalable encryption/decryption modules
US8675871B2 (en) * 2011-05-31 2014-03-18 International Business Machines Corporation Protecting a control vector in an optional block of a standard key block

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101051892A (en) * 2007-03-14 2007-10-10 江中尧 Enciphering device and method for CPU special data
CN101645773A (en) * 2008-08-05 2010-02-10 耶德托存取公司 Signcryption scheme based on elliptic curve cryptography
CN101388776A (en) * 2008-10-23 2009-03-18 武汉理工大学 Encryption and decryption method and device for printed document
CN102271037A (en) * 2010-06-03 2011-12-07 微软公司 Key protectors based on online keys
CN102129532A (en) * 2011-03-23 2011-07-20 阮晓迅 Method and system for digital copyright protection
CN102404111A (en) * 2011-12-28 2012-04-04 王勇 Method for encrypting in sections by using uncertain encryption algorithm

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108768649A (en) * 2018-06-26 2018-11-06 苏州蜗牛数字科技股份有限公司 A kind of method and storage medium of dynamic encryption network data

Also Published As

Publication number Publication date
CN103905187A (en) 2014-07-02

Similar Documents

Publication Publication Date Title
CN103905187B (en) A kind of network service encryption method based on content
US9379891B2 (en) Method and system for ID-based encryption and decryption
CN101188496B (en) A kind of short message encrypted transmission method
US7827408B1 (en) Device for and method of authenticated cryptography
CN105049401B (en) A kind of safety communicating method based on intelligent vehicle
CN102404111B (en) A kind of sectional encryption method adopting uncertain AES
CN102624522A (en) Key encryption method based on file attribution
CN102664740B (en) Remote-authorization-based bidding document encryption and decryption method
CN102333093A (en) Data encryption transmission method and system
CN102387152A (en) Preset-key-based symmetric encryption communication method
CN103155481A (en) Authenticated encryption for digital signatures with message recovery
CN107534558B (en) Method for protecting the information security of data transmitted via a data bus and data bus system
CN107249002B (en) Method, system and device for improving safety of intelligent electric energy meter
CN109005027A (en) A kind of random data encryption and decryption method, apparatus and system
CN104836657B (en) A kind of identity-based anonymity broadcast encryption method with efficient decryption features
CN105812128A (en) Malicious data mining attack-resisting data aggregation system and method for smart grid
CN113312608A (en) Electric power metering terminal identity authentication method and system based on timestamp
CN103561024A (en) Data transmission method based on weighing instrument and remote server
CN103117861B (en) Pseudo RSA (Rivest Shamir Adleman) based method for transmitting IBE key information (identity based encryption) in IBE
CN102271043B (en) Data transmission protection method
CN105376221A (en) Game message encryption mechanism based on dynamic password, and game system
CN102546152B (en) Method for achieving multi-stage encryption and decryption of data
CN107483387A (en) A kind of method of controlling security and device
CN116132047B (en) Decryption method and key unpacking method based on SM9 cryptographic algorithm
CN103873270B (en) Intelligent meter infrastructure network system and its message broadcasting method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 303-e, Zone C, innovation building, software park, torch hi tech Zone, Xiamen City, Fujian Province

Patentee after: Xiamen Yaxun Zhilian Technology Co.,Ltd.

Country or region after: China

Address before: No.46 guanri Road, phase II, software park, Xiamen City, Fujian Province, 361000

Patentee before: XIAMEN YAXON NETWORK Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address