Previous topics:
- Cryptographic protocols: definitions, records, properties, classification, attacks
- Key Distribution Protocols on Symmetric Ciphers
If there is a communication channel between Alice and Bob that is not accessible for modification by an attacker (that is, when only the passive cryptanalyst model is applicable), then even without a preliminary exchange of secret keys or other information, you can use the ideas used previously in public key cryptography. After describing the RSA in 1978, in 1980 Adi Shamir proposed using cryptosystems based on commutative operations to transmit information without first exchanging secret keys. If we assume that the transmitted information is a secret session key generated by one of the parties, then in general we get the following three-pass protocol.
Preliminary:
- Alice and Bob are connected by an insecure communication channel, open for listening (but not for modification) by an attacker.
- Each side has a pair of public and private keys , , , respectively.
- The parties have chosen and used the commutative encryption function:
The protocol consists of three passes with the transmission of messages (hence the name) and one final one, on which Bob receives the key.
- Alice picks a new session key
- Alice, using the commutativity of the encryption function,
- Bob decrypts
As a result, the parties receive a shared secret key. .
A common drawback of all such protocols is the lack of authentication of the parties. Of course, in the case of a passive cryptanalyst, this is not required, but in real life you still need to consider all possible models (including an active cryptanalyst) and use protocols that involve mutual authentication of the parties. Also, unlike the Diffie β Hellman scheme, the new key is selected by the session initiator, which allows the initiator, not with good intentions, to force the second participant to use the outdated session key.
Speaking in terms of security properties , all representatives of this class of protocols declare only key authentication (G7). Unlike the Diffie β Hellman scheme, three-pass protocols do not require the selection of new βmasterβ keys for each protocol session, which is why neither perfect direct secrecy (G9) nor the formation of new keys (G10) can be guaranteed.
Trivial option
Let us give an example of a protocol based on the XOR function (bitwise addition modulo 2). Although this function can be used as a foundation for building systems of perfect cryptographic strength, for a three-pass protocol this is a bad choice.
Before starting the protocol, both parties have their secret keys. and representing random binary sequences with a uniform distribution of characters. The encryption function is defined as where this message as well - The secret key. It's obvious that:
- Alice picks a new session key
- Alice, using the commutativity of the encryption function,
- Bob decrypts
At the end of the protocol session, Alice and Bob know the common session key .
The proposed choice of the commutative encryption function of perfect secrecy is unsuccessful, as there are situations in which a cryptanalyst can determine the key . Suppose a cryptanalyst intercepted all three messages:
Modulo 2 addition of all three messages gives the key . Therefore, such an encryption system is not used.
Now we present the protocol for reliable transfer of the secret key, based on the exponential (commutative) encryption function. The stability of this protocol is associated with the difficulty of the task of computing the discrete logarithm: for known values , to find from the equation .
Shamir's Keyless Protocol
Parties tentatively agree on a large prime . Each of the parties chooses a secret key. and . These keys are smaller and mutually simple. . Also, the parties prepared according to a special number and that allow them to decrypt a message encrypted with their key:
The last expression is true as a consequence of Fermatβs small theorem \ index {theorem! The farm is small}. Encryption and decryption operations are defined as follows:
- Alice picks a new session key
- Alice, using the commutativity of the encryption function,
- Bob decrypts
At the end of the protocol session, Alice and Bob know the common session key .
Suppose a cryptanalyst intercepted three messages:
To find the key , a cryptanalyst needs to solve a system of these three equations, which has a very large computational complexity, unacceptable from a practical point of view, if all three numbers quite large. Let's pretend that (or ) few. Then, computing successive degrees (or ), can be found (or ), comparing the result with . Knowing , easy to find and .
Massey-Omura Cryptosystem
In 1982, James Massey and Jim Omura filed a patent (James Massey, Jim K. Omura), improving (in their opinion) the keyless protocol of Shamir. As an encryption operation instead of exponentiation in a multiplicative group they suggested using exponentiation in the Galois field . Secret key of each party (for Alice - ) must satisfy the conditions:
Otherwise, the protocol looks similar.
Afterword
The author will be grateful for factual and other comments on the text.