1 Introduction

The high-paced technological revolution and subsequent computing strategies have led to a broad horizon providing a range of applications of which medical image communication is predominant. Biomedical image transmission became one of the imminent needs in the current health care system to ensure reliable, seamless and secured data transmission across uncertain channels. The Internet of Things (IoT) and cloud healthcare models have helped to launch a vast amount of healthcare data that is being distributed across the network. It is vital to ensure the confidentiality and security of the patient’s diagnosis from an IoT and cloud ecosystem [21].

The arrival of new developments has increased the amount of multimedia information exchanged between individuals, which has sparked concern for preserving personal information privacy and security [44]. Besides, mammoth data storage growth has led to the invention of new storage technologies such as cloud [55], fog [65], edge [52], etc., which have played a pivotal role in each organization’s IT infrastructure. However, irrespective of communication and storage systems, information security is still a concern. Confidentiality, authentication, integrity and non-repudiation play a fair role among the protection components in shaping the security algorithms used to secure the transmission of multimedia artefacts such as text, images, audio, video, etc. The incredible amount of internet-enabled communication systems has produced enormous data in real-time to meet various application requirements, such as social networking sites, the healthcare sector, e-commerce, scientific communities, financial sectors and other industrial requirements surveillance and security systems, etc. Social media and entertainment, surveillance footages, user multimedia data, and IoT services require security measures and policies to protect their data from unauthorized access. Undeniably, enterprise software has undergone tremendous growth in many sectors and government departments, producing and communicating vast data volumes (including multimedia data). In reality, these data are used to make appropriate decisions and recommendations. The combination of multiple data sources and associated voluminous aggregation of data has given rise to the cloud computing paradigm.

One of the main advantages of cloud computing is that it allows data access by multiple stakeholders, real-time computation and decision-making using cloud resources regardless of location or geographical boundaries. However, until a robust protection measure is not provided, data exchange from one node or user to another or across the cloud platform is highly vulnerable. Security or seamless information sharing of private data, particularly multimedia data (video, audio, image) [21, 44, 55, 65], is critical concerns in the cloud computing world. In addition to secure communication, enabling computational efficiency is also critical, as it demands time-efficient and reliable computation to meet the application’s real-time needs. This means ensuring the security, scalability and manageability of up-surging computational and allied communication requirements in the cloud computing world. Facilitating the privacy of digital information has now become unavoidable for the cloud setting, such as social media, healthcare, etc. [2, 24, 39, 40, 48, 55, 65, 66].

Medical data, including individual reports, clinical results, etc., are exchanged between hospitals information to decrease tests’ redundancy. The exchange of medical information accelerates the care of patients. The sharing of medical data is, thus, the demand of the current era. One of the key concerns is that medical officers use the internet (cloud) to share medical data, which is fast but at the same time, secure such information. Different attempts have been made to protect medical data transmission by implementing various protocols such as HTTPs, but the secure transmission of medical data is still an open issue. When a miscreant gets access to data or retrieves the data or related information during communication networks, it can be easily altered or misused for any targeted or intended goals. Numerous attempts have been made to prevent such occurrences in implementing security systems; however, significant efforts are either creating data access security models or infrastructure security or applying several data security features [31]. Researchers have developed security mechanisms for which the user needs to be authenticated before accessing the data (access-control), or the data itself is protected so as not to expose secret information inside the data to the unauthorized user intruder. In recent years, various attempts have been made to strengthen data protection in the cloud. However, ensuring that both security and computing performance has remained an open issue for academics and industry.

Encryption of data is the most common cryptographic technique. Here, the data is used to be inserted or concealed within the image so that the attacker will not retrieve the data while the approved person will be provided with a key called the encryption/decryption key to retrieve the data. In this case, it is not easy to find a practical encryption/decryption key mainly due to the combination of numbers used to produce exponential key ranges as the key length increases linearly. Therefore, it is considered as an NP-hard problem. Also, locating a particular key is a search problem. The identity key length of the encryption/decryption key increases exponentially, so simple search methods such as linear and binary searching would not be possible. Metaheuristic algorithms have been introduced to deal with this sort of situation. Metaheuristic algorithms are algorithms for search and optimization. These techniques have been successfully used to solve complex problems of optimization [53, 67].

Among the powerful multimedia data privacy techniques, steganography and cryptosystems have played a decisive role in practice, but these methods are limited due to the growing prevalence of parallel attacks. There has been widespread attention to the Hybrid Cryptography and Steganography (HCS) model design, where the dual-level of security makes or offers better data security. However, as an application-specific scenario, preserving safe and attack resilient multimedia (medical data) transmission requires enhanced steganography and the cryptosystem to achieve the above specified eventual target.

This paper focuses on improving steganography and cryptosystems by realizing multimedia (medical data) communication over cloud infrastructure that is becoming vulnerable these days due to increased attack efforts. The Advanced Encryption Standard (AES) and the Rivest-Shamir-Adleman (RSA) algorithm are the two principal algorithms used in this work for data encryption [41]. AES is a symmetric cipher where the same key is used on both sides [59]. It is generated by a fixed message block size of 128 bits of plain text and keys of length 128, 192, or 256 bits. When sending longer messages, it must be split up into 128-bit chunks. Longer keys make the cipher more challenging to crack, but they also impose a longer encrypt and decrypt method. On the other hand, RSA is a public key algorithm commonly used in the business and private communication sectors [6]. It has the benefit of a variable key size ranging from (2–2048) bits.

The primary research in hiding data began with steganography, which refers to the science and art of hiding information inside an image. The advantage of steganography is that it can be used without the transmission being detected to send classified messages. The DWT has immense spatial localization, frequency distribution, and multi-resolution features consistent with the theory of forms in the human visual system. This paper implements both 1-level and 2-level of DWT steganography techniques that work on the frequency domain. It segmented the image into parts by high and low iteration. Edge information is stored in the high iteration portion, while the low iteration part is often split into high and low iteration parts. Steganography aims to prevent anyone from knowing secret information and remove the suspicion of hidden information. The message is a secret text to be sent and camouflaged in the carrier to remain harder to detect. There are two main aspects of any steganography method, which are embedding capacity and imperceptibility. However, these two properties are confusing because it is challenging to increase capability while preserving a steganography system’s imperceptibility. Besides, for the use of data transfer communication protocols, few concealing information methods can be unconventional, but its future is promising.

Once performing secret data encryption, an enhanced Adaptive Genetic Algorithm assisted LSB embedding model is developed that helps to embed secret text (i.e., cipher data) into the cover image optimally without increasing or affecting PSNR or visual characteristics such as entropy, histogram patterns etc. Because the inclusion of secret text might impact pixel arrangement and resulting entropy, PSNR, histogram patterns and other statistical features such as regular and singular coefficients of image blocks, AGA algorithm was applied to perform Optimal Pixel Adjustment (OPAP) during LSB embedding. The proposed method is evaluated under statistical attack assessment, and it has demonstrated high PSNR, low entropy, negligible perceptibility, and histogram deviations. Such novelties can help the proposed model avoid attacks like Steganalysis attack or RS attacks which are well known for exploiting statistical variations in multimedia data to detect secret or hidden information. The overall model is built with MATLAB2018a tool. The proposed security achieves enhanced or augmented security for medical data communication over the cloud environment.

The remaining parts of the manuscript presented are given as follows. The related works are provided in Section 2, preceded in Section 3 by the proposed model. Section 4 examines the results obtained and their respective inferences. In Section 5, the conclusion of the overall research is given.

2 Related works

