{'fraction_non_alphanumeric': 0.027883305856211023, 'fraction_numerical': 0.018206580173464267, 'mean_word_length': 4.957301451750641, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Development of modified RSA algorithm using fixed mersenne prime numbers for medical ultrasound imaging instrumentation

Abstract Purpose: Encryption of patient information has become an important issue in medical ultrasound instrumentation to secure information when images are accessed off-site. The proposed algorithm is used to encrypt private medical images and transfer the encrypted images to improve the encryption capability and elapsed time. Materials and methods: We generate a public key using three prime numbers, including a fixed Mersenne prime number, in the modified Rivest-Shamir-Adelman (RSA) algorithm to compare the encryption capability. We calculated and compared the elapsed time using the modified RSA algorithm with a breast phantom in the medical ultrasound imaging instrumentation. Results: The encryption capability is improved because the elapsed time when using three prime numbers is longer (1.2337 s) than that when using two prime numbers (1.0712 s). However, the elapsed time using fixed Mersenne prime numbers (0.8360 s) is a similar to that using two prime numbers (0.8389 s). Conclusions: Our proposed cryptographic algorithm provides improved encryption in medical ultrasound imaging compared to algorithms that use two prime numbers that are not Mersenne prime numbers, while transmitting images with adequate elapsed times.


Introduction
Ultrasound is used in a variety of applications such as medical diagnostics and therapy, non-destructive testing, and sound navigation and range [1][2][3]. In particular, medical ultrasound imaging is a non-invasive and inexpensive technique compared to X-ray, computed tomography, and positron emission tomography [4,5]. Owing to the developments in the semiconductor industry, medical ultrasound imaging instrumentation has been widely used for cost-effective diagnostic solutions [6,7]. Therefore, ultrasound imaging is one of the most useable medical techniques that can be used for direct on-site diagnosis in emergency rooms, as well as an off-site diagnostic tool in ambulances; however, diagnosis in an ambulance increases the chance of invasion of patient information [8,9]. Therefore, encrypting patient information has become important in medical ultrasound instrumentation to secure this information when images are accessed off site.
Rivest-Shamir-Adelman (RSA) is one of the private-key based algorithms to transmit secure data for e-mail, web, and ATM machines [10]. In the RSA algorithm, the encryption of the public key is known and the decryption of the private key is secret such that the encryption and decryption of the complexity mechanism is basically based on the number of prime numbers in the key that need to be factorized [11]. To use completely secure data transmission, prime numbers that have more than 100 digits need to be factorized because very long computing time and huge powerful computing power are essential for the decryption of the prime numbers compared to the factorization of only two prime numbers; this is because only two prime numbers are typically easily breakable [12]. The use of three prime numbers was proposed to improve the security and reduce the processing time [13]. However, the proposed scheme requires the use of a large database. Four prime numbers were utilized to improve complexity and increase the security of the systems such that the key encryption and decryption time increased considerably [14]. Therefore, the RSA algorithms using four prime numbers or three prime numbers may not be highly effective for use in emergency rooms and ambulances for patient diagnosis because of the encryption/ decryption time and large database.
A Kobayashi algorithm was developed to encrypt pixel data of digital images for secured image transmission. This algorithm extracts the pixel and security data to achieve the required security [15]. The Hamming code was also used to reduce error in the data using an error correction technique [16]. The decryption algorithm using the RC4 cipher and two substitutive modulations with sufficient capacity was proposed to show the image reliability [17]. Recently, a 1024-bit RSA encryption algorithm was proposed to protect the patient information [18].
However, our proposed modified RSA-based algorithm using Mersenne prime numbers is a very simple cryptographic algorithm without complex encoding/ decoding programming techniques. Therefore, we first propose a novel modified RSA algorithm using Mersenne prime number to transmit secure patient imaging data with appropriate computing time. In the Method section, we describe the development of the modified RSA algorithms to verify the encryption capability. In Result section, we describe the application of the developed modified RSA algorithms to the encryption and decryption of medical images obtained from a breast phantom; moreover, we compare the RSA algorithms using two prime numbers with our developed modified RSA algorithms using two prime and one fixed Mersenne prime number. Conclusion section presents the conclusion of our paper. Figure 1 shows the architecture of the medical ultrasound instrumentation with cryptosystem. The breast phantom images obtained are transferred through the cryptosystem to evaluate the encryption capability of the developed modified RSA algorithms using fixed Mersenne prime numbers.

Method
In a mathematics, a Mersenne prime is a very special prime number one less than a power of two. That is, it is a prime number (p) of the form M p ¼ 2 p À1 [19]. RSA is a well-known cryptographic algorithms that use two prime numbers; it is still widely used for ATM machines in banks [10]. Our proposed modified RSA algorithm uses three prime numbers-P x , P 1 , and P 2 , where P x is a fixed Mersenne prime number. The selected numbers that consist of three prime numbers are more difficult to factorize than numbers consisting of two prime numbers [10,20]. Table 1 shows the detailed procedure of the proposed cryptographic algorithm using three prime numbers including a Mersenne prime number.
We randomly select three prime numbers 43, 53, and 31, which are fixed prime numbers. To compare the factoring, we select two more prime numbers. One is 1327, which is less than 1333 (¼ U (31 Â 43)); the other is 1361, which is greater than 1333. n represents the composite number obtained by multiplying the prime numbers. Table 2 shows the elapsed times for factoring numbers larger and smaller than 65535. U(n) is selected as the middle number of the selected prime numbers. According to the results shown in Table 2, it is clear that the factoring of the proposed algorithm using a fixed Mersenne prime number is stronger than that of two prime numbers because it has a longer mean time (1.2337 s) with three prime  Table 1. Procedure for the proposed cryptographic algorithm that uses two prime numbers with one fixed Mersenne prime number. Algorithm 1. Choose three prime numbers (P x , P 1 , P 2 ) ¼ 1 2. Compute n, where n is used as the modulus n ¼ P x Á P 1 Á P 2 3. Compute Euler's function U(n) = (P x À 1)Á( P 1 À 1) Á (P 2 À 1) 4. Select integer e (U(n), e)¼1 , where 1< e < U(n) 5. Calculate d using Euclidean algorithm eÁd1(mod U(n))  Figure 2 shows the test breast phantom and cryptographic system. To verify the modified RSA algorithm, we used a multi-modal breast phantom (Model 073, CIRS Inc., Norfolk, VA), as shown in Figure 1(a). The images obtained from the ultrasound machine (E-cube 12 R, Alpinion Technologies Inc., Seoul) were transferred to the constructed streaming server and these data were wirelessly transmitted via a Wi-Fi channel to the wireless receiver. The data received from the wireless receiver were decoded to retrieve the image data. Figure 2(b) shows the embedded Linux system based on an ARM7 core. The role of the system is to generate prime numbers, the composite number n, U(n), private key, public key, and to distribute the public key. We used streaming-type encryption for the ultrasound imaging data. Two bytes represent the range from 0 to 65535 (0 Â FFFF) in the 2 16 À1 digit number. Therefore, encryption is performed for each 2-byte size. Figure 3 shows the ultrasound image obtained from the breast phantom (Model 073). To encode 2byte data from 0 to 65535, we selected a value of n that is greater than 65535. We then encoded the cipher stream (C) from the plain stream (M), C ¼ M e (mod n). Here, n is a composite number that is the product of the selected prime numbers. The composite number n is the public key for encoding the data in the proposed RSA algorithm. As the composite number is large, the elapse time for factorization in prime numbers is typically longer, leading to a longer elapse time to decode the public key, and thus improving the strength of the encryption. Table 3 shows a comparison of the encryption speed results obtained using two and three prime numbers. The elapse time using Mersenne prime numbers is slightly shorter (0.8360 s) than that using two prime numbers (0.8365 and 0.8389 s). The digital imaging and communication in medicine (DICOM) files obtained from ultrasound machines need to be extracted to separate the private information and   image data. The performances of the original image and images encrypted with the conventional RSA and modified RSA algorithms using Mersenne prime numbers were compared after the encryption process. Figure 4 shows the DICOM images when using the conventional RSA encrypting algorithm and the modified RSA encrypting algorithm using Mersenne prime numbers, respectively. Additionally, the images were compressed to compare the performances of the conventional RSA and modified RSA encryption algorithms. After encrypting the DICOM images obtained from the ultrasound instrumentation, the mean square error (MSE), structural similarity index (SSIM), peak signal-to-noise ratio (PSNR), and root mean square error (RMSE) values were measured and compared to evaluate the capability comparison of the algorithms [2,3]. MSE is the average precision value of the mean error deviation between the modelled and processed images [21]. SSIM is the index value that shows the similarity between the original and encrypted images [22]. PSNR is the ratio between the measured maximum signal power level and the noise signal power level of the encrypted images [23]. Therefore, higher PSNR is desirable for image processing and reconstruction because the noise signal power level is the minimum detection level of the signals [24][25][26]. RSME is used to measure the precision of the images between the modelled and measured environment [27]. A lower RSME is preferable because it indicates that the encrypted images are more similar to the original images. The MSE, RSME, and SSIM performances are measured based on error values, and the PSNR performances are measured based on the dB scales.

Results
We compared the image compression ratios when using the conventional RSA and modified RSA algorithms using Mersenne prime numbers. The measured MSE values are 5366.5578 and 2867.0798, respectively.
We also compared the PSNR values of the encrypted ultrasound images when using RSA and modified RSA algorithms. The PSNR value when using the modified RSA encrypting algorithm (13.5564 dB) is higher than that when using the conventional RSA algorithm (10.8338 dB). The RMSE values of the encrypted ultrasound images when using the conventional RSA and modified RSA algorithms were compared. The error value when using the modified RSA encrypting algorithm (53.5451) is much lower than that when using the conventional RSA algorithm (73.2567). The SSIM values of the encrypted ultrasound images when using the RSA and modified RSA algorithms were compared. A slightly higher SSIM value was achieved when using the modified RSA algorithm (0.6174) than when using the conventional RSA algorithm (0.6073). Table 4 summarizes the experimental results of the MSE, SSIM, PSNR, and RSME values after encrypting the DICOM images using the conventional RSA and modified RSA algorithms.

Discussion
To verify the encryption security performances, the encryption capability was evaluated using the elapsed time. The elapsed time when using three prime numbers is longer than that using two prime numbers. Therefore, our proposed modified RSA algorithm using one fixed Mersenne prime number could be useful for   Table 3, we can conclude that the proposed cryptographic method using Mersenne prime numbers increases the strength of the encryption key while slightly reducing the elapse time for streaming-type encryption by selecting the number closest to 65535. To compare the DICOM image qualities when using the conventional RSA and modified RSA algorithms using one fixed Mersenne prime number for image encrypting capability, we calculated the MSE, SSIM, PSNR, and RSME values. As shown in Table 4, lower MSE and RSME error rates and higher PSNRs were achieved using our proposed algorithm. The modified RSA encryption algorithms have substantially smaller MSE error values. The proposed encryption algorithm has a better image capability. However, we can conclude that the proposed modified RSA algorithm using fixed Mersenne prime numbers still has reasonable SSIM values.

Conclusion
The proposed modified RSA algorithm using Mersenne numbers was successfully implemented for medical ultrasound imaging instrumentation. The encryption capability between two prime numbers and three prime numbers including a Mersenne number were compared to show the improvement in security performances. We confirm that the proposed algorithm using fixed Mersenne prime numbers improves the encryption capability of the developed algorithm compared to the algorithm using factoring of two prime numbers while providing almost same elapsed time. Therefore, this developed modified RSA algorithm could be useful to access patient ultrasound images securely both on and off site.