PYTHON MODEL OF SECRET KEY AGREEMENT IN THE GROUP OF ARBITRARY NUMBER OF PARTICIPANTS

2024;
: 93-101
1
Lviv Polytechnic National University
2
Lviv Polytechnic National University

The article is devoted to the problem of common secret key agreement in a group of an arbitrary number of participants. Data is exchanged between participants through open data channels. The problem of sharing a secret key over open data channels arose due to the need for a secure exchange of information between two or more parties that may be remote from each other and do not have a common confidential communication channel. Reliable methods of secret key exchange, such as transferring the key in person or using a secure channel, are not practical in remote or scalable scenarios. In the process of developing and modelling cryptographic systems, in which there is a need of cryptographic keys agreement in a group of two or more participants, it is very convenient to have a model that implements these algorithms. The agreement protocol is based on the Diffie-Hellman protocol on elliptic curves (ECDH). The paper contains theoretical justifications, a flow chart of the algorithm, and a Python implementation of the algorithm that performs the secret key agreement in a group of an arbitrary number of participants. To implement cryptographic operations on elliptic curves, the Python library Cryptography is used, in particular, the X25519 algorithms that use the elliptic curve Curve25519. The results of the work are shown on an example for a group of four participants, which demonstrate the correct operation of the model and the same secret key obtained as a result of agreement process. The paper also contains the link to a GitHub repository with the full program. The multi_participant_ecdh.py file contains a secret key agreement program for N participants written in Python. The file two_participant_ecdh.py demonstrates a typical two-participant Diffie-Hellman protocol. Both programs use the X25519 algorithm implemented in the Cryptography Python library. Thus, this work makes it possible to better understand the principles of secret key exchange algorithms between two and an arbitrary number of participants, to compare the results with other implementations, to apply the developed model for educational and demonstration purposes, and may be useful for a number of other scientific and engineering tasks.

[1].   W. Diffie and M. Hellman, "New directions in cryptography," in IEEE Transactions on Information Theory, November 1976, vol. 22, no. 6, pp. 644-654, available at: https://www-ee.stanford.edu/~hellman/publications/24.pdf (Accessed 24 February 2024), doi: 10.1109/TIT.1976.1055638.

[2].   Burmester, M. (2011), “Group Key Agreement,” in Encyclopedia of Cryptography and Security, Springer, Boston, MA, pp. 520-526, available at: https://doi.org/10.1007/978-1-4419-5906-5_320 (Accessed 24 February 2024), doi: 10.1007/978-1-4419-5906-5_320.

[3].   Wu, Q., Mu, Y., Susilo, W., Qin, B. and Domingo-Ferrer, J. (2009), "Asymmetric Group Key Agreement," in Advances in Cryptology – EUROCRYPT 2009, Lecture Notes in Computer Science, Springer, Berlin, Heidelberg, vol. 5479, pp. 153-170, available at: https://doi.org/10.1007/978-3-642-01001-9_9 (Accessed 24 February 2024), doi: 10.1007/978-3-642-01001-9_9.

[4].   K. Shen, L. Zhang, R. Zhang and Q. Fang, "Asymmetric Group Key Agreement Protocol from Short Signatures," in 2022 IEEE 8th International Conference on Computer and Communications (ICCC), Chengdu, China, 2022, pp. 1229-1233, available at: https://ieeexplore.ieee.org/document/10065683 (Accessed 24 February 2024), doi: 10.1109/ICCC56324.2022.10065683.

[5].   Alwen, J., Coretti, S., Jost, D. and Mularczyk, M. (2020), "Continuous Group Key Agreement with Active Security," in Theory of Cryptography, TCC 2020, Lecture Notes in Computer Science, Springer, Cham, vol. 12551, pp. 261-290, available at: https://doi.org/10.1007/978-3-030-64378-2_10 (Accessed 24 February 2024), doi: 10.1007/978-3-030-64378-2_10.

[6].   L. Harn and C. Lin, "Efficient group Diffie–Hellman key agreement protocols", Computers & Electrical Engineering, 2014, vol. 40, issue 6, pp. 1972-1980, ISSN 0045-7906, available at: https://doi.org/10.1016/j.compeleceng.2013.12.018 (Accessed 24 February 2024), doi: 10.1016/j.compeleceng.2013.12.018.

[7].   Byun, J.W. and Lee, D.H. (2005), "N-Party Encrypted Diffie-Hellman Key Exchange Using Different Passwords," in Applied Cryptography and Network Security, ACNS 2005, Lecture Notes in Computer Science, Springer, Berlin, Heidelberg, vol. 3531, pp. 75-90, available at: https://doi.org/10.1007/11496137_6 (accessed 24 February 2024), doi: 10.1007/11496137_6.