This section presents some of the main works on multimedia and medical data privacy using steganography and various related technologies. In recent years, the importance of healthcare services has been realized globally and has emerged as one of the dominant research domains across academia industries. However, the preservation of optimum medical data privacy is a must to ensure smooth and flawless processes. Steganography, being one of the most efficient medical data security approaches, applied image transformation schemes to incorporate essential data into the cover image (i.e., medical image). In reality, the efficiency of reversible steganography techniques depends solely on image transformation effectiveness, data embedding and pixel adaptation to allow maximum imperceptibility.

Razzaq et al. [46] proposed a fusion of encryption, steganography and watermarking for digital image security. Authors [46] developed three key components: (a) the original image was encrypted using the sizeable secret key by rotating pixel bits the right using XOR operator; (b) for steganography, the encrypted image was altered through the least significant bits (LSBs) of the cover image and stego images were obtained; and (c) stego images were watermarked in time and frequency domain to ensure ownership. This approach showed promising results, but it does not deal with data redundancy (repeated transmission of the same data).

Bairagi et al. [9] suggested three coloured image steganography method where the 1st and 3rd method used red, green and blue channels to provide security. On the other side, green and blue colours were used in the 2nd method to implement protection during data transmission.

Anwar et al. [7] implemented a model to safeguard any images, specifically clinical images. It seeks to balance digitalized clinical data integrity, ensuring the accessibility of desired information and information integrity to ensure that people’s authorities can use the data. The AES encryption model is used initially in the primary region. In this process, the ear print has been integrated, from which seven values are filtered from the ear picture as a function vector. The developed model improved the protection of clinical images by transmitting online images that have to be provided with more security to prevent access by third parties.

Jain et al. [20] provided a safe transfer of the patient’s medical information inside the medical cover image using a decision tree to conceal details. Breadth-first searching (BFS) was implemented at the sender end, in steganography, for mapping hidden cipher blocks to carrier images for data insertion. The RSA decryption algorithm was applied at the received end to extract the patient’s confidential medical information. A single approved recipient could therefore understand the plain text. This technique yielded excellent results, but was not ideal for large and exponentially increasing search spaces.

Authors [30] suggested a stable method for colour image steganography using grey-level modification and multi-level encryption (MLE). The secret key and secret data were encrypted using the MLE algorithm before mapping it to the cover images’ grey level. A transposing function was then added to the cover image before the data was hidden.

Zaw and Phyo et al. [32] used both cryptographic and steganographic topographies to add security features. The Blowfish encryption algorithm was used to enforce encryption. The superiority of the blowfish encryption algorithm over single encryption was represented experimentally. This method was straightforward and dealt with databases on a small scale.

Sreekutty and Baiju et al. [57] suggested a verification system for medical data integrity to introduce medical image transformation security. It works in two stages: (a) protection; and (b) verification. The message is embedded within the image using the 2-stage Haar DWT frequency in the HH band during the protection process. On the other hand, the extraction algorithm was used in the verification stage to extract the secret message and check the message’s integrity.

Bashir et al. [10] described a new image encryption technique based on integrating shifted image blocks and basic AES, where the shifted algorithm technique is used to divide the image into blocks. In each block, a set of pixels will be available, and the blocks are used to perform a “swapping” technique so that the content of the data will not be the same as the original image. After being shuffled, the image will be processed using the AES algorithm for encryption. By running numerous simulations and displaying histograms, the test demonstrated the proposed algorithm’s effectiveness. The algorithm worked well but was not able to manage the exponential growth in the search space.

Khalil et al. [22] suggested a method for studying image degradation from manipulating frequency components in medical images. The plaintext was encrypted using RSA-based ciphers (i.e. RC4) before being inserted. The Discrete Fourier Transform (DFT) was applied to convert the cover image into the frequency domain by decomposing it into its sinusoidal (sine and cosine) fundamental components in different frequencies. The results show that the image’s quality is significantly diminished when the data to be embedded close to the low-frequency bands, and the effect decreases in the upper-frequency bands.

Li, L. et al. [26] suggested a secret image sharing scheme for embedding secret image shares consistent with the IoT-Cloud system. The proposed system consists of two modules; a module for generating shadow images to generate secret shares based on Shamir’s polynomial, and the main formulation module for incorporating secret image shares into the cover image based on a 24-ary notational system.

Sajjad, M. et al. [47] introduced an assisted domain-specific mobile-cloud system to outsource medical stego-images for selective encryption to the cloud. The visual saliency detection model was used to detect the region of interest (ROI) from the transmitted image. The directed-edge steganography method was used to embed the detected ROI into the cover image and create the stego image sent to the cloud for selective encryption.

Vipula et al. [62] combined steganography with the AES crypto-algorithm to conceal confidential data inside the multimedia cover files. Saleh et al. [49] used the modified AES algorithm to encrypt the hidden message that was then processed into the cover image for hiding. However, recently, Duluta et al. [12] have found that such classical encryption-based models have numerous limitations that can restrict their suitability for the era of cloud computing.

Panchal et al. [37] applied steganographic cryptosystems for efficient data communication. Authors initially performed encryption by applying the encryption key combined with Chirikov mapping for image encryption, which transformed the input image into a cipher image. Authors applied steganography in the subsequent process in order to mask the cipher image inside the cover image.

Leung et al. [25] recommended unequal security encoding by implementing several encryption methods to encrypt various media sections of different significance. Ahmed et al. [4] developed a model based on a user interface in which the sender could pick the appropriate cover and secret message that was processed using ECC-based encryption, followed by LSB embedding. The data was processed through various methods to arrive at the same goal. To achieve better performance, Hajduk et al. [17] suggested image steganography where the hidden message was encrypted and inserted within the cover image data using QR codes (Quick Response Codes).

Mukhedkar et al. [34] also applied various ciphers such as DES, 3DES, AES, and blowfish encryption algorithms to encrypt the hidden data before embedding into a cover image for efficient and stable multimedia transmission. Unlike traditional cryptosystems, McEliece’s cryptosystem was used by Alam et al. [5] to encrypt or decrypt data to improve data protection across wireless networks. Depicting limitations of the classical cryptosystems, Kumar et al. [23] formulated an asymmetric key cryptography algorithm for secure colour 3D data communication. Because the better multimedia data analysis technique such as wavelet analysis can enhance the confidential data’s imperceptibility over an uncertain channel, Gupta et al. [16] recommended using Discrete Wavelet Transform (DWT). Authors applied DWT to split input image into four sub-bands, followed by data hiding within the splits. After hiding the text information, the image was compressed before transmission. The authors [30, 35] implemented a new hidden communication method for data that used RSA and AES combined with steganography.

Liao et al. [27] introduced a steganographic medical JPEG image scheme based on stabilizing inter-block DCT coefficient dependencies. Balakrishnan et al. [43] proposed a unique image crypto method in the transform domain using blended chaotic maps and Haar Integer Wavelet Transform (HIWT). A hybrid encryption algorithm was projected based on deoxyribonucleic acid and several chaotic maps to encrypt DICOM colour images by Divya et al. [45].

Mansour et al. [29] suggested the Discrete Ripplet Transformation technique for data embedding in medical cover images to ensure seamless communication over an unsecured network. Usman et al. [60] applied Swapped Huffman tree encoding to provide multiple encryptions of medical data. Hashim et al. [18] proposed a new Bit Invert System (BIS) based steganography scheme using three random control parameters to secure medical data. Nithya et al. [11] developed an integrated security framework using DNA coding methods and image encryption to provide enhanced security. Harnal et al. [54] have proposed a dynamic cryptography algorithm based on end-to-end cryptography (E2EE) to maintain integrity and confidentiality in the environment of multimedia cloud computing.

