Startseite Mathematik MAKE: A matrix action key exchange
Artikel Open Access

MAKE: A matrix action key exchange

  • Nael Rahman und Vladimir Shpilrain EMAIL logo
Veröffentlicht/Copyright: 7. Januar 2022

Abstract

We offer a public key exchange protocol based on a semidirect product of two cyclic (semi)groups of matrices over Z p . One of the (semi)groups is additive, and the other one is multiplicative. This allows us to take advantage of both operations on matrices to diffuse information. We note that in our protocol, no power of any matrix or of any element of Z p is ever exposed, so standard classical attacks on Diffie–Hellman-like protocols are not applicable.

MSC 2010: 94A60; 20H20

1 Introduction

We start by recalling the classical Diffie–Hellman protocol [1]. The simplest, and original, implementation of this protocol uses the multiplicative group of integers modulo p , where p is prime and g is primitive modulo p . A more general description of the protocol uses an arbitrary finite cyclic group:

  1. Alice and Bob agree on a finite cyclic group G of order q and a generating element g in G . We will write the group G multiplicatively.

  2. Alice picks a random natural number m < q and sends g m to Bob.

  3. Bob picks a random natural number n < q and sends g n to Alice.

  4. Alice computes K A = ( g n ) m = g n m .

  5. Bob computes K B = ( g m ) n = g m n .

Since m n = n m , both Alice and Bob are now in possession of the same group element K = K A = K B , which can serve as the shared secret key.

The protocol is considered secure against eavesdropper if G and g are chosen properly. The eavesdropper must solve the Diffie–Hellman problem (recover g m n from g , g m , and g n ) to obtain the shared secret key. This is currently considered difficult for a “good” choice of parameters (see, e.g., ref. [2] for details).

In ref. [3], a new key exchange protocol was offered, based on a semidirect product of multiplicative matrix semigroups. That protocol is similar to the Diffie–Hellman protocol, but it differs in one essential detail: at the last two steps, Alice and Bob use multiplication instead of exponentiation. In other words, the equality K A = K B in that case is based on the identity m + n = n + m in the ring of integers, instead of the identity m n = n m . Also, even though the parties do compute a large power of a public element (as in the classical Diffie–Hellman protocol), they do not transmit the whole result, but rather just part of it, so no power of a public element is ever exposed.

The generic protocol in ref. [3] can be based on any (semi)group, in particular on any non-commutative (semi)group. For a particular instantiation of the generic protocol, the authors of ref. [3] used conjugation as an action of the multiplicative semigroup of matrices on itself, and matrices were considered over the group ring Z 7 [ A 5 ] . A ring of such a small size was selected to enhance efficiency; however, because of this small size, the protocol turned out to be vulnerable to a “linear algebra attack,” similar to the attack on Stickel’s protocol [4] offered in ref. [5], albeit more sophisticated, see refs [6,7]. Other instantiations of the generic protocol based on semidirect product can be found in [8] and [9].

In this article, we use matrices over Z p for a large p . The size of the exponents used in the protocol should guarantee security against brute force attacks. We also note that in our protocol, no power of any matrix is ever exposed, so standard classical attacks on Diffie–Hellman-like protocols are not applicable.

2 Semidirect products and extensions by automorphisms

We include this section to make the exposition more comprehensive. The reader who is uncomfortable with group-theoretic constructions can skip to Section 2.1.

We now recall the definition of a semidirect product:

Definition 1

Let G , S be two groups, let Aut ( G ) be the group of automorphisms of G , and let ρ : S Aut ( G ) be a homomorphism. Then the semidirect product of G and S is the set

Γ = G ρ S = { ( g , h ) : g G , h S }

with the group operation given by

( g , h ) ( g , h ) = ( g ρ ( h ) g , h h ) .

Here g ρ ( h ) denotes the image of g under the automorphism ρ ( h ) , and when we write a product h h of two morphisms, this means that h is applied first.

In this article, we focus on a special case of this construction, where the group S is just a sub(semi)group of the semigroup of self-homomorphisms of G , typically a cyclic sub(semi)group. We give more details about this special case in Section 2.1.

2.1 Extensions by automorphisms

