Cryptographic protocols: definitions, records, properties, classification, attacks

This text will be one of the rewritten chapters for the training manual on information protection of the Department of Radio Engineering and Control Systems, as well as, from this training code, the Department of Information Protection of the MIPT (GU). The full tutorial is available on github (see also draft releases ). I plan to upload new “big” pieces on the hub, firstly, to collect useful comments and comments, and secondly, to give the community more overview material on useful and interesting topics.



Basic concepts



For the successful fulfillment of any information protection goals, it is necessary to participate in the process of protecting several entities that, according to certain rules, will perform technical or organizational actions, cryptographic operations, interact with each other, for example, transmitting messages or verifying each other's personalities.



Formalization of such actions is done through the description of the protocol. Protocol - a description of a distributed algorithm in the process of which two or more participants sequentially perform certain actions and exchange messages (Hereinafter, in this section, the definitions are based on [Cheremushkin: 2009] ).



By a participant (subject, party) of the protocol is understood not only people, but also applications, groups of people or entire organizations. Formally, participants are considered only those who play an active role within the protocol. Although when creating and describing the protocols, you should not forget about the passive sides either. For example, a passive cryptanalyst is not formally a participant in the protocols, but many protocols are developed taking into account protection from such “non-participants”.



The protocol consists of cycles (English round ) or passes (English pass ). A cycle is a time interval of activity of only one participant. With the exception of the very first protocol cycle, it usually starts with a message, and ends with a message.



A cycle (or passage) consists of steps (actions, English step, action ) - specific completed actions performed by a protocol participant. For example:





A past or even just theoretically described implementation of the protocol for specific participants is called a session . Each participant in the session performs one or more roles . In another protocol session, participants can switch roles and perform completely different functions.



We can say that the protocol prescriptively describes the rules for the behavior of each role in the protocol. A session is a descriptive description (possibly theoretically) of a protocol implementation that took place in the past.



An example of a protocol description.



  1. A participant with the Sender role must send a message to a participant with the Recipient role.
  2. A participant with the Recipient role must receive a message from a participant with the Sender role.


An example of a protocol session description.



  1. On April 1st, at 13:00, Alice sent Bob a message.
  2. On April 1st, at 13:05, Bob received a message from Alice.


A protected protocol or a security protocol will be called a protocol that provides at least one protective function [ISO: 7498-2: 1989] :





If a secure protocol is designed to perform the security functions of a cryptographic system, or if cryptographic algorithms are used during its execution, then such a protocol will be called cryptographic .



Protocol Recording



To record protocols related to the implementation of information protection functions, do not use expressions like “participant with the role of“ Sender ”, but replace them with short notations like“ sender ”or use generally accepted exemplifiers : Alice, Bob, Clara, Eva, etc., e. The following agreements are used.





There is no generally accepted protocol recording format; they can differ both in appearance and in completeness of description. For example, here is the most comprehensive Diffie-Hellman protocol recording format.





Now compare with a short record of the same protocol.



  1. A toB:A=ga bmodp
  2. B toA:B=gb bmodp


In a brief record, initialization and prerequisites, calculations of non-transmitted data (in this example, a common session key, are omitted) s ), as well as any checks.



In this tutorial we will stick to an intermediate recording format.



  1. Alice generates a .

    Alice \ to \ left \ {A = g ^ a \ bmod p \ right \} \ to Bob .
  2. Bob generates b .

    Bob is calculating s=Ab bmodp .

    Bob \ to \ left \ {B = g ^ b \ mod p \ right \} \ to Alice .
  3. Alice calculates s=Ba bmodp .


We also agree on the rules for recording the case when an active cryptanalyst (Mellory) poses as a legal user.







\ begin {array} {llllc} (1) & A & \ to M \ left (B \ right) &: & A = g ^ a \ bmod p, \\ (2) & M \ left (A \ right ) & \ to B &: & A ^ * = g ^ {a ^ *} \ bmod p, \\ (3) & B & \ to M \ left (A \ right) &: & B = g ^ b \ bmod p, \\ (4) & M \ left (B \ right) & \ to A &: & B ^ * = g ^ {b ^ *} \ bmod p. \\ \ end {array}







Or, assigning a separate column for each participant.