Stoyanov et al. [58], using a nuclear spin generator method, proposed a medical image stego hiding technique and discussed the results based on histogram analysis and peak signal-to-noise ratio. A robust, quasi-quantum walk-based image steganography mechanism has been introduced by Baseem et al. [1] to support secure transmission on the cloud-based E-healthcare platform. Madhusudhan et al. [28] created a stable multimedia transmission mechanism involving binary bits and the Arnold map.

Emy et al. [50] invented a stable colour image transmission system using the compression-encryption model and dynamic key generator, and a highly efficient symmetric key distribution. Pandey et al. [38] have developed a secure medical data transfer framework based on a bit mask driven genetic algorithm.

Rajesh Kumar et al. [42] suggested a hidden image communication scheme that uses visual cryptography and tetrological tiling patterns. The original image is first broken up into 4 × 4 sub-blocks. The alternative rows and columns of sub-blocks are grouped into tetrolet and non-tetrolet blocks. The proposed scheme encodes the original image’s tetrolet blocks into meaningful secret shares using the tetrominoes patterns. The non-tetrolet blocks are entirely replaced by zero. Finally, a new shadow image is obtained at regular intervals with different tetrolet patterns. A dynamic virtual cluster cloud encryption using the hybrid steganographic image authentication algorithm was suggested by Venkataraman et al. [61]. With the hybrid blowfish and genetic operator, this model performs expeditiously and ensures greater security. The proposed model of Puspha et al. [8] was presented by combining the 2D DWT method with the hybridization of Blowfish and Two fish encryption algorithms.

In image encryption and cryptography theory, literature shows that only a few have used metaheuristic algorithms. Bio-inspired algorithms and evolutionary algorithms have been successfully implemented in recent research to solve secure multimedia (medical) data transmission. Considering these factors, a Discrete Wavelet Transform, LSB embedding, Adaptive GA-based OPAP, AES and RSA-based hybrid encryption has been built in this research (dual-level biomedical image security). The discussion of the proposed model of steganography is given in the following sections.

3 Proposed model

This paper proposes a security model for healthcare to safeguard the transfer of medical data in cloud environments. Four continuous processes make up the proposed model:

  1. (1)

    The secret data is encrypted using a proposed hybrid encryption scheme, combining AES and RSA algorithms.

  2. (2)

    The encrypted data is being concealed in a cover image in the RGB channels using either 2D-DWT-1 L or 2D-DWT-2 L and AGA based Optimal Pixel Adjustment Process produces a stego-image.

  3. (3)

    Extraction of embedded data

  4. (4)

    To recover the original data, the data extracted is decrypted.

3.1 Secret data encryption

There are numerous cloud-assisted application environments in which different data, including multimedia and text, are transmitted under uncertain channel conditions. Some of the typical applications are telemedicine in the healthcare sector, social media, etc. Such applications can even have composite data as the amalgamation of text and image (for example, telemedicine both patients scanning medical reports and allied diagnosis details in text). In such cases, ensuring respective seamless transmission is of utmost significance. Towards this motive, the proposed model can be a viable solution. However, ensuring multi-level security can have augmented strength to alleviate any breach of security or unauthorized data access. Considering it as an impetus, a hybrid encryption model is designed at first. Here, the prime motive behind this is to increase the level of security by applying two different cryptosystems together, which, as a result, can avoid any easy attack on the data.

Consequently, it can achieve a higher level of security. In the proposed model, we have exploited the efficacy of two well-known cryptosystems RSA and AES to design the hybrid encryption scheme. The proposed cryptographic model embodies the strategic implementation of both RSA and AES, which has been used to encrypt input text data that is first converted into ciphertext embedded within the medical image.

The cryptographic model  = {Ϝη, Ϝη−1, C, S, T} encompasses encryption and decryption processes. During the encryption process, at first, the secret text data (it can be the diagnosis details of a patient which is expected to be transmitted along with the medical imaging reports) is split into two distinct parts, Todd and TEven. Splitting the text data does not signify dividing content in two fractional parts, instead once converting entire text into binary form, the overall bit sequence is processed in such way that the odd-sequence value is assigned to Todd, while bits at even place or sequence is allocated to the TEvencomponent. Thus, it converts overall input text data into two data-chunk or components Todd and TEven. We applied AES cryptosystem to encrypt Todd and while RSA was used for TEven encryption. Considering computational efficiency demands, we considered 64-bit RSA, while AES was applied as 256-bit. RSA with low bit-size has often been criticized for having inferior robustness; however, such a hypothesis can be applied merely with RSA as a standalone encryption algorithm. Its implementation with AES-256 can help to achieve a dual goal. First, the amalgamation of AES-RSA as a cryptographic algorithm can avoid easy attack probability (which can be possible with standalone encryption). Second, the consideration of low-bit size can avoid unwanted computation that eventually will make it robust to serve real-time applications. Additionally, AES-256 is six times faster and more efficient than classical triple-DES. Therefore, the inclusion of AES as a cryptographic method seems viable towards an influential encryption environment. On the other hand, the combination of RSA with low-bit size can help to make overall encryption more robust to avoid any attack. In other words, the strategic amalgamation of AES-256 and RSA-64 can confuse the attacker(s) to get real and exact information of the data being processed or communicated.

In the proposed encryption model, AES-256 has 14 rounds of computation, while 64-bit RSA was applied as single round itself, as it does not employ round-computation for confusion creation (to avoid side-channel attack). Noticeably, AES applies an encryption key or the round key s to encrypt the text data component Todd, while RSA being public-key cryptography applies a secret public key m to encrypt the data TEven. We used a private key x to perform decryption of the RSA encrypted data at the receiver. On the contrary, we performed standard decryption method for AES encrypted data. To be noted, AES decryption is the reverse of encryption, which is performed by executing inverse round transformations to retrieve original text data (from the encrypted data). Here, inverse round transformation method applies four essential functions,AddRoundKey,InvMixColumns, InvShiftRows and InvSubBytes, sequentially. Thus, the overall process is mathematically modelled as follows:

$$ C=\left\{{\mathrm{E}}_{AES},{\mathrm{E}}_{RSA},{\mathrm{T}}_{odd},{T}_{Even},{\hat{T}}_{odd},{\hat{T}}_{Even},\mathrm{s},m,\mathrm{x}\right\} $$
(1)
$$ {\hat{T}}_{odd}=\left\{{E}_{AES}\left(\ {T}_{odd},s\right)\right\} $$
(2)
$$ {\hat{T}}_{Even}=\left\{{E}_{RSA}\left(\ {T}_{Even},m\right)\right\} $$
(3)

Hybrid Encryption Algorithm for Secret Data Encryption is given as follows:

figure a

Once the text data has been encrypted, it has been processed for AGA-OPAP assisted LSB embedding.

3.2 Embedding procedure and AGA based OPAP

To embed the critical information within the medical image to be transmitted over cloud infrastructure, it is essential to decompose the input cover image and embed the cipher data optimally, while ensuring minimum entropy, histogram variations, or PSNR reductions. In this process, DWT with HAAR mother wavelet is applied. The model starts by separating each colour channel’s intensity (Red, Green and Blue). In each colour channel, the process of decomposition is then carried out. The method is split into two elements, namely compression and embedding. This approach will ensure the security of the image data and enable rapid encryption and decryption processes. It can also decrease the potency of attacks from frequency analysis, make it longer for brute force attacks, and minimize the plaintext redundancy so that cryptanalytic attacks can be thwarted. The 2D-DWT-2 L is formulated as a sequential transformation process with a low pass and high pass filters towards the image’s row (blocks). The key reason for considering 2D-DWT-2 L coefficients is that it can significantly provide a significant local feature set for text-embedding without impacting image quality.

