Information in image using ideal ring bundles⋆ Oleg Riznyk1,† and Yurii Kynash1, ∗,† 1 Lviv Polytechnic National University, Lviv, 79013, Ukraine Abstract The article presents the use of information coding using the least significant bit of an image using a numerical linear-radial model. The application of technology, where images are used as a container, offers much more possibilities than text documents. Using image formats allows you to hide not only text messages, but also other images and files. For this, the use of technology based on the numerical beam is effective. This technology involves the replacement of some image pixels, which makes it possible to create efficient encoding and decoding algorithms that allow detecting up to 50% and correcting up to 25% of distorted pixels. The results of this work show the effectiveness of the proposed approach, both for graphic files and for text messages. Keywords ideal ring bundle, least meaningful bit, non-equidistant code, numeric line bundle 1 1. Introduction The process of transmitting information through communication channels provides for the reliability and confidentiality of the transmitted data. That is why it is important in the process of transmitting information to use modern technologies that provide interference-resistant coding and, accordingly, decoding of data in real time [1]. The risk of unauthorized interference in the data transmission process is a serious problem. Therefore, it is important to ensure the protection of information from unauthorized access, as well as from its distortion. The relevance of personal data protection is determined by the following main factors: • the increasing use of modern information technologies, the scale and diversity of the information dissemination process, a significant increase in the number of appropriate equipment; • increasing the level of trust and wider involvement of automated management systems and information processing methods; • the involvement of a significant number of people and enterprises in the process of information activities, the rapid increase of their information needs, the intensification of the flow of information between the participants of the process; • concentration of large volumes of information with different purposes using electronic media; • the use of information as a commodity, where there is competition on a market basis in the provision of information services and industrial espionage is possible; • emergence of various threats and detection of new channels with unauthorized access to information; AdvAIT-2024: 1st International Workshop on Advanced Applied Information Technologies, December 5, 2024, Khmelnytskyi, Ukraine - Zilina, Slovakia ∗ Corresponding author. † These authors contributed equally. oleh.y.riznyk@lpnu.ua (O. Riznyk); yurii.y.kynash@lpnu.ua (Y. Kynash) 0000-0002-3815-043X (O. Riznyk); 0000-0002-3762-3215 (Y. Kynash) © 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR ceur-ws.org Workshop ISSN 1613-0073 Proceedings • a significant increase in the number of skilled computer users who can potentially be involved in the process of creating malicious software and mathematical operations in information processing systems; • the presence of market relations in the software development process, including in relation to means of information protection [2, 3]. Modern requirements acutely raise the issue of preserving the confidentiality of information. Information security is important in various cyber-physical systems [4-6] and when using wireless sensor networks in smart systems [7]. Many different methods are used to protect information. A reliable method of protecting information is to hide part of the information in the image. This is important, for example, when ensuring reliable storage of patient records on computers in hospitals and when transferring them over unsecured networks [8,9]. One of the methods of image protection uses the principle of replacing a certain image color with a similar color. In the process of this replacement, the program replaces some pixels, and for this you need to calculate their location. This is a pretty good approach, as it will be difficult to determine the hiding technology for the text. It is worth noting that this approach can be applied not only to the textual information on the image, but also to the image itself. To do this, you need to place one image inside another image [10]. The application of the technology of using an image as a container provides significantly more opportunities compared to processing only text documents. The use of graphic formats makes it possible to hide, in addition to text messages, other images, as well as files. At the same time, an important condition is the size of the hidden image, which should not exceed the size of the storage image. That is why replacing some pixels in the image is an effective solution. The rest of this study is structured as follows: in the second section, a literature review was conducted on studies of the use of Barker and Golay codes, and the issue of image file protection algorithms is discussed. The methods and proposed model used in this paper are presented in the third section. The fourth chapter presents the results of the research, where there is a comparison of the proposed method with other known methods. Finally, in the conclusion section, the main results of the study are stated and the advantages of using the proposed method are indicated. 2. Related works Coding of information is used in various applied tasks. For example, paper [11] presents a hybrid coded method for an ultrasonic testing system, which uses a convolution of the Barker code and a pair of Golay codes. The combination of these two coding methods increases the flexibility of the code length. The use of a hybrid code for the excitation of directional waves showed a significant improvement in the signal-to-noise ratio and the peak level of the side lobes. A similar combination of convolution of Barker and Goley codes as coded excitation signals for low-voltage ultrasonic control devices was used in [12]. In [13], Barker codes are used in micro-computed tomography (micro-CT) to obtain micro-CT images and a k-wave toolkit-based micro-CT model is proposed that can visualize the microstructures of trabecular bone. The issue of effective use of Barker codes is also considered in the studies of other authors [14, 15]. This article deals with the problem of information failures caused by the following factors: • an increase in the number of computer users; • a large volume of information rotation; • a variety of information carriers; • an increase in the value of digital information; • an increase in the types of threats. The main focus of this article is on graphics files, as they are quite common at the moment. The rapid development of image compression algorithms led to changes in ideas about the mechanism of implementation of secret information. In papers [16, 17], the authors propose to include information in lower bits to reduce its visibility to an outside observer. So, the least significant bit (LMB) method. This is one of the simplest methods of digital steganography. The specified method will be used to hide data with container distortion, where the peculiarities of human perception are taken into account. The main idea of the method is as follows: we take a photo in BMP format, where it is best to use TrueColor in 24-bit format, and change the smallest color particles so that it remains unnoticed by the eye. The question arises, why use 24 bits. This is caused by one of the important factors of the container volume, that is, what can be squeezed into the image so that the image becomes sharp. From this follows the logical conclusion that the size of the container determines the volume of what it can contain. Therefore, modern 24-bit BMP files are most suitable for these tasks. This format assumes that three bytes are allocated to each point of the image, each of which contains information about its red, green and blue components, that is, we have a total of 3x8=24 bits. The procedure for adding a secret message looks like this: • select a message, perform its preliminary preparation: encrypt and archive. The result of these actions is the achievement of two goals at once: reducing the size and increasing the stability of the system; • the next step is to select a container and process the message from the previous point, in its lower bits, in any convenient way. The easiest way to implement is: • decompose the packed message according to the sequence of bits; • using a certain algorithm, the extra bits of the container are replaced with message bits. For the actions specified at this stage, most existing algorithms have a significant error [18, 19]. The degree of reliability of the specified implementation will strongly depend on the nature of the distribution of the least significant bit in the container, as well as in the message [20, 21]. For the vast majority of cases, we get different distributions in different grades [22, 23]. In the case of images built using binary codes, we will get a more or less uniform distribution of "0" and "1" in the lower bits, and therefore such actions can be noticed even visually by eye. The main goal of the work is the pseudo-random distribution of the smallest bit based on ideal ring bundles. The research objectives are to use ideal ring bundles to encode and decode the smallest bit with the ability to find and repair damaged pixels. Therefore, an important task is the selection of the LCM distribution [24-26]. 3. Improvement of the method It is proposed to use the combinatorial numerical model of the ideal ruler bundle (IRB) for the LMB- decomposition [27]. The ideal ruler bundle with parameters (𝑆𝑆𝑛𝑛 , 𝑛𝑛, 𝑟𝑟) – is an algebraic structure formed by a sequence of 𝑛𝑛 positive integers, the values of which, as well as the values of the sums for adjacent numbers placed between each other, exhaust the number of natural numbers no more than once (𝑟𝑟 = 1). The elements of the IRB are located one after another in the form of a chain, and their sum is equal to 𝑆𝑆𝑛𝑛 [28]. IRB is the maximal combinatorial diversity of a system of integers 𝑘𝑘1 , 𝑘𝑘2 , … , 𝑘𝑘𝑛𝑛 subject to the arithmetic operation of addition with the restriction on the addition rule: only adjacent numbers can be added. Consider the following structure of a line, where the condition that the numbers are arranged in a line and characterized by the following numerical set of elements (1) [27] is fulfilled: 𝑘𝑘1 , 𝑘𝑘2 , … , 𝑘𝑘𝑛𝑛 ; 𝑘𝑘1 + 𝑘𝑘3 , 𝑘𝑘2 + 𝑘𝑘3 , … , 𝑘𝑘𝑛𝑛−1 + 𝑘𝑘𝑛𝑛 ; (1) 𝑘𝑘1 + 𝑘𝑘2 + 𝑘𝑘3 , 𝑘𝑘2 + 𝑘𝑘3 + 𝑘𝑘4 , … , 𝑘𝑘𝑛𝑛−2 + 𝑘𝑘𝑛𝑛−1 + 𝑘𝑘𝑛𝑛 ; 𝑘𝑘1 + 𝑘𝑘2 + ⋯ +𝑘𝑘𝑛𝑛 . Let's consider the main steps of the algorithm for encoding each pixel of an image from ASCII codes to IKV-based codes. To solve this problem, it is necessary to find an optimal combinatorial variant of chain powers, in which any natural number can be determined in a unique way [28, 29]. Since an encoding is used for an ASCII code table with 256 codes, but no packets are found for the sum of 256, then for example the following IRBs (283, 20, 1) should be used [28]. Based on the input data, you need to create an array of codes. This set consists of an array, where each element has the following form (0, 0, ..., 0, 0): • we take the serial number of the symbol from the selected alphabet, if this number is between the communication elements of the bundle, then “1” will be written into the array element, at the position of the necessary communication element of the bundle; • if the specified serial number is not in the table, then "1" will be placed on the position of the package elements that give the required amount. It should be kept in mind that such summation will be performed according to the rules defined for the IRB. The next steps are to read from the symbol file of the source information, then the number of the symbol to be read in the given alphabet will be determined, the code corresponding to the specific given number will be determined. This code will be stored in an intermediate file. Next, the code from the intermediate file will be sequentially added to the low-order RGB bits of the BMP file. Consider the proposed coding process using the following example: IRB (11, 4, 1)=(3, 1, 5, 2). The selected alphabet consists of 11 characters. Hence, the IRB-based code table would look like this: №1 0 1 0 0 №6 0 1 1 0 №2 0 0 0 1 №7 0 0 1 1 №3 1 0 0 0 №8 0 1 1 1 №4 1 1 0 0 №9 1 1 1 0 №5 0 0 1 0 №11 1 1 1 1 The characters of the alphabet will be indicated by serial numbers. So, for example, the message (11 2 4 1) will be encoded as shown below: 1111 0001 1100 0100 This sequence will be in the intermediate file. When performing the decoding procedure of such an image, the output values of the least significant RGB bits in the BMP file will be calculated from the sequence of the least significant RGB bits in the BMP file, and then it will be necessary to read a sequence of n symbols in the order of n IRB. To read n characters, we select the IRB code table in which the encoding of the ASCII alphabet character was performed, and finally get the result file. To solve the problem of preventing the loss of digital data, it is necessary to create an effective interference-resistant code based on an ideal ring beam to ensure reliable protection and recovery of information [29]. The corresponding software product uses the generated code as a basis in the procedure of encoding and decoding information [28]. A set of ideal ring bundles (IRB) is a cyclic sequence of numbers in which all possible cyclic sums exhaust the values of natural numbers from 1 to 𝑆𝑆𝑛𝑛 = 𝑛𝑛(𝑛𝑛 − 1) [29] (Fig.1). Figure 1: Ideal ring bundle. The corresponding structure based on ideal ring bundles is shown in Figure 2. Figure 2: The code is based on the ideal ring-bundles The following values are used here: 𝑛𝑛 = 4, 𝑅𝑅 = 2. Length of the code sequence is determined as follows: 𝑛𝑛(𝑛𝑛 − 1) (2) 𝑆𝑆𝑛𝑛 = + 1 = 7. 𝑅𝑅 Number of the detected errors is determined as follows: 𝑡𝑡1 = 2(𝑛𝑛 − 𝑅𝑅) − 1 = 3. (3) Number of the detected errors is determined as follows: 𝑡𝑡2 = 𝑛𝑛 − 𝑅𝑅 − 1 = 1. (4) Let's consider the data encoding and decoding scheme by the method proposed in the paper. The construction of the coding alphabet will be performed through a cyclic shift of the base sequence, procedures for adding inverse sequences, sequences of zeros and ones, and performing a bit parity check [29], as shown in Figure 3. Figure 3: Construction of the encoding alphabet. Let's consider the decryption and error correction scheme [30]. Next, we need to perform a comparison between the input sequence and the encoding alphabet. The most similar sequence will be correct, as shown in Figure 4. Figure 4: Decoding and fixing errors. We will use the schemes presented in Figure 3 and Figure 4 to test methods of encoding, decoding and error correction. 4. Results Let's consider the results obtained by our method and compare them with other known methods. The comparison was made according to each of the methods, which are based on interference- tolerant coding, taking into account the redundancy, the number of found and corrected damaged pixels. A comparison with existing solutions [29] is shown in Figure 5. We see a comparison of our approach with methods BCH, Hemmings and Non-equidistant. Figure 5: The number of information symbols. Table 1 shows the numerical data of the number of information symbols for our method, as well as the methods of Non-equidistant, Hemmings and BCH. Table 1 The number of information symbols № N Ni Ni Ni Ni Own Non- equidistant Hemmings BCH 1 3 1 2 1 1 2 7 4 3 3 3 3 15 5 4 10 5 4 31 6 5 26 6 The number of errors, which are being fixed shown in Figure 6. Figure 6: The number of errors, which are being fixed. The results of the performed numerical calculations with corrected errors are shown in Table 2. Here, the results of the calculations for our method, as well as for the methods Non-equidistant, Hemmings and BCH are presented. Table 2 The number of errors, which are being fixed № N t2 t2 t2 t2 Own Non- equidistant Hemmings BCH 1 3 0 0 1 1 2 7 1 1 1 1 3 15 3 3 1 3 4 31 7 7 1 5 Figure 7 shows the power of BCH, Non-equidistant and our codes. We can see in the figure presented results for four different sets. Figure 7: Power of the code. Accordingly, the results of the numerical calculation of the power of the code for our method, Non-equidistant and BCH are shown in Table 3. Table 3 The code powers № N P P P Own Non- equidistant BCH 1 3 2 6 2 2 7 16 14 8 3 15 32 30 32 4 31 64 62 64 In this way, a software product that simulates error-tolerant code based on IRB has been implemented. When running the check on the graphics file, the following results were obtained: the number of errors fixed was 12118, the number of errors introduced was 13465. The maximum percentage of damage was 20%, and the damage was 15%. When using a text file, the following results were obtained: the number of errors that were corrected - 541, the number of errors that were introduced - 570. For the text file, the maximum percentage of damage was within 75%, damage reached 60%. 5. Conclusion The developed coding method based on ideal ring bundles has high redundancy (the length of the output code is more than twice the input code) compared to other methods, but this is a price to pay for the ability to detect up to 50% and correct up to 25% of errors. The article provides a comparative analysis of error-tolerant code based on IRB with other known methods. The main contribution of this work is as follows: • the only previously unreported case of improving non-equidistant codes is presented; • an error-correcting code model is developed based on ideal ring rays, which allows correcting up to 25% of errors in a code word; • an improved method of an error-correcting code with a non-equidistant structure, introducing information symbols into the code sequence. The advantage of the coding method based on ideal ring rays is high false stability of the code. In the developed coding method based on ideal ring rays, high redundancy is corrected compared to a non-equidistant code sequence. Due to its properties, this coding method is able to compete with well- known Hamming and BCH code solutions on the market. This solution can be used in many areas, both for personal use of users and for recording important data with the ability to preserve their integrity. Thus, the possibility of coding information in an image using IRB models was demonstrated, creating effective coding and decoding algorithms. The study of combinatorial optimization models and methods expands the scope of practical application of linear rays in computer science problems and the design of reliable coding systems. Declaration on Generative AI The authors have not employed any Generative AI tools. References [1] J. Zhang, P. Gu, Z. Wang, J. Zou, G. Liu, A Low-Complexity Security Scheme for Drone Communication Based on PUF and LDPC, Drones 8 (2024) 472. doi:10.3390/drones8090472. [2] AMN Aljalai, C. Feng, VCM Leung, R. Ward, Improving the energy efficiency of dft-s-ofdm in uplink massive mimo with barker codes, in 2020 International Conference on Computing, Networking and Communications (ICNC), 2020, pp. 731–735. doi: 10.1109/ICNC47757.2020.9049829. [3] J. Fu, G. Ning. Barker coded excitation using pseudo chirp carrier with pulse compression filter for ultrasound imaging, in: BIBE 2018 International Conference on Biological Information and Biomedical Engineering, Shanghai, China, 2018, pp. 1-5. [4] Calabro, E. Cambiaso, M. Cheminod, I.C. Bertolotti, L. Durante, A. Forestiero, F. Lombardi, G. Manco, E. Marchetti, A. Orlando, G. Papuzzo, A Methodological Approach to Securing Cyber- Physical Systems for Critical Infrastructures, Future Internet 16 (2024) 418. doi:10.3390/fi16110418. [5] T. Hovorushchenko, V. Baranovskyi, O. Ivanov, A. Hnatchuk, Subsystem for monitoring atmospheric air quality in the cyber-physical system "Smart City", in: T. Hovorushchenko (Eds), Computer Systems and Information Technologies no 1 (2024) 17-26. doi:10.31891/csit- 2024-1-2. [6] R. Pinto, P.M.B. Torres, V. Lohweg, Closing Editorial: Advances and Future Directions in Autonomous Systems for Cyber–Physical Systems and Smart Industry, Appl. Sci. 14 (2024) 10673. doi:10.3390/app142210673. [7] O. Riznyk, Y. Kynash, N. Kustra, R. Kuharchuk, Construction of security smart systems using wireless sensor networks, in: 2023 IEEE 18th International Conference on Computer Science and Information Technologies (CSIT), Lviv, Ukraine, 2023, pp. 1-4. doi: 10.1109/CSIT61576.2023.10324230. [8] M. Wang, S. Cong, S. Zhang, Pseudo Chirp-Barker-Golay coded excitation in ultrasound imaging, in: 2018 Chinese Control And Decision Conference (CCDC), Shenyang, 2018, pp. 4035- 4039. doi:10.1109/CCDC.2018.8407824. [9] S. Wang, P. He, Research on Low Intercepting Radar Waveform Based on LFM and Barker Code Composite Modulation, in: 2018 International Conference on Sensor Networks and Signal Processing (SNSP), Xi'an, China, 2018, pp. 297-301. doi:10.1109/SNSP.2018.00064. [10] S. Xia, Z. Li, C. Jiang, S. Wang, K. Wang, Application of Pulse Compression Technology in Electromagnetic Ultrasonic Thickness Measurement, in: 2018 IEEE Far East NDT New Technology & Application Forum (FENDT), Xiamen, China, 2018, pp. 37-41. doi:10.1109/FENDT.2018.8681975. [11] Z. Fan, X. Niu, B. Miao, H. Meng, Hybrid Coded Excitation of the Torsional GuidedWave Mode T(0,1) for Oil and Gas Pipeline Inspection, Applied Science 12 (2022) 777. doi:10.3390/app12020777. [12] Z. Fan, J. Rudlin, G. Asfis, H. Meng. Convolution of Barker and Golay Codes for Low Voltage Ultrasonic Testing Technologies 2019, 7, 72; doi:10.3390/technologies7040072. [13] Y. Yin, S. Yan, J. Huang, B. Zhang, Transcranial Ultrasonic Focusing by a Phased Array Based on Micro-CT Images, Sensors 23 (2023) 9702. doi:0.3390/s23249702. [14] D. Yi, H. Jin, M.C. Kim, S.C. Kim, An Ultrasonic Object Detection Applying the ID Based on Spread Spectrum Technique for a Vehicle, Sensors 20 (2020) 414. doi:10.3390/s20020414. [15] V.M. Duong, J. Vesely, P. Hubacek, P. Janu, N.G. Phan, Detection and Parameter Estimation Analysis of Binary Shift Keying Signals in High Noise Environments, Sensors 22 (2022) 3203. doi:10.3390/s22093203. [16] S. Wang, L. Zhang, Z. Lu, H. Zhang, Z. Yang and X. Yu, Photonic Generation of Barker-code Phase-Coded Terahertz Signals, in: 2021 46th International Conference on Infrared, Millimeter and Terahertz Waves (IRMMW-THz), 2021, pp. 1-2. doi: 10.1109/IRMMW- THz50926.2021.9567054. [17] N. Memarsadeghi, NASA Computational Case Study: Golomb Rulers and Their Applications, Computing in Science & Engineering 18, no. 6 (2016) 58-62. doi:10.1109/MCSE.2016.118. [18] O. I. Berngardt, A. L. Voronov, K. V. Grkovich, Optimal signals of Golomb ruler class for spectral measurements at EKB SuperDARN radar: Theory and experiment, Radio Science 50, no. 6 (2015) 486-500. doi: 10.1002/2014RS005589. [19] O. Oshiga, S. Severi, G. T. F. de Abreu, Superresolution Multipoint Ranging With Optimized Sampling via Orthogonally Designed Golomb Rulers, IEEE Transactions on Wireless Communications 15, no. 1 (2016) 267-282. doi:10.1109/TWC.2015.2470687. [20] C. A. Martos Ojeda, L. M. Delgado Ordoñez, C. A. Trujillo Solarte, Bh Sets as a Generalization of Golomb Rulers, IEEE Access 9 (2021) 118042-118050. doi:10.1109/ACCESS.2021.3106617. [21] D. Kim, I. Kim, H. Cho, H. Choi, H. -Y. Song, Performance Analysis of QC-LDPC codes constructed by using Golomb rulers, in: 2022 27th Asia Pacific Conference on Communications (APCC), Jeju Island, Korea, Republic of, 2022, pp. 301-302. doi:10.1109/APCC55198.2022.9943662. [22] D. Kim, H. Choi, H. -Y. Song, QC-LDPC codes from various Golomb Rulers, in: 2023 14th International Conference on Information and Communication Technology Convergence (ICTC), Jeju Island, Korea, Republic of, 2023, pp. 106-110. doi:10.1109/ICTC58733.2023.10392287. [23] S. Priambodo, A. Hambali, B. Pamukti, P. P. Melati, R. F. Putra, Evaluation of Optimum Golomb Ruler Performance for NG-PON2 Networks, in: 2019 4th International Conference on Information Technology, Information Systems and Electrical Engineering (ICITISEE), Indonesia, 2019, pp. 1-5. doi: 10.1109/ICITISEE48480.2019.9003907. [24] J. Vyas, S. Bansal, K. Sharma, Generation of optimal Golomb rulers for FWM crosstalk reduction: BB-BC and FA approaches, in: 2016 International Conference on Signal Processing and Communication (ICSC), Noida, India, 2016, pp. 74-78. doi: 10.1109/ICSPCom.2016.7980551. [25] C. A. M. Ojeda, D. F. D. Urbano, C. A. T. Solarte, Near-Optimal g-Golomb Rulers, IEEE Access 9 (2021) 65482-65489. doi:10.1109/ACCESS.2021.3075877. [26] D. F. D. Urbano, C. A. M. Ojeda, C. A. T. Solarte, lmost Difference Sets From Singer Type Golomb Rulers, IEEE Access 10 (2022) 1132-1137. doi:10.1109/ACCESS.2021.3137996. [27] I. Tsmots, O. Riznyk, V. Rabyk, Y. Kynash, N. Kustra, M. Logoida, Implementation of fpga-based barker’s-like codes, in: V. Lytvynenko, S. Babichev, W. Wójcik, O. Vynokurova, S. Vyshemyrskaya, S. Radetskaya (Eds), Lecture Notes in Computational Intelligence and Decision Making (ISDMCI 2019), volume 1020 of Advances in Intelligent Systems and Computing, Springer, Cham, 2020, pp. 203–214. doi: 10.1007/978-3-030-26474-1_15. [28] I. Tsmots, V. Rabyk, O. Riznyk, Y. Kynash, Method of Synthesis and Practical Realization of Quasi-Barker Codes, in: 2019 IEEE 14th International Scientific and Technical Conference on Computer Sciences and Information Technologies (CSIT), Lviv, Ukraine, 2019, pp. 76-79. doi:10.1109/STC-CSIT.2019.8929882. [29] O. Riznyk, N. Kustra, Y. Kynash, R. Vynnychuk, Method of Constructing Barker-Like Sequence on the Basis of Ideal Ring Bundle Families, in: 2019 IEEE International Scientific-Practical Conference Problems of Infocommunications, Science and Technology (PIC S&T), Kyiv, Ukraine, 2019, pp. 207-211. doi:10.1109/PICST47496.2019.9061375.