\ begin {array} {lllclllc} (1) & A & \ to & M \ left (B \ right) & {} & {} &: & A = g ^ a \ bmod p, \\ (2) & {} & {} & M \ left (A \ right) & \ to & B &: & A ^ * = g ^ {a ^ *} \ bmod p, \\ (3) & {} & {} & M \ left (A \ right) & \ gets & B &: & B = g ^ b \ bmod p, \\ (4) & A & \ gets & M \ left (B \ right) & {} & {} & : & B ^ * = g ^ {b ^ *} \ bmod p. \\ \ end {array}







To reduce the description and simplify the comparison of different protocols, use the following conventions for the designation of transmitted data.





Examples of using notation.





Protocol Security Properties



A secure system and, accordingly, a secure protocol can perform various security functions. Many of these functions or goals (English goals ) can be formulated as resistance to a particular class of attacks. The most complete and relevant is considered to be the listing and interpretation of these goals in the AVISPA project document ( Automated Validation of Internet Security Protocols and Applications ) [AVISPA] , summarizing descriptions from various IETF documents ( Internet Engineering Task Force ). These goals are considered to be formalized - that is, such that for individual protocols there is the opportunity to formally prove or disprove the achievement of these goals.





Examples of security properties implemented by various protocols are given in the table.







Protocol classification



There is no universally accepted classification of security protocols. However, a set of objective and unambiguous features classifying the protocols can be distinguished.





A less objective and unambiguous classification may also be introduced based on a subjective assessment of the protocols.





The classification by purpose can also be reformulated as a classification by the protected properties of the protocol for which it was developed. In this case, it will be necessary to highlight the “basic properties” (for example, G10 - the formation of new keys), and most of the rest be attributed to additional ones (for example, G7 - key authentication, and G8 - confirmation of key ownership). Determining which of the properties are “basic” and which are “additional” will create an ambiguity in the classification according to the purpose of the protocol. If all the properties of the protocol are called “basic”, then such a classification will become too detailed.



Classification by "completeness" of the functions performed is problematic due to the fact that not a single protocol can be called fully "applied". Any protocol in itself is only part of a certain information (or organizational) system, which just performs the function required by users. However, it can be said that individual protocols (for example, TLS) are protocols of a higher level than protocols, for example, Diffie-Hellman, since the latter often acts as an integral part of the same TLS protocol.



Protocol Attacks



Protected properties of protocols can be declared when they are declared by the authors of the protocol themselves (and, usually, give various arguments in favor of performing these functions), and implied when the authors of some system rely on the implementation of protected properties by some protocol.



An attack on a secure protocol is understood as an attempt to analyze protocol messages and / or perform actions not foreseen by the protocol in order to violate the declared or implied properties of the protocol. (A modified definition from [Cheremushkin: 2009] is used . The difference is that Cheryomushkin in his definition does not describe what “protocol violation" is and leaves ambiguous cases of violation, for example, the properties of G9 / PFS and G20 / STP.)



An attack is considered successful if at least one of the declared or implied properties of the protocol is violated.



In the case of a successful attack on the implied properties, we will clarify that the attack on the use of the protocol in some system is successful. This will speak, of course, not about the flaws of the protocol itself, but about the wrong choice of the protocol (or its settings) by the authors of the system.



There are many types of protocol attacks. Many attacks have some general principles, which makes it possible to distinguish attack classes to simplify the analysis and development of protocols that are resistant to entire attack classes.





It is important to note that unless otherwise stated, then in the framework of the analysis of cryptographic protocols (not specific systems), the assumption of the strength of all used cryptographic primitives is used.For example, it is assumed that while there is a secure exchange of information using a session key generated in a session of a certain cryptographic protocol, the attacker will not have enough resources and time to obtain this session key through an attack on the ciphers used or cryptographically-resistant hash functions.



On the other hand, it should be assumed that the session keys obtained within the framework of protocol sessions will after some time (however, be much longer than the communication session itself) be obtained by the attacker (attack classes STS and KN). And after much more time, the attacker will be able to gain access to the “master” keys - long-term use keys, so protocols with session key generation should be developed including the G9 / PFS property.



( .)



References





Afterword



The author will be grateful for factual and other comments on the text. The presentation and the text were prepared largely on the excellent lecture by Cheryomushkin (link above).



All Articles