Moreover, it can provide a more depth (feature) space for embedding. A cumulative solution with the proposed encryption can help strengthen attack-resiliency and confusion. Performing embedding with a single layer can cause higher-visibility perceptibility and impact image quality post-embedding. On the other hand, embedding with higher-level coefficient can be more effective at the cost of increased computation, which cannot be suitable for contemporary real-time application demands.

For optimal use of high and low pass filters, a pragmatic transformation is necessary. In Fig.1, the process followed in steganography using DWT is shown. We can see that Fig. 1 highlights the method of the elemental decomposition of the image in Cj(n × m) dimensions which will be applied to the RGB colour channels. Further, the image of each colour channels is divided into four groups of frequency bands, which are stated as high-high (HH), a high-low (HL), a low-high (LH), and a low-low (LL) frequency bands as shown in Fig. 2. The proposed model is designed to support visually imperceptible steganography to ensure maximum possible visual-imperceptibility that ensures seamless communication and assists quality-data transmission, which is a must for cloud communication.

Fig. 1
figure 1

2D-DWT-2 L decomposition process

Fig. 2
figure 2

DWT-1 L decomposition & DWT-2 L decomposition

To achieve it, the proposed model implements the steganographic scheme\( \hat{\ S}=\left\{\left\{\mathrm{F}\eta, \mathrm{F}{\eta}^{-1},C,S,T\right\}\right\} \) comprises of Least Significant Bit (LSB) embedding, AGA-OPAP assisted embedding optimization and extraction processes. The embedding process takes a cover (medical) image C and a secret text message CipherTx T as input and generates a stego-image S. While the extraction process inversely extracts the embedded message. Unlike classical efforts, where authors have to embed text or cipher data arbitrarily or LSB without any optimization measure, an AGA-based optimal pixel adjustment process is implemented in the proposed system. It ensures to retain maximum possible imperceptibility, quality preserve and seamless transmission even under cloud attack conditions such as RS-Analysis or Steganalysis. At first, the input medical image is processed using HAAR-DWT and split into multiple 8 × 8 blocks. Considering works of literature and allied inferences towards LSB embedding process, this approach intends to embed ciphertext in each block.

To perform embedding, at first ciphertext is transformed into an ASCII format, which is then split into SText _ odd and SText _ Even. The odd values SText _ odd are concealed in vertical coefficients, as stated by LH2 in each of the RGB channel [50]. The even values are concealed in diagonal coefficients specified by high-level coefficients HH2 in each RGB channel [50]. The algorithm applied to perform embedding is given as follows:

figure b

To retain maximum medical image quality as well as security against online attacks such as RS-Analysis or steganalysis an AGA intends to fit STextASCII in such manner that it does not lead to any substantial entropy or visual trait portentous presence of confidential data.

In the last few years, numerous attacker modules have been developed to target, detect and attack data over uncertain communication channels, such as cloud network. Amongst the significant attacks, RS-Analysis also called steganalysis has surfaced as the dominant attacker model intended to retrieve stego-information from the multimedia data communication. Before discussing the proposed AGA-OPAP based LSB embedding model, a snippet of RS Analysis or Steganalysis model is given as follows:

AGA has been applied to enhance image quality, embedding capacity, and statistical factors such as regular and singular coefficient values in each block. This approach can ensure maximum possible embedding while retaining optimal data quality and visual imperceptibility. Consequently, it can help avoid those attacks that use visual changes or statistical changes to detect hidden information or secret information within cover image during transmission. Considering RS-Analysis, also called steganalysis attack condition which employs statistical features to detect hidden information in multimedia data under transmission; the proposed model takes account of RS parameters and PSNR sensitive LSB embedding to ensure optimal data security. The detailed discussion of the proposed embedding model is given as follows:

A. RS analysis (Steganalysis)

There are three distinct kinds of block flipping; Positive flipping (F1), Negative flipping (F−1)and Null flipping (F0). F1 signifies the transformation association between the 2i and 2i + 1 pixels (say, 0–1, 2–3,…,254–255), equivalent to the LSB coefficient. Similarly, the transformation association in between 2i and 2i − 1 pixels (say, −1, −1-0, 1–2…255–256) signifies the negative flipping F−1. Thus, the association between positive and the negative flipping follows (4).

$$ {F}_{-1}={F}_1\left(x+1\right)-1 $$
(4)

The null flipping, which stated the identity permutation follows the following condition (5).

$$ {F}_0(x)=x $$
(5)
$$ F(G)=\left({F}_{M(1)}\left({x}_i\right),{F}_{M(2)}\left({x}_2\right),\dots, {F}_{M(n)}\left({x}_n\right)\right) $$
(6)

These parameters (i.e., F1, F−1 and F0) are often called as the flipping functions. Employing these flipping functions on each pixel of the input image block the flipped group (F(G)) is obtained. Mathematically,

Here, we define a parameter called flipping mask M. Where M = M(1), M(2), …, M(n), and M(i) states for 1,0 and − 1.

The group G would remain constant only when f(F(G)) > f(G). Similarly, G is singular when f(F(G)) < f(G). To perform the RS analysis, the following mechanism is taken into consideration. At first, the input image is split into multiple non-overlapping sections or blocks where each block is re-arranged to constitute a vector G., where G = (x1, x2, .., xn) is ordered in specific random (say, Zigzag) manner. The correlation amongst the pixel is obtained using a discrimination function, defined in (7).

$$ f\left({x}_1,{x}_2,..,{x}_n\right)=\sum \limits_{i=1}^{n-1}\left|{x}_i-{x}_{i+1}\right| $$
(7)

In (7), the variable x states the pixel’s value, while the total number of pixels is given by n. Here, the resulting value of f signifies the spatial correlation between the neighbouring pixels. The small value of f states the strong correlation between the adjacent pixels. Once obtaining the complete value of f(G), the non-negative flipping is applied (i.e., M(1), M(2), …, M(n)) either 0 or 1. On the contrary, for non-positive flipping, we apply 0 or − 1 for each input image block. Now, processing flipping over each block, estimate f(F(G)) for each block and thus the relative count of regular or consistent blocks after positive flipping is obtained as Rm. Similarly, the relative number of singular blocks is obtained as Sm. Similarly, for negative flipping, the regular and singular blocks are obtained as Rm and Sm. The total number of above-stated blocks in the raw images after performing flipping follows the following associations.

$$ {R}_m\approx {R}_{-m},{S}_{\mathrm{m}}\approx {S}_{-m}\ and\ {R}_{\mathrm{m}}>{S}_m,{R}_{-m}>{S}_{-m} $$
(8)