A particularly simple special case of the semidirect product construction is where the group S is just a subgroup of the group Aut ( G ) of automorphisms of G . Then the semidirect product is the set of all pairs ( g , ϕ ) , where g G , ϕ S , with the group operation given by

(1) ( g , ϕ ) ( g , ϕ ) = ( ϕ ( g ) g , ϕ ϕ ) .

One can also use this construction if G is not necessarily a group, but just a semigroup, and/or consider endomorphisms (i.e., self-homomorphisms) of G , not necessarily automorphisms. Then the resulting semidirect product will be a semigroup, not a group, but this is quite sufficient for being the platform of a Diffie–Hellman-like key exchange protocol.

3 Action

Our platform semigroup will be a semidirect product of two semigroups of matrices over Z p . In the notation of Section 2.1, the semigroup G will be the additive semigroup of all matrices Z p , and the semigroup S will be a cyclic multiplicative semigroup of matrices. More specifically, the semigroup S will consist of pairs of matrices over Z p , of the form ( H 1 k , H 2 k ) for some fixed matrices H 1 , H 2 and all positive exponents k .

The action of S on G will be as follows: M ( S 1 , S 2 ) = S 1 M S 2 for M G , ( S 1 , S 2 ) S . Note that this is an action only if we restrict to a commutative (in particular, cyclic) (semi)group S generated by a pair of matrices ( H 1 , H 2 ) .

Thus, in the semidirect product of the additive semigroup of matrices with the multiplicative cyclic semigroup generated by ( H 1 , H 2 ) , the multiplication looks like this (cf. formula (1)):

( M , ( H 1 , H 2 ) ) 2 = ( M , ( H 1 , H 2 ) ) ( M , ( H 1 , H 2 ) ) = ( H 1 M H 2 + M , ( H 1 2 , H 2 2 ) ) ; ( M , ( H 1 , H 2 ) ) 3 = ( H 1 M H 2 + M , ( H 1 2 , H 2 2 ) ) ( M , ( H 1 , H 2 ) ) = ( H 1 2 M H 2 2 + H 1 M H 2 + M , ( H 1 3 , H 2 3 ) ) , etc .

4 Protocol description

The protocol description is given below. Parameters are discussed separately in Section 5.

  1. (key selection)

    1. Alice and Bob agree on three public matrices, M , H 1 , and H 2 , over Z p , such that M H i H i M and such that det ( H 1 ) = det ( H 2 ) = 0 .

    2. Alice selects a private integer m and Bob selects a private integer n .

  2. Alice computes ( M , ( H 1 , H 2 ) ) m and sends only the first component (call it A ) of the result to Bob.

  3. Bob computes ( M , ( H 1 , H 2 ) ) n and sends only the first component (call it B ) of the result to Alice.

  4. Alice computes ( B , x ) ( A , ( H 1 , H 2 ) m ) = ( H 1 m B H 2 m + A , ? ) . Her key is now K A = H 1 m B H 2 m + A .

  5. Bob computes ( A , y ) ( B , ( H 1 , H 2 ) n ) = ( H 1 n A H 2 n + B , ? ) . His key is now K B = H 1 n A H 2 n + B .

  6. Since ( M , ( H 1 , H 2 ) ) m + n = ( B , x ) ( A , ( H 1 , H 2 ) m ) = ( A , y ) ( B , ( H 1 , H 2 ) n ) = ( K , ( H 1 , H 2 ) m + n ) , we should have K A = K B = K , the shared secret key.

Remark 1

Note that, in contrast with the “standard” Diffie–Hellman key exchange, correctness here is based on the equality x m x n = x n x m = x m + n rather than on the equality ( x m ) n = ( x n ) m = x m n . In the “standard” Diffie–Hellman set up, our trick would not work because, if the shared key K was just the product of two openly transmitted elements, then anybody, including the eavesdropper, could compute K .

5 Parameter and key sampling

The size k of matrices can be small; we suggest k = 3 .

The basic parameter p should have the same properties and the same magnitude as recommended for the classical Diffie–Hellman protocol. In particular, p should be a safe prime, i.e., a prime of the form p = 2 q + 1 .

The parameter r and the exponents s , t , m , and n should be of the same magnitude as q = p 1 2 .