[8].   K. V. Pradeep, V. Vijayakumar and V. Subramaniyaswamy, "An Efficient Framework for Sharing a File in a Secure Manner Using Asymmetric Key Distribution Management in Cloud Environment", Journal of Computer Networks and Communications, 2019, vol. 2019, 8 pages, article ID 9852472, available at: https://doi.org/10.1155/2019/9852472 (Accessed 24 February 2024), doi: 10.1155/2019/9852472.

[9].   X. Li, Y. Wang, P. Vijayakumar, D. He, N. Kumar and J. Ma, "Blockchain-Based Mutual-Healing Group Key Distribution Scheme in Unmanned Aerial Vehicles Ad-Hoc Network," in IEEE Transactions on Vehicular Technology, Nov. 2019, vol. 68, no. 11, pp. 11309-11322, available at: https://ieeexplore.ieee.org/abstract/document/8846098 (Accessed 24 February 2024), doi: 10.1109/TVT.2019.2943118.

[10]. L. Zhang, Q. Wu, B. Qin, J. Domingo-Ferrer and Ú. González-Nicolás, "Asymmetric group key agreement protocol for open networks and its application to broadcast encryption", Computer Networks, 2011, vol. 55, issue 15, pp. 3246-3255, ISSN 1389-1286, available at: https://doi.org/10.1016/j.comnet.2011.06.016 (Accessed 24 February 2024), doi: 10.1016/j.comnet.2011.06.016.

[11]. L. Zhang, F. Zhang, Q. Wu and J. Domingo-Ferrer, "Simulatable certificateless two-party authenticated key agreement protocol", Information Sciences, 2010, vol. 180, issue 6, pp. 1020-1030, ISSN 0020-0255, available at: https://doi.org/10.1016/j.ins.2009.11.036 (Accessed 24 February 2024), doi: 10.1016/j.ins.2009.11.036.

[12]. Y. Sun, Q. Wen, H. Sun, W. Li, Z. Jin and H. Zhang, "An Authenticated Group Key Transfer Protocol Based on Secret Sharing", Procedia Engineering, 2012, vol. 29, pp. 403-408, ISSN 1877-7058, available at: https://doi.org/10.1016/j.proeng.2011.12.731 (Accessed 24 February 2024), doi: 10.1016/j.proeng.2011.12.731.

[13]. I. Ingemarsson, D. Tang and C. Wong, "A conference key distribution system," in IEEE Transactions on Information Theory, September 1982, vol. 28, no. 5, pp. 714-720, available at: https://ieeexplore.ieee.org/document/1056542 (Accessed 24 February 2024), doi: 10.1109/TIT.1982.1056542.

[14]. Padmashree, M.G., Mallikarjun, Arunalatha, J.S., Venugopal, K.R. (2022), "GKEAE: Group Key Exchange and Authentication with ECC in Internet of Things," in Intelligent Systems, Lecture Notes in Networks and Systems, Springer, Singapore, vol. 431, pp. 1-10, available at:

[15]. https://doi.org/10.1007/978-981-19-0901-6_1 (Accessed 24 February 2024), doi: 10.1007/978-981-19-0901-6_1.

[16]. S. Gupta, A. Kumar and N. Kumar, "Design of ECC based authenticated group key agreement protocol using self-certified public keys," in 2018 4th International Conference on Recent Advances in Information Technology (RAIT), Dhanbad, India, 2018, pp. 1-5, available at: https://ieeexplore.ieee.org/document/8388999 (Accessed 24 February 2024), doi: 10.1109/RAIT.2018.8388999.

[17]. V. C. Giruka, S. Chakrabarti and M. Singhal, "A distributed multi-party key agreement protocol for dynamic collaborative groups using ECC", Journal of Parallel and Distributed Computing, 2006, vol. 66, issue 7, pp. 959-970, ISSN 0743-7315, available at: https://doi.org/10.1016/j.jpdc.2006.03.006 (Accessed 24 February 2024), doi: 10.1016/j.jpdc.2006.03.006.

[18]. Letenko, Yu.O., Riabukho, O.M. and Turka, T.V. (2015), "Protokoly rozpodilu ta uzghodzhennia kliucha [Key Distribution and Reconciliation Protocols]", Zbirnyk naukovykh prats fizyko-matematychnoho fakultetu DDPU, issue 5., pp. 30-37, available at: http://dspace.ddpu.edu.ua/ddpu/bitstream/123456789/409/1/znp-2015_030.pdf (Accessed 24 February 2024).

[19]. Krasylenko, V. H. and Nikitovych, D.V. (2017), "Modeliuvannia protokoliv uzghodzhennia sekretnoho matrychnoho kliucha dlia kryptohrafichnykh peretvoren ta system matrychnoho typu [Modelling secret matrix key agreement protocols for cryptographic transformations and matrix-type systems]", Systemy obrobky informatsii, issue 3, pp. 151-157, available at: http://nbuv.gov.ua/UJRN/soi_2017_3_32 (Accessed 24 February 2024).