The difference between Rm and Rm increases as per the size of embedding message. Similarly, the difference values of Sm and Sm too increases with increase in embedding text. Such facts help attackers on a cloud platform or environment detect hidden information that can significantly lose data privacy. Considering it as motivation, the focus is made on developing an embedding model where the above-stated parameters (i.e., the difference between the values of Rm and Rm and Sm and Sm could be reduced while ensuring higher embedding capacity. This, as a solution, can accomplish attack-resilient secure cloud communication model. To achieve it, an AGA algorithm has been developed that intends to adjust pixels optimally Rm ≈ Sm, Rm ≈ Sm. The detailed discussion of the proposed AGA based OPAP is given in the subsequent section.

B. AGA based OPAP

To avoid any stego-information retrieval or data attack, the focus is on achieving the condition given in (8) by performing OPAP. Here, we perform pixel adjustment to achieve a standard or natural condition defined as Rm ≈ Sm, R−m ≈ S−m. Since the variations in the bits in the higher place might violate or reduce the image quality of the stego-image, merely the 2nd and 3rd LSBs are modified. For illustration, let B as given in (9), be the original value of the input image (block). Now, in case of the strategic modification is made merely in LSB place (only 2nd LSB plane), the variation or the changes in between the original image block and the modified image block can be considered as a matrix called Adjustment Matrix (AM), given as A1 and A2. Thus, the modified image blocks are \( {B}_1^{\prime }=B+{A}_1 \) and \( {B}_2^{\prime }=B+{A}_2 \). For illustration, let B be the original image block while f(B) = 99, while f(B) = 120,where f states the non-positive flipping. Now for the modified image block \( {B}_1^{\prime } \), \( {f}_{-}\left({B}_1^{\prime}\right)=90 \), only when F is non-positive flipping. Similarly, for \( {B}_2^{\prime } \), \( {f}_{-}\left({B}_2^{\prime}\right)=150 \).

$$ \mathrm{B}=\left[\begin{array}{cccc}107& 109& 107& 105\\ {}107& 106& 105& 104\\ {}107& 105& 107& 105\\ {}\begin{array}{c}107\\ {}107\\ {}104\\ {}110\\ {}109\end{array}& \begin{array}{c}107\\ {}109\\ {}107\\ {}109\\ {}109\end{array}& \begin{array}{c}105\\ {}107\\ {}106\\ {}109\\ {}109\end{array}& \begin{array}{c}106\\ {}104\\ {}103\\ {}105\\ {}106\end{array}\end{array}\kern0.24em \;\begin{array}{cccc}104& 102& 102& 104\\ {}105& 103& 105& 102\\ {}102& 103& 104& 103\\ {}\begin{array}{c}104\\ {}104\\ {}103\\ {}105\\ {}104\end{array}& \begin{array}{c}103\\ {}102\\ {}104\\ {}105\\ {}105\end{array}& \begin{array}{c}103\\ {}103\\ {}102\\ {}105\\ {}105\end{array}& \begin{array}{c}104\\ {}102\\ {}100\\ {}102\\ {}104\end{array}\end{array}\right] $$
(9)
$$ {\mathrm{A}}_1=\left[\begin{array}{cccc}0& 2& 0& 2\\ {}0& 2& 0& 2\\ {}2& 2& 0& 2\\ {}\begin{array}{c}0\\ {}0\\ {}2\\ {}0\\ {}2\end{array}& \begin{array}{c}0\\ {}2\\ {}2\\ {}2\\ {}0\end{array}& \begin{array}{c}2\\ {}0\\ {}0\\ {}2\\ {}2\end{array}& \begin{array}{c}2\\ {}0\\ {}0\\ {}2\\ {}2\end{array}\end{array}\kern0.24em \;\;\begin{array}{cccc}0& 2& 0& 0\\ {}0& 2& 0& 0\\ {}2& 2& 2& 2\\ {}\begin{array}{c}0\\ {}0\\ {}2\\ {}2\\ {}0\end{array}& \begin{array}{c}0\\ {}2\\ {}0\\ {}2\\ {}0\end{array}& \begin{array}{c}2\\ {}0\\ {}2\\ {}2\\ {}0\end{array}& \begin{array}{c}2\\ {}2\\ {}0\\ {}2\\ {}0\end{array}\end{array}\kern0.24em \right] $$
(10)
$$ {\mathrm{A}}_2=\left[\begin{array}{cccc}2& 2& 0& 0\\ {}0& 2& 0& 2\\ {}2& 0& 2& 0\\ {}\begin{array}{c}0\\ {}2\\ {}2\\ {}2\\ {}2\end{array}& \begin{array}{c}0\\ {}0\\ {}0\\ {}0\\ {}2\end{array}& \begin{array}{c}2\\ {}0\\ {}0\\ {}0\\ {}0\end{array}& \begin{array}{c}2\\ {}0\\ {}2\\ {}2\\ {}2\end{array}\end{array}\kern0.24em \;\begin{array}{cccc}0& 0& 2& 2\\ {}2& 0& 0& 0\\ {}2& 2& 2& 2\\ {}\begin{array}{c}2\\ {}2\\ {}2\\ {}0\\ {}2\end{array}& \begin{array}{c}0\\ {}0\\ {}2\\ {}2\\ {}0\end{array}& \begin{array}{c}2\\ {}0\\ {}2\\ {}0\\ {}0\end{array}& \begin{array}{c}0\\ {}0\\ {}2\\ {}2\\ {}2\end{array}\end{array}\right] $$
(11)

Summarily, the kind of block (i.e., regular or singular) can be modified by changing or making a suitable adjustment. In such cases, adjusting the pixels optimally, RS-Analysis attack of steganalysis attack can be avoided on the cloud environment. An Adaptive Genetic Algorithm (AGA) is applied to achieve it, which obtains the Optimal Adjustment Matrix (OAM) to ensure minimum disparity amongst the values of regular and singular image blocks. A snippet of the AGA based OPAP method and resulting OAM estimation is discussed in the subsequent section.

GA is a nature-based EC model, which employs Darwin’s principle of survival to obtain the optimal or sub-optimal solution after a defined number of generations. Functionally, it applies the concept of human evolution to obtain an optimal solution by transforming an optimization of search problem into the phenomenon of chromosome evolution. Processing the evolution concept, once it achieves an optimal or the best solution after iterating a predefined number of generations (or, stopping criteria), the optimal solution obtained is presented as the final solution of that problem. Functionally, GA employs the processes named Population Generation, Crossover and Mutation. In practice, the adaptive values influence the copy operation, and an individual with significantly high fitness value is considered for the next generation. A candidate solution’s fitness value signifies its maximum likelihood of becoming selected for breeding in the next generation. To reduce computational overheads caused due to increase search space, the mutation process is applied that drops the individual with minimum fitness value, and such individuals are not carried forward for crossover in the next generation. Once embedding the secret data within the cover image using LSB embedding, we execute AGA-OPAP. A snippet of the applied AGA-OPAP is given as follows:

In the proposed LSB embedding method, the stego-image is split into 8 × 8 blocks, where each block is categorized and labelled by applying the following mechanisms.

  1. Step-1:

    Let the image block be B, then for B implement the non-positive flipping F as well as non-negative flipping F+.

  2. Step-2:

    Generate the flipping mask M+ and M, randomly and obtain the results \( {B}_{+}^{\prime } \) and \( {B}_{-}^{\prime } \).

  3. Step-3:

    With the obtained value of \( {B}_{+}^{\prime } \) and \( {B}_{-}^{\prime } \), estimate the values of \( f\left({B}_{+}^{\prime}\right) \), \( f\left({B}_{-}^{\prime}\right) \) and f(B).

  4. Step-4:

    Process the steps 1, 2 and 3 iteratively for 1000 number of generations and define four distinct variables to classify the blocks by comparing\( f\left({B}_{+}^{\prime}\right) \), \( f\left({B}_{-}^{\prime}\right) \) and f(B).

    P+R, it states the number of occurrences when the block remains regular under the non-negative flipping,

    P+S, it states the number of occurrences when the block remains singular under the non-negative flipping,

    PR, it states the number of occurrences when the block remains regular under the non-positive flipping.

    PS, it states the number of occurrences when the block remains singular under the non-positive flipping.

  5. Step-5:

    Perform P+R to P+S and PR to PS and perform labelling of the image blocks as per the following conditions:

R+, if \( \frac{P_{+R}}{P_{+S}}>1.8. \)

S+, if \( \frac{P_{+S}}{P_{+R}}>1.8 \)

R−, if \( \frac{P_{-R}}{P_{-S}}>1.8 \)

S−, if \( \frac{P_{-S}}{P_{-R}}>1.8 \)

  1. Step-6:

    Classify blocks into four distinct groups, R + R−, R + S−, S + R−, S + S−. Ignore the blocks, not a part of above-stated types.

  2. Step-7:

    Perform the comparison of the original input image, the magnitude of R + R− and S + R− blocks, which often shows increased in stego-images.

Such increase in the above-stated parameter can be detected using RS Analysis, which can be used as the intrusion tool to attack that specific multimedia data to get unauthorized access of the stego-image and hidden information. Considering the above-stated fact and motive to alleviate the distinguishable or perceptible disparity between the values of 푅+푅− and 푆+푅− blocks, this research applies the AGA algorithms to decrease the value of R− blocks. The implementation of AGA-based OPAP comprises three essential functions: initialization (population initialization), crossover, and mutation. The procedures involved in AGA-OPAP optimization and allied pixel adjustment is detailed as follows:

4 Population initialization

The initial pixel, or the first pixel, chose three adjacent pixels in each image block as the initial chromosome (Fig. 3).

Fig. 3
figure 3

Selection of the chromosomes

5 Reproduction and mutation

Perform flipping of the second least bits in the chromosomes arbitrarily and generate the (second generation) chromosomes Ci.

6 Selection

Estimate the fitness value of each chromosome and select the best chromosome using (12).

$$ Fitness=\alpha \left({e}_1+{e}_2\right)+ PSNR $$
(12)

In (12), the variable e1 states the likelihood of f(F(Ci)) < f(Ci). Similarly, e2 signifies the likelihood of f(F+(Ci)) > f(Ci). The variable PSNR signifies the Peak Signal to Noise Ratio of the participating chromosome, while α presents a weight parameter which has been obtained empirically. Mathematically, PSNR has been obtained using (13).

$$ PSNR=10{\log}_{10}\frac{M\times N\times {255}^2}{\sum_{i,j}{\left({y}_{i,j}-{x}_{i,j}\right)}^2} $$
(13)

In (13), M and N signify image dimension while x and y state the image intensity before and after embedding. Here, α states a weight parameter which controls the visual quality of the input multimedia data and secrecy of the secret text. For a specific value of α, higher the values of e1and e2, we hypothesize to achieve higher data security. Hence, in the proposed model, optimizing (specifically maximizing) the value of (13) (say, fitness value) has been considered as the fitness function. In our proposed method, we ensure maintaining e1and e2 higher than a threshold, which is experimentally decided. We have applied the threshold as 0.8.

  1. 1.

    Estimate PR and PS of the neighbouring image block and check whether PS > PR. If so, the block is considered as successfully adjusted.

  1. 2.

    Crossover In the crossover process, shift the chromosome by one pixel and reinitiate step-2. Once performing crossover twice, stop the cycle.

This overall process is called OPAP, making hybrid cryptography and steganography more resilient to attacks such as RS Analysis or steganalysis, achieving optimal security over the cloud platform. Now, once all image blocks are successfully adjusted, estimate the value of Rm, Rm, Sm and Sm of the image and in case the disparity of Rm and Rm (and, Sm and Sm) is more than 5%, perform adjustment of the next or the sub-sequent image blocks. In the proposed model, each block is labelled before initiating OPAP, and thus, we reduce computational overheads significantly. Furthermore, AGA’s use reduces the exhaustive search operation and achieves computational efficiency, making it suitable for secure medical data transmission over cloud infrastructure.

6.1 Secret data extraction

Once embedding the data inside the cover image and obtaining the stego image, it is transmitted over cloud communication channels. Receiving the data at the receiver end, we have obtained confidential data and original cover image by performing extraction using the 2D-DWT-2 L method.

Figure 4 illustrates the procedure of extracting encrypted text from the images. This process will begin after the successful completion of the decomposition of images using DWT-2 L. The extraction algorithm is described below.

Fig. 4
figure 4

Extracting encrypted text from images showing the procedure of synthesis of DWT-2 L.

figure c

Once extracting the text data from the images, it is reconstructed employing IDWT technique for 2nd level followed by 1st level. Figure 4 elucidates the DWT synthesis process.

Considering the need to decrypt the secret text data from the cover image, similar to the encryption phase, the hybrid scheme applies AES and RSA algorithms to decrypt the receiver’s confidential data. Receiving the stego image at the receiver unit, we decrypt the text using a private key to obtain the original secret message transmitted. The decryption algorithm used to retrieve the original secret data is given as follows:

figure d

By implementing the above-stated approach, a robust and computationally efficient model strengthened by employing hybrid encryption enhancement and attack resilient (for example, steganalysis or RS-Attack), Visually Imperceptible model is developed. The proposed system can secure medical data transmission over different environments while ensuring optimal performance. The detailed discussion of the simulation results and its inferences is given in the subsequent section.

7 Results and discussion

Considering the exponential increase in cloud-based secure medical data communication, this research focused on developing a hybrid encryption strategy combining cryptography and steganography that provide data privacy. The overall proposed model is developed using MATLAB 2018a tool, which has been simulated with the computer specifications of 2.27 GHz Intel (R) Core (TM), 3rd generation processor (I3 CPU), 8 GB RAM and Windows-7 operating system. Multiple images as the cover image and secret message of varied sizes are employed to assess the proposed model’s performance.

The Hybrid encryption and Steganography model can be useful or more efficient when it fulfils the following:

7.1 Histogram analysis

As stated in Table 1, minimizing histogram pattern variations before and after message embedding in the cover image can reduce visual perception or result tracking by attackers. Histogram variations occur due to increased entropy within the cover image due to text embedding, and therefore to retain visual imperceptibility reducing entropy through optimal pixel adjustment is vital. To achieve it, an AGA-OPAP based LSB embedding resulted in minimum histogram variations (Table 2). As depicted in Table 2, the proposed model exhibits negligible or near-zero variation in histogram after message embedding, supporting the visual imperceptibility aspect for secure communication.

Table 1 Performance criteria
Table 2 Histogram Pattern Analysis

To assess the efficacy of the proposed model, in this work we considered standard benchmark images such as Baboon, Lena, Baboon, Sailboat, Peppers, Female [19] [33] (*.jpg) as well as the medical images [56] (DRISHTI-GS dataset in *.png). Here, the prime objective was to assess whether the proposed method can be adequate or suitable for the healthcare application environment. Since in healthcare images retaining image-quality and the inherent feature is of utmost significance, we have applied critical healthcare data of “Diabetic Retinopathy”, where even a single nerve can have important diabetes information. Introduction of additional text (secret) data could cause entropy and hence quality degradation. However, the proposed model intended to optimize such entropy and ensure that stego-image (image after embedding) retains maximum possible image quality and originality. Observing the results, it can be found that the proposed method achieves optimal performance in terms of visual imperceptibility. It can avoid numerous attack scenarios online in the cloud environment. To simulate the proposed model for performance verification, random text information such as a snippet of common test sentences such as “My Own Address”, “My Personal Biography” with different sizes (in notepad, *.txt) was applied. Due to space constraints and inferior significance of text (embedding data) details, we have not mentioned it in this manuscript. Dataset images (Table 2) are the cover images considered for the simulation and performance assessment.

7.2 PSNR assessment

It is calculated to measure the quality of images created by Peak Signal to Noise Ratio (PSNR) compression. If it produces a high PSNR value, the compression technique is considered significant, which means that the error is deficient and the reconstructed error is minimal. The image seems to be very similar to the original image. When the PSNR value is between 30 and 50 dB, lossy image quality is considered acceptable. The quality of the image is considered ideal if the PSNR value is above 40 dB. The compression technique is highly not appropriate if the PSNR value is below 20 dB.

Table 3 presents the PSNR performance of the proposed model for 250 bytes in text (secret data) embedding. Observing the result in Table 3, where the PSNR has been obtained for the text embedding size of 250 bits, it can be found that after embedding the text or secret data, the PSNR decreases; however, the contribution goes to the proposed AGA-OPAP assisted LSB embedding method, which improves the message embedding and even optimizes the PSNR. Interestingly, observing PSNR performance, the proposed model either achieves near original PSNR or even improves the image quality, which results in improved PSNR value (post-embedding and OPAP optimization). The mathematical model for PSNR estimation was applied in (13) for the image processed after 2D-DWT-2 L and post-AGA-OPAP optimization. The results obtained (Table 4) reveals that the proposed AGA-OPAP assisted LSB embedding method is of utmost significance towards retaining and optimizing image quality for quality-centric communication over the cloud environment.

Table 3 PSNR Performance (for 250 bytes of text data)
Table 4 PSNR performance over different sizes of the secret text data

7.3 Entropy analysis

As an image security operation, the cipher generation is performed, which will increase the image input disturbances. Consequently, this can lead to a surge in image entropy that degrades the quality of the image and broadens the horizon for intruders to target specific data. On the other hand, to make it difficult for the attacker to differentiate the encrypted data and the original image information, encryption imposes additional information on the image. In such instances, it is vital for preserving the optimum entropy of the data being transmitted. With this strategy, the encrypted image data’s entropy is quantified with Eq. (14).

$$ ENT(I)=-\sum \limits_{i=1}^{2^8}P\left({I}_i\right){\log}_bP\left({I}_i\right) $$
(14)

In (14),ENT(I) states the entropy of an image, where I signify the intensity and P(Ii) signifies the probability of the intensity value Ii.

Observing the above results (Table 5), it can easily be visualized that the increase in entropy is significantly low and therefore retains the image quality. It affirms the encrypted images’ suitability for critical applications such as healthcare (telemedicine) or critical data communication purposes.

Table 5 Image entropy analysis

7.4 Embedding capacity analysis

The embedding capacity signifies the extent or the percentile to which a unit image can embed the text data (i.e., ensuring no reduction in PSNR and correlation, and maintaining low entropy). Table 6 presents the embedding capacity performance by the proposed model.

Table 6 Embedding capacity analysis

Observing Table 6, it can be easily found that the proposed method accomplishes significantly large enhancement in the embedding capacity post-optimization. This can be because of the proposed OPAP concept’s robustness, which ensures optimal embedding while retaining entropy low and PSNR high, the employed AGA heuristic model’s key objectives. Thus, the results obtained signify the proposed model’s suitability for sizeable scale-sized encryption and secure communication purposes. The addition of more secret information (text data) in the image might impose high entropy that eventually could reduce image quality (i.e., PSNR). In such a case, it is significant to assess whether the inclusion of the proposed AGA-OPAP assisted LSB embedding helps retaining maximum possible image quality even after extensive secret data embedding. In this paper, we assessed the performance for the different sizes of the secret text data embedded in the cover image with this motive. Observing the results (Table 4), it can easily be found that though with an increase in secret data size (to be embedded into image), the PSNR decreases; however, our proposed AGA-OPAP based LSB embedding method reduces entropy and retains better PSNR. It affirms that the proposed method can achieve optimal PSNR irrespective of the data size. The results affirmed that the inclusion of AGA-OPAP could be vital to ensure higher data embedding inside the medical image without imposing any significant quality degradation or visual traits, which might invite intruders to attack over uncertain cloud communication channels allied network.

7.5 Regular and singular coefficient analysis

The attack models such as RS-Attack or Steganalysis attack might explore the medical data under the transmission to attack the specific data-carrying certain significant information or secret information. The variations in regular and singular coefficients per block of the image are examined to alleviate such issues. As stated in Table 1, higher differences in the regular and singular coefficients can reveal the attackers about the presence of private data within the multimedia data, and therefore maintaining lower difference can be advantageous.

Observing Table 7, it can be found that the proposed method achieves relatively lower differences in regular coefficient value (Rm − Rm) and the singular difference value(Sm − Sm). It reveals that the proposed method can achieve a high level of visual imperceptibility to secure medical data communication over a cloud channel.

Table 7 RS analysis (secret data size 250 bytes)

7.6 Encryption and decryption speed analysis

To assess the time efficiency of the proposed model for encryption is calculated using MATLAB functions *(tic − toc). The execution time consumed over the different dataset is given in Table 8.

Table 8 Execution time over of the secret text data (250 bytes)

Observing the above-stated results, it can easily be found that the proposed system consumes low execution time, including both encryption as well as decryption, which exhibit its robustness towards time-efficient computation.

7.7 NCPR and UACI test

In addition to the visual and statistical characterization discussed above, we have analyzed our proposed security model’s effectiveness in Number of Changing Pixel Rate (NCPR) and the Unified Average Channel Intensity (UACI). High NPCR and UACI value usually imply higher randomness and therefore, high tolerance against any differential attack probability [63]. The randomness test results with a higher NCPR value confirm the proposed system’s attack resiliency’s essence. Similarly, via our proposed medical data security model, UACI also confirms satisfactory results. The thorough discussion of NCPR and UACI conditions during encryption for image randomness can be found in [63].

Recalling the overall design where the fundamental goal of employing hybrid encryption with AGA-OPAP was to avoid any attack conditions such as Man-In-The-Middle attack (MITM), steganalysis or linear and differential based attack approaches since the proposed model avoids providing any scope of visual perceptibility and maintains low entropy, high PSNR, it would be able to resilient any attack conditions. Tables 9 display NPCR and UACI values for the images.

Table 9 NPCR and UACI randomness test

7.8 Mean absolute error analysis

To determine the receiver side’s image quality, we used Mean Absolute Error (MAE) to evaluate accuracy (15).

$$ MAE=\frac{1}{n}\sum \limits_{i=1}^n\left(\left|{Y}_i^{\prime }-{Y}_i\right|\right) $$
(15)

where \( {Y}_i^{\prime } \)refers to the calculated output, while Yi states for the expected value. The results obtained for inputs (with 250 bytes of text input) are given in Table 10. The results (Table 10) signifies the robustness in terms of very negligible error profile, which undoubtedly affirms its superior image quality (post-decryption).

Table 10 MAE performance with different input (250 bytes of the text secret data)

7.9 Bit error rate (BER), structural similarity (SSIM), structural content (SC) and

Correlation analysis

  1. a)

    Bit Error Rate (BER):