For the public matrices M , H 1 , and H 2 , we require that M H i H i M and det ( H 1 ) = det ( H 2 ) = 0 . Sampling of non-commuting singular matrices can be done as follows. First build a matrix M with entries selected uniformly at random from Z p .

Then, the matrix H 1 is built as follows. First, make a diagonal matrix D : put 0 in the upper left corner, and random nonzero elements of Z p in the remaining places on the diagonal. Then make sure that these random elements do not have order 2. If they do not, then, since p 1 = 2 q , by Lagrange’s theorem their order is at least q , i.e., is large. Now select a matrix S all of whose entries are random elements of Z p . With high probability, this matrix will be invertible. If not, then change one of the entries of S . If S is invertible, let H 1 = S 1 DS .

To build H 2 , use the same procedure but with fresh randomness throughout.

Then, check that M H i H i M ; this will be the case with high probability. If this is not the case for one of the H i , redo selection of M .

Finally, we address the question of how matrices X and Y are selected. Given that the matrices H 1 s and H 2 s are singular, the matrix equation H 1 s X H 2 s = O should have nonzero solutions for X . In fact, any solution of H 1 s X = O or X H 2 s = O will also be a solution of H 1 s X H 2 s = O . However, we need X to also satisfy H 1 s 1 X H 2 s 1 O , according to Step 1 of the protocol. Thus, what we do is we re-write the matrix equation H 1 s X H 2 s = O (where all matrices are k × k ) as a system of k 2 homogeneous linear equations in k 2 entries x i j of the matrix X . We know that this system has many nonzero solutions; we just pick one of them at random. Then we check whether H 1 s 1 X H 2 s 1 O is satisfied; it will be with high probability. If not, we select a different nonzero solution for the system of linear equations in x i j mentioned above.

6 Security

In this section, we address security of the protocol described in Section 4.

Our security assumption here, analogous to the computational Diffie–Hellman assumption, is that it is computationally infeasible to retrieve the shared secret key K from the five public matrices ( M , H 1 , H 2 , A , B ) . The matrices A and B are expressed in terms of the matrices M , H 1 , and H as follows:

(2) A = H 1 m 1 M H 2 m 1 + H 1 m 2 M H 2 m 2 + + H 1 M H 2 + M .

(3) B = H 1 n 1 M H 2 n 1 + H 1 n 2 M H 2 n 2 + + H 1 M H 2 + M .

The shared secret key K is

(4) K = H 1 n + m 1 M H 2 n + m 1 + H 1 n + m 2 M H 2 n + m 2 + + H 1 M H 2 + M .

What makes our scheme compare favorably to, say, the scheme of ref. [3] is that in computing A and B , both operations on matrices (addition and multiplication) are employed, which is good for security because neither multiplicative (e.g., the determinant) nor additive (e.g., the trace) functions of a matrix can be used to reduce the problem to a problem in Z p .

Also, the expressions for A and B cannot be factored into products of simpler expressions. To compare, factoring would be possible if the action of (a single matrix) H on M was a one-sided multiplication. For example, if the action of H on M was given by M H , then the matrix A would be equal to M H m + M H m 1 + + M H + M = M ( H m + H m 1 + + H + I ) . The adversary could multiply this on the right by ( H I ) and get M ( H m + 1 I ) . Since the matrices M and H are public, the adversary could then recover M H m + 1 or even H m + 1 if M is invertible. Then, if H is invertible, too, the adversary can recover H m , and this breaks the scheme.

However, with the action M H 1 M H 2 , no factorization of A (or B ) is possible, and there is no visible way to recover K from ( M , H 1 , H 2 , A , B ) .

6.1 Discrete log problem in Z p as a special case

We note again that no power of any matrix is ever exposed, so all standard attacks on Diffie–Hellman-like protocols are not applicable in our situation. We also note that the analog of the discrete logarithm problem for our protocol is at least as hard as it is for the classical Diffie–Hellman protocol.

Proposition 1

Let a prime p be of the form p = 4 n + 3 . (In particular, safe primes have this property.) Suppose it is computationally feasible for the adversary to recover, from the 3 × 3 public matrices A , M , H 1 , and H 2 over Z p , the private exponent m in the protocol in Section 4. Then it is computationally feasible for the adversary to recover the private exponent k from g and g k in the classical Diffie–Hellman protocol.

