Information security and data protection are among the key aspects, which should be intensively developing in the 21st century. A conventional approach to cryptographic algorithms offers to apply matrices to represent information. However, more recent approaches deploy other data structures, including permutations, thus necessitating accordance between differing data structures to integrate different methods into a wholistic system of processing and transmitting information. This study aims to generate permutations, which serve as a key for factorial data coding according to a known key matrix. The paper presents two algorithms for transforming a square matrix into a permutation. An example of matrix transformation following each of the proposed algorithms is given. A software model was created and described to investigate the transformation of square matrices into permutations with the Matlab software product. The authors have considered the built-in methods of statistical information processing in the Matlab program and their graphical representation by built-in functions, which are applied in the process of the software model. A matrix transformation has been performed according to the proposed algorithms. The paper investigates all possible combinations of a square matrix of order 2 with elements referring to the finite integer field modulo p = 17 and p = 23. According to each transforming algorithm, the results of a square matrix transforming into a permutation number are obtained in the lexicographic order. The statistical properties of the obtained results have been studied, and the most efficient algorithm for transforming matrices into permutations has been determined based on the distribution uniformity criterion for the generated permutation numbers. The study demonstrates that this algorithm can potentially be deployed in information exchange systems based on factorial data coding