BER calculates the error rate of the transformed bits. This variance can be attributed to the attenuation noise or other disturbances. Eq. 16 is used to test BER.

$$ BER=\frac{E}{\# Bits} $$
(16)

Where E indicates errors.

  1. b)

    Structural Similarity (SSIM):

The structural similarity of images is calculated using SSIM. Here, we used the SSIM value to evaluate the similarity of the cover and steganographic images. Eq. (17) is used to construct the SSIM estimation.

$$ \mathrm{SSIM}=\frac{2\times \mu \left(\rho 1\right)\cdotp \mu \left(\rho 1\right)+{C}_1}{\mu {\left(\rho 1\right)}^2+\mu {\left(\rho 2\right)}^2+{C}_1}\times \frac{2\times \mathbf{C}\left(\rho \right)+{C}_2}{\sigma_1{\left(\rho \right)}^2+{\sigma}_2{\left(\rho \right)}^2+{C}_2} $$
(17)

Where μ and σ are mean and standard deviation, respectively.

  1. c)

    Structural Content (SC):

The resemblance between the cover and the steganographic image is assessed using SC. Eq. (18) to calculate the SC value.

$$ SC=\frac{\sum_{i=1}^{\left|N\right|}{\sum}_{j=1}^{\left|M\right|}{\left({C}_{ij}\right)}^2}{\sum_{i=1}^{\left|N\right|}{\sum}_{j=1}^{\left|M\right|}{\left({O}_{ij}\right)}^2} $$
(18)

