CN115174152B - A group test authentication encryption method, verification and decryption method and communication method - Google Patents
A group test authentication encryption method, verification and decryption method and communication method Download PDFInfo
- Publication number
- CN115174152B CN115174152B CN202210644608.2A CN202210644608A CN115174152B CN 115174152 B CN115174152 B CN 115174152B CN 202210644608 A CN202210644608 A CN 202210644608A CN 115174152 B CN115174152 B CN 115174152B
- Authority
- CN
- China
- Prior art keywords
- authentication code
- message authentication
- group test
- intermediate value
- ciphertext
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 69
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000012795 verification Methods 0.000 title claims abstract description 19
- 238000004891 communication Methods 0.000 title claims abstract description 14
- 238000010998 test method Methods 0.000 claims abstract description 7
- 238000004422 calculation algorithm Methods 0.000 claims description 26
- 239000011159 matrix material Substances 0.000 claims description 22
- 239000013598 vector Substances 0.000 claims description 19
- 230000005540 biological transmission Effects 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 6
- 230000003044 adaptive effect Effects 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 4
- 238000005457 optimization Methods 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 2
- 239000008280 blood Substances 0.000 description 2
- 210000004369 blood Anatomy 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/06—Network architectures or network communication protocols for network security for supporting key management in a packet data network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Detection And Prevention Of Errors In Transmission (AREA)
Abstract
本发明公开了一种群组测试认证加密方法、验证解密方法及通信方法,涉及信息安全领域,针对传统认证加密方案的数据扩张问题,将认证加密方案与群组测试方法结合起来,能够有效减少使用认证加密方案进行保密通信时的数据传输量,方法具有较强的实用性。
The present invention discloses a group test authentication encryption method, a verification and decryption method and a communication method, which relate to the field of information security. Aiming at the data expansion problem of traditional authentication encryption schemes, the authentication encryption scheme is combined with a group test method, which can effectively reduce the amount of data transmission when using the authentication encryption scheme for confidential communication, and the method has strong practicality.
Description
技术领域Technical Field
本发明涉及信息安全领域,尤其涉及一种群组测试认证加密方法、群组测试验证解密方法及通信方法。The present invention relates to the field of information security, and in particular to a group test authentication encryption method, a group test verification decryption method and a communication method.
背景技术Background technique
认证加密(Authenticated Encryption)是一种能同时提供加密与认证功能的密码方案。加密保证数据的机密性,即不会泄露明文信息,认证保证数据的完整性,即确保传输的数据不被敌手篡改,同时可以对消息来源进行确认。认证加密方案的加密算法输入为密钥、初始向量、关联数据、明文,其中关联数据是不需要被加密传输只需保证不被篡改的数据,明文是需要被加密传输的数据,输出为密文和消息认证码;解密算法的输入为密钥、初始向量、关联数据、密文和认证码,解密算法重新生成消息认证码,并与接收到的消息认证码进行对比,判断密文是否有效,如果一致,则生成并输出相应的明文。Authenticated Encryption is a cryptographic scheme that can provide both encryption and authentication functions. Encryption ensures the confidentiality of data, that is, it will not leak plaintext information, and authentication ensures the integrity of data, that is, it ensures that the transmitted data is not tampered with by the adversary, and at the same time, the source of the message can be confirmed. The encryption algorithm input of the authenticated encryption scheme is the key, initialization vector, associated data, and plaintext, where the associated data is the data that does not need to be encrypted for transmission but only needs to be guaranteed not to be tampered with, and the plaintext is the data that needs to be encrypted for transmission, and the output is the ciphertext and the message authentication code; the decryption algorithm input is the key, initialization vector, associated data, ciphertext, and authentication code. The decryption algorithm regenerates the message authentication code and compares it with the received message authentication code to determine whether the ciphertext is valid. If they are consistent, the corresponding plaintext is generated and output.
群组测试(Group Testing)方法起源于二战时期的血液样本检验——如何从大量血液样本中用尽可能少的检验次数快速地找到受感染者。群组测试分为适应性的和非适应性的,适应性的群组测试一般为多步分组测试,后面的分组策略依赖于之前的检测结果;非适应性群组测试只需要一步来进行多个测试,这些测试可以同时进行,更有利于在实际问题中应用,因此本发明使用非适应性的群组测试。这一方法一般通过群组测试矩阵来刻画。The group testing method originated from the blood sample test during World War II - how to quickly find infected people from a large number of blood samples with as few tests as possible. Group testing is divided into adaptive and non-adaptive. Adaptive group testing is generally a multi-step group test, and the subsequent grouping strategy depends on the previous test results; non-adaptive group testing only requires one step to perform multiple tests, and these tests can be performed simultaneously, which is more conducive to application in practical problems. Therefore, the present invention uses non-adaptive group testing. This method is generally characterized by a group test matrix.
在数据传输时,用户可能会产生大量的短消息,比如在线文档在编辑时会产生增、删、改、撤销等操作,每一个操作可看作一条短消息,在与服务器通信的过程中,对这些消息进行认证加密处理时所产生的初始向量和认证码会带来大量的数据扩张,极大影响了网络传输的效率。During data transmission, users may generate a large number of short messages. For example, when editing online documents, operations such as adding, deleting, modifying, and revoking may occur. Each operation can be regarded as a short message. In the process of communicating with the server, the initial vectors and authentication codes generated when authenticating and encrypting these messages will cause a large amount of data expansion, which greatly affects the efficiency of network transmission.
将多条短消息合并成一条长消息再进行认证加密算法处理,可以很大程度上减少认证码的数据扩张,但在解密验证不通过时,无法确定哪条短消息出了问题,将导致所有消息重传。如果在尽可能小的数据扩张情况下能检测出消息错误的位置,将极大地减少网络数据的传输量。Combining multiple short messages into one long message and then processing it with the authentication encryption algorithm can greatly reduce the data expansion of the authentication code, but when the decryption verification fails, it is impossible to determine which short message has a problem, which will cause all messages to be retransmitted. If the location of the message error can be detected with the smallest possible data expansion, the amount of network data transmission will be greatly reduced.
鉴于此,如何在认证加密中减少数据扩张和同时检测错误消息的位置,成为目前需要解决的技术问题。In view of this, how to reduce data expansion and detect the location of error messages in authenticated encryption has become a technical problem that needs to be solved.
发明内容Summary of the invention
本发明的目的是针对传统认证加密方案的数据扩张问题,将认证加密方案与群组测试方法结合起来,提供了一种应用于发送端的群组测试认证加密方法,以及相应的一种应用于接收端的群组测试验证解密方法,以及一种包括群组测试认证加密和群组测试验证解密的通信方法,能够有效减少使用认证加密方案进行保密通信时的数据传输量,方法具有较强的实用性。The purpose of the present invention is to address the data expansion problem of traditional authentication encryption schemes, combine authentication encryption schemes with group testing methods, and provide a group test authentication encryption method applied to a sending end, and a corresponding group test verification decryption method applied to a receiving end, as well as a communication method including group test authentication encryption and group test verification decryption, which can effectively reduce the amount of data transmission when using authentication encryption schemes for confidential communications, and the method has strong practicality.
为实现上述目的,本发明采用以下技术方案:To achieve the above object, the present invention adopts the following technical solutions:
本发明提供一种群组测试认证加密方法,应用于发送端,其包括如下步骤:The present invention provides a group test authentication encryption method, which is applied to a sending end and comprises the following steps:
利用一种认证加密方案的加密算法,对一组由明文和关联数据构成的消息对加密,生成密文和相应的第一初始消息认证码;Encrypting a set of message pairs consisting of plaintext and associated data using an encryption algorithm of an authenticated encryption scheme to generate ciphertext and a corresponding first initial message authentication code;
根据所述第一初始消息认证码,利用群组测试矩阵,生成中间值;Generate an intermediate value using a group test matrix according to the first initial message authentication code;
对所述中间值加密,生成第一最终消息认证码;将所述加密算法的初始向量、关联数据、密文以及所述第一最终消息认证码发送至接收端。The intermediate value is encrypted to generate a first final message authentication code; and the initial vector of the encryption algorithm, the associated data, the ciphertext and the first final message authentication code are sent to a receiving end.
上述技术方案的有益效果是:提供了一种通用的群组测试认证加密方法,由于最终消息认证码的个数远小于消息的个数,可以有效防止数据扩张,减少通信时的数据传输量。例如,在工业控制系统中,需要频繁传输大量数据,可利用本方法对发送端待传输的认证加密数据进行群组测试,能够有效提高通信效率。The beneficial effect of the above technical solution is: a general group test authentication encryption method is provided. Since the number of final message authentication codes is much smaller than the number of messages, data expansion can be effectively prevented and the amount of data transmitted during communication can be reduced. For example, in industrial control systems, large amounts of data need to be transmitted frequently. This method can be used to perform group tests on the authentication encrypted data to be transmitted by the sender, which can effectively improve communication efficiency.
进一步地,所述生成密文和相应的消息认证码具体包括:发送端与接收端共享一组密钥K1,根据所述初始向量,通过调用所述认证加密方案的加密算法,对明文和关联数据加密,生成密文和相应的第一初始消息认证码。Furthermore, the generating of ciphertext and corresponding message authentication code specifically includes: the sending end and the receiving end share a set of keys K 1 , and according to the initial vector, by calling the encryption algorithm of the authentication encryption scheme, encrypt the plaintext and associated data to generate ciphertext and corresponding first initial message authentication code.
进一步地,所述生成中间值具体包括:根据所述群组测试矩阵,将所述第一初始消息认证码分为若干个组,并将各组中的值进行异或,生成中间值。Furthermore, the generating the intermediate value specifically includes: dividing the first initial message authentication code into a plurality of groups according to the group test matrix, and performing XOR operation on the values in each group to generate the intermediate value.
上述步骤的有益效果是:使用群组测试矩阵可以有效降低对海量数据加密时所生成的消息认证码数量,降低通信时的数据传输量。The beneficial effect of the above steps is that the use of the group test matrix can effectively reduce the number of message authentication codes generated when encrypting massive data and reduce the amount of data transmitted during communication.
进一步地,所述生成最终消息认证码具体包括:发送端与接收端共享另一组密钥K2,根据所述中间值,通过调用可调分组密码对所述中间值加密,获得所述第一最终消息认证码。Furthermore, the generating of the final message authentication code specifically includes: the sending end and the receiving end share another set of keys K 2 , and according to the intermediate value, encrypt the intermediate value by calling an adjustable block cipher to obtain the first final message authentication code.
上述步骤的有益效果是:使用可调分组密码生成消息认证码,具有较高的安全性,并且方法简单、通用。The beneficial effects of the above steps are: using the adjustable block cipher to generate a message authentication code has high security, and the method is simple and universal.
进一步地,所述认证加密方案选用CCM算法。Furthermore, the authentication encryption scheme selects the CCM algorithm.
本发明还提供一种群组测试验证解密方法,应用于接收端,其包括如下步骤:The present invention also provides a group test verification decryption method, which is applied to a receiving end and comprises the following steps:
接收发送端发送的初始向量、关联数据、密文以及第一最终消息认证码,利用相同认证加密方案的解密算法对密文解密,生成明文和相应的第二初始消息认证码;Receiving the initial vector, associated data, ciphertext and the first final message authentication code sent by the sender, decrypting the ciphertext using the decryption algorithm of the same authentication encryption scheme, and generating plaintext and the corresponding second initial message authentication code;
根据所述第二初始消息认证码,利用群组测试矩阵,生成中间值;generating an intermediate value using a group test matrix according to the second initial message authentication code;
对所述中间值加密,生成第二最终消息认证码,并对比接收到的所述第一最终消息认证码,根据群组测试方法,确定无效密文的位置并输出其余相应的明文。The intermediate value is encrypted to generate a second final message authentication code, and compared with the received first final message authentication code, the position of the invalid ciphertext is determined according to the group test method and the remaining corresponding plaintext is output.
上述技术方案的有益效果是:提供了一种通用的群组测试验证解密方法,用于减少通信时的数据传输量的同时检测错误消息的位置。只需传输少量的消息认证码即可达到检验密文有效性的目的。若所述计算得到的消息认证码合法,表明接收端接收到的数据未被篡改,否则表明数据已被篡改。The beneficial effect of the above technical solution is: a universal group test verification decryption method is provided, which is used to reduce the amount of data transmission during communication while detecting the location of error messages. Only a small amount of message authentication code needs to be transmitted to achieve the purpose of verifying the validity of the ciphertext. If the calculated message authentication code is legal, it indicates that the data received by the receiving end has not been tampered with, otherwise it indicates that the data has been tampered with.
进一步地,所述生成明文和相应的第二初始消息认证码具体包括:接收端与发送端共享一组密钥K1,根据接收到的所述初始向量、关联数据,通过调用认证加密方案的解密算法对接收到的密文进行解密,生成明文和相应的第二初始消息认证码。Furthermore, generating the plaintext and the corresponding second initial message authentication code specifically includes: the receiving end and the sending end share a set of keys K 1 , decrypting the received ciphertext by calling the decryption algorithm of the authenticated encryption scheme according to the received initial vector and associated data, and generating the plaintext and the corresponding second initial message authentication code.
进一步地,所述生成中间值具体包括:根据所述群组测试矩阵,将所述第二初始消息认证码分为若干个组,并将各组中的值进行异或,生成中间值。Furthermore, the generating the intermediate value specifically includes: dividing the second initial message authentication code into a plurality of groups according to the group test matrix, and performing XOR operation on the values in each group to generate the intermediate value.
进一步地,所述生成第二最终消息认证码具体包括:接收端与发送端共享另一组密钥K2,根据所述中间值,通过调用可调分组密码对所述中间值加密,获得所述第二最终消息认证码。Furthermore, the generating of the second final message authentication code specifically includes: the receiving end and the sending end share another set of keys K 2 , and according to the intermediate value, encrypt the intermediate value by calling an adjustable block cipher to obtain the second final message authentication code.
本发明还提供一种包括群组测试认证加密和群组测试验证解密的通信方法,其包括如下步骤:The present invention also provides a communication method including group test authentication encryption and group test verification decryption, which includes the following steps:
发送端利用一种认证加密方案的加密算法,对一组由明文和关联数据构成的消息对加密,生成密文和相应的第一初始消息认证码;根据所述第一初始消息认证码,利用群组测试矩阵,生成中间值;对所述中间值加密,生成第一最终消息认证码;将所述加密算法的初始向量、关联数据、密文以及所述第一最终消息认证码发送至接收端;The sending end encrypts a message pair consisting of plain text and associated data using an encryption algorithm of an authenticated encryption scheme to generate a ciphertext and a corresponding first initial message authentication code; generates an intermediate value based on the first initial message authentication code using a group test matrix; encrypts the intermediate value to generate a first final message authentication code; and sends the initial vector of the encryption algorithm, the associated data, the ciphertext, and the first final message authentication code to the receiving end;
接收端接收发送端发送的初始向量、关联数据、密文以及第一最终消息认证码,利用相同认证加密方案的解密算法对密文解密,生成明文和相应的第二初始消息认证码;根据所述第二初始消息认证码,利用群组测试矩阵,生成中间值;对所述中间值加密,生成第二最终消息认证码,并对比接收到的所述第一最终消息认证码,根据群组测试方法,确定无效密文的位置并输出其余相应的明文。The receiving end receives the initial vector, associated data, ciphertext and the first final message authentication code sent by the sending end, decrypts the ciphertext using the decryption algorithm of the same authentication encryption scheme, generates plaintext and the corresponding second initial message authentication code; generates an intermediate value based on the second initial message authentication code using a group test matrix; encrypts the intermediate value to generate a second final message authentication code, and compares it with the received first final message authentication code, determines the position of the invalid ciphertext according to the group test method, and outputs the remaining corresponding plaintext.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明实施例1提供的群组测试认证加密方法流程示意图;FIG1 is a schematic diagram of a group test authentication encryption method flow chart provided in Embodiment 1 of the present invention;
图2为本发明实施例1提供的群组测试认证加密方法原理示意图;FIG2 is a schematic diagram showing the principle of a group test authentication encryption method provided in Example 1 of the present invention;
图3为本发明实施例3提供的群组测试验证解密方法流程示意图;FIG3 is a schematic diagram of a group test verification decryption method flow chart provided in Embodiment 3 of the present invention;
图4为本发明实施例3提供的群组测试验证解密方法原理示意图。FIG. 4 is a schematic diagram showing the principle of a group test verification and decryption method provided in Embodiment 3 of the present invention.
具体实施方式Detailed ways
为使本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合所附图作详细说明如下。In order to make the above features and advantages of the present invention more obvious and easy to understand, embodiments are given below and described in detail with reference to the accompanying drawings.
实施例1Example 1
作为本发明的一个具体实施例,公开了一种应用于发送端的群组测试认证加密方法,如图1所示,包括如下步骤:As a specific embodiment of the present invention, a group test authentication encryption method applied to a sending end is disclosed, as shown in FIG1 , comprising the following steps:
S1.发送端与接收端共享一组密钥K1,根据初始向量N,对m组消息(Ai,Pi),i=1,2,…,m进行加密,生成密文和相应的第一初始消息认证码(Ci,Si),i=1,2,…,m,其中关联数据Ai是以需要以明文形式传输的数据,Pi是需要加密的明文;S1. The sender and the receiver share a set of keys K 1 , and encrypt m groups of messages (A i , Pi ), i=1,2,…,m according to the initial vector N, to generate ciphertext and the corresponding first initial message authentication code (C i ,S i ), i=1,2,…,m, where the associated data Ai is the data to be transmitted in plain text, and Pi is the plain text to be encrypted;
S2.根据上述第一初始消息认证码,利用群组测试矩阵,生成中间值Xj,j=1,2,…,t;S2. Generate an intermediate value X j , j=1,2,…,t using the group test matrix according to the first initial message authentication code;
S3.与接收端共享另一组密钥K2,根据所述中间值Xj,j=1,2,…,t,生成第一最终消息认证码T=(T1,T2,…,Tt),t≤m;将(N,(A1,C1),…,(Am,Cm),(T1,T2,…,Tt))发送至接收端。S3. Share another set of keys K 2 with the receiving end, generate a first final message authentication code T = (T 1 , T 2 , …, T t ), t≤m according to the intermediate value X j , j = 1, 2, …, t; and send (N, (A 1 , C 1 ), …, (A m , C m ), (T 1 , T 2 , …, T t )) to the receiving end.
与现有技术相比,本实施例提供了一种通用的群组测试认证加密方法,用于降低通信时的数据传输量,尤其降低了初始向量N和消息认证码S的数量。图2展示了本发明实施例1提供的群组测试认证加密方法原理示意图。Compared with the prior art, this embodiment provides a general group test authentication encryption method for reducing the amount of data transmission during communication, especially reducing the number of initial vectors N and message authentication codes S. FIG2 shows a schematic diagram of the principle of the group test authentication encryption method provided by Embodiment 1 of the present invention.
实施例2Example 2
在实施例1的基础上进行优化,步骤S1进一步包括:Based on the optimization of Example 1, step S1 further includes:
S11.发送端与接收端共享密钥K1,对m组消息(Ai,Pi),i=1,2,…,m加密,通过下面公式生成密文和相应的第一初始消息认证码(Ci,Si),i=1,2,…,m:S11. The sender and the receiver share a key K 1 , encrypt m groups of messages (A i , Pi ), i=1,2,…,m, and generate ciphertext and the corresponding first initial message authentication code (C i ,S i ), i=1,2,…,m by the following formula:
ε(K1,N||i,Ai,Pi)=(Ci,Si),i=1,…,mε(K 1 ,N||i,A i ,P i )=(C i ,S i ),i=1,…,m
其中ε为认证加密方案的加密算法,它生成密文C=(C1,C2,…,Cm)和相应的第一初始消息认证码S=(S1,S2,…,Sm)。加密时用N||i作为实际使用的初始向量。Where ε is the encryption algorithm of the authenticated encryption scheme, which generates the ciphertext C = (C 1 , C 2 , ..., C m ) and the corresponding first initial message authentication code S = (S 1 , S 2 , ..., S m ). N||i is used as the initial vector actually used during encryption.
优选地,上述认证加密方案可以选用CCM算法。Preferably, the above authentication encryption scheme can use the CCM algorithm.
所述步骤S2进一步包括:The step S2 further comprises:
S21.通过下述群组测试矩阵Qj×i,将上述获得的第一初始消息认证码Si,i=1,2,…,m分为t个组,并将各组中的Si进行异或,生成中间值Xj,j=1,2,…,t,其中t≤m;S21. Divide the first initial message authentication code S i , i=1,2,…,m obtained above into t groups by using the following group test matrix Q j×i , and XOR the S i in each group to generate an intermediate value X j , j=1,2,…,t, where t≤m;
示例性地,t=9,m=15时,群组测试矩阵可以选为:For example, when t=9 and m=15, the group test matrix can be selected as:
上述矩阵Q9×15的每一行代表中间值的分组信息,若aji=1,则第j个分组包含Si,反之aji=0代表第j个分组不包含Si。最终可将15个消息认证码Si分为9组,将各组的值分别异或,得到Xj,j=1,2,…,9。群组测试矩阵的检错能力由群组测试矩阵任意不超过d列按位或都不包含其他列性质中d的最大值决定。上述矩阵Q9×15的检错能力为1,意味着如果有1个密文数据在传输中被篡改,则能精确找到出错位置,若多于1则不能精确找到出错位置。Each row of the above matrix Q 9×15 represents the grouping information of the intermediate value. If a ji = 1, the jth group contains S i . Otherwise, a ji = 0 means that the jth group does not contain S i . Finally, the 15 message authentication codes S i can be divided into 9 groups, and the values of each group are XORed separately to obtain X j , j = 1, 2, ..., 9. The error detection capability of the group test matrix is determined by the maximum value of d in the property that any column of the group test matrix not exceeding d does not contain the bitwise OR of other columns. The error detection capability of the above matrix Q 9×15 is 1, which means that if one ciphertext data is tampered with during transmission, the error position can be accurately found. If more than 1, the error position cannot be accurately found.
所述步骤S3进一步包括:The step S3 further comprises:
S31.发送端与接收端共享密钥K2,根据上述获得的Xj,j=1,2,…,t,通过下面公式获得第一最终消息认证码T=(T1,T2,…,Tt),t≤m:S31. The sender and the receiver share a key K 2 , and obtain the first final message authentication code T = (T 1 , T 2 , ..., T t ), t ≤ m according to the above-obtained X j , j = 1 , 2 , ..., t by the following formula:
其中F为可调分组密码,调柄为j。Where F is a tunable block cipher and the tuning handle is j.
实施例3Example 3
作为本发明的一个具体实施例,公开了一种应用于接收端的群组测试验证解密方法,如图3所示,包括如下步骤:As a specific embodiment of the present invention, a group test verification decryption method applied to a receiving end is disclosed, as shown in FIG3 , comprising the following steps:
S4.接收端接收发送端发送的数据(N′,(A′,C′),T′),初始化P*=⊥、集合与发送端共享密钥K1,根据所述初始向量N′、关联数据A′,对密文C′解密,生成明文和相应的第二初始消息认证码/> S4. The receiving end receives the data (N′, (A′, C′), T′) sent by the sending end, initializes P * = ⊥, set Share the key K 1 with the sender, decrypt the ciphertext C' according to the initial vector N' and the associated data A', and generate the plaintext and the corresponding second initial message authentication code/>
S5.根据上述计算得到的第二初始消息认证码利用群组测试矩阵,生成中间值/>j=1,2,…,t;S5. The second initial message authentication code obtained according to the above calculation Use the group test matrix to generate intermediate values/> j=1,2,…,t;
S6.接收端与发送端共享密钥K2,对上述中间值j=1,2,…,t加密,生成第二最终消息认证码/>根据所述根据群组测试方法,判断所述T*的每个分量/>和所述T′的每个分量T′j是否一致,若一致,将其中参与生成/>的所有消息认证码Sj所对应的消息序号从集合/>中排除;遍历所述集合/>将/>设为⊥,最终输出P*。S6. The receiving end and the sending end share the key K 2 , and the above intermediate value j=1,2,…,t encryption, generate the second final message authentication code/> According to the group test method, each component of T * is determined. Is it consistent with each component T' j of T'? If so, the components involved in the generation of The message sequence numbers corresponding to all message authentication codes S j are from the set/> Exclude from; traverse the collection /> Will/> Set it to ⊥, and finally output P * .
实施时,若所述第二最终消息认证码T*与接收端收到的第一最终消息认证码T′相同,表明接收端接收到的数据未被篡改;若消息认证码不同,则表明数据已被篡改。图4展示了本发明实施例3提供的群组测试验证解密方法原理示意图。During implementation, if the second final message authentication code T * is the same as the first final message authentication code T′ received by the receiving end, it indicates that the data received by the receiving end has not been tampered with; if the message authentication codes are different, it indicates that the data has been tampered with. FIG4 shows a schematic diagram of the principle of the group test verification decryption method provided by Embodiment 3 of the present invention.
实施例4Example 4
在实施例3的基础上进行优化,步骤S4进一步包括:Based on the optimization of Example 3, step S4 further includes:
S41.接收端与发送端共享密钥K1,对密文C′解密,通过下面公式获得明文和相应的第二初始消息认证码 S41. The receiving end and the sending end share the key K 1 , decrypt the ciphertext C′, and obtain the plaintext and the corresponding second initial message authentication code through the following formula:
其中为认证加密方案的解密算法,/>算法输出明文和相应的第二初始消息认证码/> in is the decryption algorithm of the authenticated encryption scheme,/> The algorithm outputs the plaintext and the corresponding second initial message authentication code/>
所述步骤S5进一步包括:The step S5 further comprises:
S51.通过下述群组测试矩阵Qt×m,将上述获得的第二初始消息认证码分为t个组,并将各组中的/>进行异或,生成中间值/>j=1,2,…,t,其中t≤m;S51. The second initial message authentication code obtained above is converted into Divide into t groups, and divide the /> XOR is performed to generate an intermediate value/> j=1,2,…,t, where t≤m;
所述步骤S6进一步包括:The step S6 further comprises:
S61.与发送端共享密钥K2,根据上述获得的j=1,2,…,t,通过下面公式获得第二最终消息认证码/>t≤m:S61. Share the key K 2 with the sender, according to the above j=1,2,…,t, the second final message authentication code is obtained by the following formula/> t≤m:
其中F为可调分组密码,调柄为j。Where F is a tunable block cipher and the tuning handle is j.
S62.根据所述根据群组测试方法,判断所述T*的每个分量和所述T′的每个分量T′j是否一致,若一致,将其中参与生成/>的所有第二初始消息认证码Sj所对应的消息序号从集合/>中排除;遍历所述集合/>将/>设为⊥,最终输出P*。S62. According to the group test method, determine each component of T * Is it consistent with each component T' j of T'? If so, the components involved in the generation of The message sequence numbers corresponding to all second initial message authentication codes S j are from the set/> Exclude from; traverse the collection /> Will/> Set it to ⊥, and finally output P * .
实施例5Example 5
作为本发明的一个具体实施例,公开了一种包括群组测试认证加密和群组测试验证解密的通信方法,具体地由一种应用于发送端的群组测试认证加密方法和一种应用于接收端的群组测试验证解密方法组成,该群组测试认证加密方法与上述实施例1公开的内容相同,该群组测试验证解密方法与上述实施例3公开的内容相同。As a specific embodiment of the present invention, a communication method including group test authentication encryption and group test verification decryption is disclosed, which is specifically composed of a group test authentication encryption method applied to the sending end and a group test verification decryption method applied to the receiving end. The group test authentication encryption method is the same as the content disclosed in the above-mentioned embodiment 1, and the group test verification decryption method is the same as the content disclosed in the above-mentioned embodiment 3.
实施例6Example 6
在实施例5的基础上进行优化,群组测试认证加密方法与上述实施例2公开的内容相同,群组测试验证解密方法与上述实施例4公开的内容相同。Based on the optimization of Example 5, the group test authentication encryption method is the same as that disclosed in the above Example 2, and the group test verification decryption method is the same as that disclosed in the above Example 4.
本发明实施例所描述的步骤可以通过计算机程序来指令相关的硬件完成,所述程序可以存储在计算机可读取存储介质中。其中,随机存取存储器(RAM)、只读存储器(ROM)、光盘以及磁碟等可以作为存储程序的介质。The steps described in the embodiments of the present invention may be completed by instructing related hardware through a computer program, and the program may be stored in a computer-readable storage medium, wherein a random access memory (RAM), a read-only memory (ROM), an optical disk, and a magnetic disk may be used as the medium for storing the program.
需要说明的是,本发明在描述技术方案时,名称中使用了“初始”“最终”“第一”“第二”的限定,具体为“第一初始消息认证码”“第一最终消息认证码”“第二初始消息认证码”“第二最终消息认证码”,只是为了便于区分和表述,但不用于重新限定其含义,不改变其“消息认证码”的原有含义。It should be noted that, when describing the technical solution of the present invention, the limitations of “initial”, “final”, “first” and “second” are used in the name, specifically “first initial message authentication code”, “first final message authentication code”, “second initial message authentication code” and “second final message authentication code”, which are only for the convenience of distinction and expression, but are not used to redefine their meanings and do not change the original meaning of “message authentication code”.
虽然本发明已以实施例公开如上,然其并非用以限定本发明,本领域的普通技术人员对本发明的技术方案进行的适当修改或者等同替换,均应涵盖于本发明的保护范围内,本发明的保护范围以权利要求所限定者为准。Although the present invention has been disclosed as above by way of embodiments, it is not intended to limit the present invention. Appropriate modifications or equivalent substitutions of the technical solutions of the present invention made by ordinary technicians in the field should be included in the protection scope of the present invention. The protection scope of the present invention shall be based on what is defined in the claims.
Claims (4)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210644608.2A CN115174152B (en) | 2022-06-08 | 2022-06-08 | A group test authentication encryption method, verification and decryption method and communication method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210644608.2A CN115174152B (en) | 2022-06-08 | 2022-06-08 | A group test authentication encryption method, verification and decryption method and communication method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115174152A CN115174152A (en) | 2022-10-11 |
| CN115174152B true CN115174152B (en) | 2024-06-18 |
Family
ID=83484955
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210644608.2A Active CN115174152B (en) | 2022-06-08 | 2022-06-08 | A group test authentication encryption method, verification and decryption method and communication method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115174152B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105095070A (en) * | 2015-04-03 | 2015-11-25 | 中国科学院信息工程研究所 | Method and system for obtaining QQ group data base on test assembly of browser |
| CN111935166A (en) * | 2020-08-18 | 2020-11-13 | 杭州萤石软件有限公司 | Communication authentication method, system, electronic device, server, and storage medium |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1083699A1 (en) * | 1998-05-18 | 2001-03-14 | Mitsubishi Materials Corporation | Information sharing system |
| CN112152805B (en) * | 2020-09-25 | 2024-07-12 | 兴唐通信科技有限公司 | Authentication encryption method, authentication decryption method and communication method |
-
2022
- 2022-06-08 CN CN202210644608.2A patent/CN115174152B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105095070A (en) * | 2015-04-03 | 2015-11-25 | 中国科学院信息工程研究所 | Method and system for obtaining QQ group data base on test assembly of browser |
| CN111935166A (en) * | 2020-08-18 | 2020-11-13 | 杭州萤石软件有限公司 | Communication authentication method, system, electronic device, server, and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115174152A (en) | 2022-10-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7860241B2 (en) | Simple universal hash for plaintext aware encryption | |
| EP1529365B1 (en) | Efficient encryption and authentication for data processing systems | |
| IL267677B2 (en) | Equivocation augmentation dynamic secrecy system | |
| CN107086915B (en) | Data transmission method, data sending end and data receiving end | |
| US20080084996A1 (en) | Authenticated encryption method and apparatus | |
| JP2004534333A (en) | Integrated protection method and system for distributed data processing in computer networks | |
| US20170142081A1 (en) | Parallelizable Encryption Using Keyless Random Permutations And Authentication Using Same | |
| CN111314050B (en) | Encryption and decryption method and device | |
| CN114553557B (en) | Key calling method, device, computer equipment and storage medium | |
| CN114448641A (en) | A privacy encryption method, electronic device, storage medium and chip | |
| US8804953B2 (en) | Extensive ciphertext feedback | |
| WO2022237440A1 (en) | Authenticated encryption apparatus with initialization-vector misuse resistance and method therefor | |
| CN114124354B (en) | Deterministic authentication encryption and decryption device and method | |
| CN112866288B (en) | A Symmetric Data Encryption Method for Double Plaintext Transmission | |
| WO2020213114A1 (en) | Mac tag list generation device, mac tag list verification device, method, and program | |
| US9900146B2 (en) | Encrypted text matching system, method, and computer readable medium | |
| CN117725605B (en) | Method and system for remotely and automatically compiling electronic archive file information confidentiality | |
| CN111314051B (en) | Encryption and decryption method and device | |
| CN115174152B (en) | A group test authentication encryption method, verification and decryption method and communication method | |
| Kumar et al. | Invo-substitute: Three layer encryption for enhanced e-commerce website security using substitution cipher and involution function | |
| WO2011059306A2 (en) | A secure key distribution protocol based on hash functions utilizing quantum authentication channel (kdp-6dp) | |
| JP4000900B2 (en) | Cryptographic method with authentication, decryption method with authentication, verification method and device, program, and computer-readable recording medium | |
| Dworkin | Request for review of key wrap algorithms | |
| CN111314079B (en) | Encryption and decryption method and device | |
| CN117411727B (en) | Encryption method, device and storage medium for symmetric encryption of communication transmission |
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 |