Proof

In the notation we used for the Diffie–Hellman protocol in Section 1, suppose we are given g and g m , for some g Z p and m Z . Make a 3 × 3 matrix M with a 11 = g ; a 22 , a 23 , and a 33 random. Let the matrix H = H 1 = H 2 be a diagonal matrix, with h 22 = 1 ; h 11 random, and h 33 = 0 .

Then, for any i 0 , the matrix H i will have h 11 i , 1, and 0 on the diagonal. The matrix H i M H i will have g 2 i in the upper left corner, and zeros as other entries in the first row and in the first column. Therefore, the matrix A (see formula (2)), which is the sum of H i M H i , will have g 2 i in the upper left corner, and zeros as other entries in the first row and in the first column. The summation in the exponent on g is from i = 0 to i = m 1 and the whole exponent on g is therefore equal to ( m 1 ) ( m 2 ) . Clearly, one knows m if and only if one knows ( m 1 ) ( m 2 ) . Other entries of the matrix A are as follows. The entry ( 2 , 2 ) is m a 22 , i.e., it is random since a 22 is random. Similarly, the entry ( 2 , 3 ) is m a 23 , i.e., is random. The entry ( 3 , 2 ) is 0. Finally, the entry ( 3 , 3 ) is a 33 h 33 j , where j in the exponent on h 33 runs from j = 0 to j = m 1 . Again, this is random since a 33 is random.

Thus, the matrix A has g ( m 1 ) ( m 2 ) in the upper left corner, and other entries are either zeros or random. Hence, our strategy for recovering k from g and g k will be as follows. Put g k in the upper left corner of A , and make other entries either zeros or random, according to what we wrote in the previous paragraph. Then recover m , if possible, using an algorithm that is assumed to exist by the Proposition hypothesis. We say “if possible” because k may not have the form ( m 1 ) ( m 2 ) , in which case the algorithm may fail.

Re-write ( m 1 ) ( m 2 ) as m 3 2 2 9 4 . Here 3 2 means 3 2 1 . The inverse of 2 exists since p 2 . Similarly, 9 4 is a particular fixed element of Z p ; denote it by r . Thus, k r = m 3 2 2 , i.e., ( k r ) should be a quadratic residue modulo p for our hypothetical algorithm to work. If ( k r ) is not a quadratic residue modulo p , then, since p is of the form p = 4 n + 3 , it is known that ( r k ) should be a quadratic residue. Then we replace g k in the matrix A by g r ( g k ) 1 = g r k and run our algorithm on this updated matrix as well.

Thus, we will have two similar algorithms running in parallel on two different matrices A : one with g k in the upper left corner, the other one with g r k . One of these algorithms will recover m , and therefore k (or ( r k ) ), and this completes the proof.□

6.2 Indistinguishability from random

We have run some tests to see if the matrix K (the shared secret key) is indistinguishable from random. Figure 1 shows a histogram of values of the ( 1 , 1 ) entry of K , for a 200-bit p . Here values from 0 to p are split into ten groups (“bins”) of size p 10 and the number of values in each bin, out of 100,000 trials, is recorded. The histogram shows essentially uniform distribution of values between the bins. Histograms for values of other entries of the matrix K look the same, so K passes at least this simple randomness test.

Figure 1 
                  Value distribution for the (1,1) entry of 
                        
                           
                           
                              K
                           
                           K
                        
                     .
Figure 1

Value distribution for the (1,1) entry of K .

Another test we have run was computing the mean of the entries of K in each single row and each single column, as well as the mean of all entries of the matrix K . Figure 2 shows a histogram of the means of the entries of the first column, out of 100,000 trials. Figure 3 shows a histogram of the means of all entries of the matrix K . Again, values from 0 to p are split into ten groups (“bins”) of size p 10 . By the central limit theorem, if several random variables are independent and identically distributed, then their mean is approximately normally distributed. Thus, Figures 2 and 3 are, though indirect, still an evidence of different entries of K being independent.

Figure 2 
                  Mean distribution of the first column entries of 
                        
                           
                           
                              K
                           
                           K
                        
                     .