Where C and O represent cover and original images.

  1. d)

    Correlation:

The similarity and disparity between the magnitude and the data phase are determined by correlation. Equation (19) is used to determine the correlation.

$$ Corr=\frac{X\cdotp \sum O.S-\sum O\sum S}{\sqrt{X\left(\sum {O}^2\right)-{\left(\sum O\right)}^2}\sqrt{X\left(\sum {S}^2\right)-{\left(\sum S\right)}^2}} $$
(19)

X denotes the pairs in the data, the original image is O, and the steganographic image is S.

Table 11 displays the BER, SSIM, SC and Correlation values of the images. These findings have shown that the proposed model has the potential to transmit secure medical data.

Table 11 BER, SSIM, SC and correlation of images

7.10 Dark and bright tone classification of images

The plain image, a histogram of the plain image and an encrypted image (post embedding and optimization) from an image of dark quality are shown in Table 12. The results show that the histogram retains similar visual quality for both the plain and cipher image.

Table 12 Histogram of original image and post embedding of dark quality

The plain image, a histogram of the plain image, and an encrypted image (post embedding and optimization) from a bright image are presented in Table 13. The results show that the histogram retains similar visual quality for both the plain and cipher image.

Table 13 Histogram of original image and post embedding of bright quality

7.11 Correlation analysis between adjacent pixels

To calculate the intensity of the linear relationship between two random variables, correlation is used. In a random image, the correlation value between neighbouring pixels is zero. Image encryption aims to render the association of neighbouring pixels close to zero in the encrypted image. The colour-encrypted image pixel correlation coefficient is determined between two horizontally adjacent pixels, two vertically adjacent pixels, and two diagonally adjacent pixels on each colour channel. The correlation coefficient values for the horizontal, vertical and diagonal components in the red, green and blue image channels are shown in Table 14 and Table 15.

Table 14 Correlation coefficients based on the classification of image data quality (256 × 256)
Table 15 Correlation coefficients based on the classification of image data quality (512 × 512)

7.12 Comparative assessment

The proposed model’s accuracy is verified against state-of-the-art techniques where these algorithms [7, 8, 11, 13, 14, 30, 33, 38, 61] have been built to secure the healthcare data. The comparison of PSNR values with existing models is shown in Table 16. The proposed model for the security of medical data exhibited a better PSNR.

Table 16 Result based on PSNR (dB)

The comparison of the entropy values of the established model with existing models is provided in Table 17. The entropy value of the model designed is marginally better than the developed methods of Nithya et al. [11] focused on securing images in cloud storage environments with an integrated security framework using the DNA coding and image encryption methods to provide heightened security, Emy et al. [50] proposed an approach for improving the security of the colour image data by distributing the symmetric keys, Gupta et al. [15] employed Compressed Hybrid Cryptosystem that constitutes compression, encryption and secure session key exchange along with the transmission of image and Zhang et al. [68] proposed a new image compression and encryption scheme based on the nearest-neighbouring coupled-map lattices (NCML) and Non-uniform Discrete Cosine Transform (NDCT).

Table 17 Results based on Entropy Values

Table 18 portrays the comparison of Embedding Capacity Analysis (%) of the proposed model against existing models, where the results are better than the state-of-the-art approaches of Mansour et al. [29] and Ou et al. [36] where an efficient adaptive embedding and optimization of colour images is proposed.

Table 18 Comparison based on embedding capacity

Table 19 displays the proposed method’s overall processing time for encoding and decoding information on the sender and recipient’s end, respectively. The results demonstrate that the proposed method can better perform the state-of-the-art methods [11, 50, 61] for colour images.

Table 19 Comparison based on encryption and decryption speed

The comparative NPCR and UACI values from the model built with the three previous research models are shown in Tables 20. All image data tested from the developed cryptographic method for NPCR and UACI values are higher than the previous studies of [50], seyedzadeh et al. [51], Niyat et al. [64] and Ahmad et al. [3] incorporates color image encryption algorithm based on chaotic system and cellular automata. It can be inferred based on the test results that the improved cryptosystem model is safer against differential attacks.

Tables 20 Result analysis of NCPR and UACI values

Table 21 shows the correlation coefficients between the proposed model and other cryptosystem models in each colour channel. The correlation value is closer to zero for the proposed model than for the model by Ref. [68] where a new algorithm for image compression and encryption based on spatiotemporal cross chaotic system is proposed.

Table 21 Comparison based on Correlation of RGB Channels

Thus, considering the proposed model and its simulation-based performance, it can be inferred that the proposed system achieves optimal efficiency, which makes it suitable for secure medical data communication over the cloud environment. Observing the overall results, it can be found that the use of hybrid encryption (AES and RSA together) and AGA-OPAP based embedding optimization can yield an optimal solution for secure medical data communication over the cloud platform. Similarly, results indicate that RSA-64 and AES-256 as a strategically combined solution can be better towards the proposed model, though in this study we have not performed individual performance assessment for RSA and AES (distinctly). Results obtained (Tables 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21) confirm that the use of AGA-OPAP has strengthened the proposed model to achieve optimal pixel adjustment, which eventually yielded PSNR enhancement, minimum histogram changes or entropy. It has also helped (due to PSNR and RS sensitive optimization) achieving optimal Regular and Singular coefficient values of each block. The simulation results reveal that the use of AGA-OPAP based LSB embedding has achieved maximum possible visual imperceptibility and data (image) quality which affirm suitability of the proposed model for the cloud environment.

Observing the overall results and corresponding inferences, it can be inferred that proposed model can enable an optimal security solution for the different cloud purposes, including Electronic Healthcare Records (EHR), Tele-medicine, critical image and allied annotation information hiding for future (security) purposes. Contemporarily, a large number of cloud applications provide data security, and undeniably our proposed model can be of great significance to support them, either as a standalone security solution or as a plug-in or Application Program Interface (API). The overall research conclusion is given in the subsequent sections.

8 Conclusion

Considering the exponential rise of medical data communication over the cloud environment, which is often considered uncertain, in this research, the emphasis was made on developing a robust and efficient secure data transmission model. The proposed model utilizes cryptographic and steganography features to introduce security and quality-centric data transmission. The use of hybrid encryption (AES and RSA) and their strategic implementation towards secret data encryption and decryption strengthened the overall security level and ensured that the secret information could not be retrieved easily. On the other hand, realizing the quality preserve aspect of steganography which is often used in medical data security, an Adaptive Genetic Algorithm based OPAP was developed that optimized least significant bit embedding over image-blocks. The AGA-OPAP model considered PSNR and Regular and Singular Coefficient values per block of the image as objective functions to perform secret message embedding and allied pixel adjustment (optimization). This approach leads to better image quality, visual imperceptibility and higher embedding capacity even without losing original quality. These all features make the proposed system suitable for numerous communication purposes including cloud communication, healthcare data communication, IoT communication purposes etc. MATLAB based model development and its simulation with different datasets as well as secret text of varied sizes revealed that the proposed model could be attack resilient (statistical assessment based attack models) and quality-centric (high PSNR) which make it suitable for secure medical data transmission over cloud platforms.