Figure 2

Mean distribution of the first column entries of K .

Figure 3 
                  Mean distribution of all entries of 
                        
                           
                           
                              K
                           
                           K
                        
                     .
Figure 3

Mean distribution of all entries of K .

Another evidence of the matrix K being indistinguishable from random is independent distribution of values of different entries of K . This is illustrated by Figure 4. It shows that joint distribution of values of a pair of different entries of K is very close to uniform, i.e., for any two possible values ( x , y ) of the entries in such a pair, the probability to occur is 1 p 2 = 1 p 1 p , evidencing independence of x and y . The ticks on the x -axis of the histogram in Figure 4 split p possible values of the first entry in a pair into ten bins corresponding to sets of values with an increment of h = p 10 . Each of these ten bins is split again into ten bins of equal size to accommodate possible values of the second entry in a pair.

Figure 4 
                  Distribution of values of a pair of entries of 
                        
                           
                           
                              K
                           
                           K
                        
                     .
Figure 4

Distribution of values of a pair of entries of K .

7 “Telescoping” attack

The following “telescoping” trick is the crucial part of the attack in ref. [10], and it seems to be the main threat to most key exchange schemes based on a semidirect product.

One can multiply equation (2) by H 1 on the left and by H 2 on the right to get

(5) H 1 A H 2 = H 1 m M H 2 m + H 1 m 1 M H 2 m 1 + + H 1 M H 2 .

This, together with (2), yields

(6) H 1 m M H 2 m = H 1 A H 2 + M A .

Since H 1 A H 2 , M , and A are public, the attacker now knows H 1 m M H 2 m and can use a linear algebra attack from there.

We also note that the “telescoping” attack was recently analyzed in ref. [11] in reference to our other key exchange scheme [12] based on a semidirect product of semigroups of matrices over a semiring, and in that setting, an attack similar to that in ref. [10] was shown to be much less successful, upon appropriate choice of parameters of the scheme.

8 Implementation and performance

The scheme of this article was implemented using Python, except for Step 1(iii) since Python does not seem to be able to solve systems of linear equations over Z p . The code is available online, along with a challenge, see ref. [13].

We note that formulas (2) and (3) may create an impression that to compute the matrices A and B , Alice and Bob have to compute all powers of the matrices H 1 and H 2 , from 1 to ( m 1 ) or ( n 1 ) . However, this is not the case; a large power of ( M , ( H 1 , H 2 ) ) can be computed with the usual square-and-multiply method, and this will produce A or B as the corresponding first component.

The number of multiplications in Z p needed to compute H i n is, of course, larger than that to compute g n for g Z p . To compute the square of a 3 × 3 matrix, one needs 24 multiplications of elements of Z p , so one can expect our protocol to run at least 24 times slower than the classical Diffie–Hellman protocol. This is still fast enough to be practical; with a 2000-bit p the run time of the protocol is about 2 s on a very basic computer. Besides, given that at this time there are no visible approaches whatsoever (other than brute force) to attack the protocol in this article, the basic parameter p can probably be taken smaller than what is recommended for standard Diffie–Hellman protocols, and this will reduce the run time.

A particular 2000-bit safe prime p that we used in our computer simulations was 10045850546888 5003633418577656224333902553170484436983273607309963845847739507115860865964753239939027972338834707903941940188314348678981808910413754306718965087266944429878241410578991733762502442817585765598816431431108282071433256273345939973526837788093199292557721204590554061504359121574222368307048919809010489980961017706729222034791017130925070426893349814057145812995340991548906078333104951440614482037356443864699967124299012034397810342312642333550598174454039699165710636052240583294703998189114479917657125270697086234200442489544474659560583354052797579309573507121265302226528942789519.

9 Conclusion

  • We have offered a key exchange protocol, resembling the classical Diffie–Hellman protocol, based on a semidirect product of two cyclic semigroups of matrices over Z p . One of the semigroups is additive, and the other one is multiplicative.

  • In our protocol, no power of any matrix or any element of Z p is ever exposed, so all standard attacks on Diffie–Hellman-like protocols are not applicable.

  • Security assumption, analogous to the computational Diffie–Hellman assumption, is computational infeasibility of recovering the value of a polynomial (of unknown degree) of a special form on three given matrices, from the values of two other polynomials (also of unknown degrees) on the same three matrices. A weaker security assumption is analogous to the discrete log assumption in Z p and is provably at least as hard.

  • Brown et al. [10] have cryptanalyzed the scheme in this article. By using the “telescoping” trick and tools of linear algebra, they have recovered the shared secret key without recovering the parties’ private keys. At the time of this writing, it is not clear whether the MAKE scheme can be adjusted to be resistant to this kind of attacks.

  1. Conflict of interest: Prof. Vladimir Shpilrain is a member of the Editorial Board in the Journal of Mathematical Cryptology, but he did not influence the review process of this paper.

References

[1] Diffie W, Hellman ME. New directions in cryptography. IEEE Trans Inform Theory. 1976;IT-22:644–54. 10.1109/TIT.1976.1055638Suche in Google Scholar

[2] Menezes A, van Oorschot P, Vanstone S. Handbook of applied cryptography. Boca Raton, FL: CRC-Press; 1996. Suche in Google Scholar

[3] Habeeb M, Kahrobaei D, Koupparis C, Shpilrain V. Public key exchange using semidirect product of (semi)groups. In: ACNS 2013, Lecture notes on computer science. Vol. 7954. Springer; 2013. p. 475–86. 10.1007/978-3-642-38980-1_30Suche in Google Scholar

[4] Stickel E. A new method for exchanging secret keys. In: Proceedings of the Third International Conference on Information Technology and Applications (ICITA 05). Contemporary Mathematics. Vol. 2. IEEE Computer Society; 2005. p. 426–30. 10.1109/ICITA.2005.33Suche in Google Scholar

[5] Shpilrain V. Cryptanalysis of Stickel’s key exchange scheme. In: Computer science in Russia 2008, Lecture notes on computer science. Vol. 5010. Springer; 2008. p. 283–8. 10.1007/978-3-540-79709-8_29Suche in Google Scholar

[6] Myasnikov AG, Roman’kov V. A linear decomposition attack. Groups Complexity Cryptol. 2015;7:81–94. 10.1515/gcc-2015-0007Suche in Google Scholar

[7] Roman’kov V. Linear decomposition attack on public key exchange protocols using semidirect products of (semi)groups. Preprint. http://arxiv.org/abs/1501.01152.Suche in Google Scholar

[8] Grigoriev D, Shpilrain V. Tropical cryptography II: extensions by homomorphisms. Comm Algebra. 2019;47:4224–9. 10.1080/00927872.2019.1581213Suche in Google Scholar

[9] Kahrobaei D, Shpilrain V. Using semidirect product of (semi)groups in public key cryptography. In: CiE 2016, Lecture Notes on Computer Science. Vol. 9709. Springer; 2016. p. 132–41. 10.1007/978-3-319-40189-8_14Suche in Google Scholar

[10] Brown D, Koblitz N, LeGrow J. Cryptanalysis of “MAKE.” Preprint. https://eprint.iacr.org/2021/465.10.1515/jmc-2021-0016Suche in Google Scholar

[11] Battarbee C, Kahrobaei D, Tailor D, Shahandashti SF. On the efficiency of a general attack against the MOBS cryptosystem. Preprint. https://arxiv.org/abs/2111.05806.10.1515/jmc-2021-0050Suche in Google Scholar

[12] Rahman N, Shpilrain V. MOBS (Matrices Over Bit Strings) public key exchange. Preprint. https://eprint.iacr.org/2021/560.Suche in Google Scholar

[13] Python code: MAKE, MAKE Challenge, http://shpilrain.ccny.cuny.edu/make.py.txt, http://shpilrain.ccny.cuny.edu/MAKE_Challenge.py.txt.Suche in Google Scholar

Received: 2020-12-06
Revised: 2021-12-05
Accepted: 2021-12-14
Published Online: 2022-01-07

© 2022 Nael Rahman and Vladimir Shpilrain, published by De Gruyter

This work is licensed under the Creative Commons Attribution 4.0 International License.

Heruntergeladen am 15.1.2026 von https://www.degruyterbrill.com/document/doi/10.1515/jmc-2020-0053/html
Button zum nach oben scrollen