1 Introduction

Data security is the major problem in cloud computing because hackers can hack Man in the Middle Attack [1] the data like creating, copying, destroying the data without data owner authorization. So authorized will lose millions of dollars due to illegal activities [2]. To overcome these difficulties the data can be encrypted before sending to the third party. In the existing technique password based authentication can be used to encrypt the data. Many of the limitations can be used for password based authentication forgotten, if the intruders know the password can easily hack the data [3]. To overcome this difficulties in our research work biometric based authentication can be used because stable, don’t changed, not forgotten, don’t sharable; mainly the person should be present at the time of authentication [4]. In this work multimodal biometric like fingerprint and iris is used to generate the key, Generated key is used to encrypt the data.

The new user has given input image of fingerprint and iris. Example, The input file (fp.png, ir.png). In our research work Extracting the feature value of fingerprint and iris by using local binary pattern. Local binary pattern works with the eight neighborhood of a pixel, Center pixel value is greater than the neighborhood pixel value becomes 0 other wise 1. Likewise all the pixel value can be calculated by using Local Binary pattern. Finally Binary value can be generated of fingerprint and iris by using LBP. The Binary value can be converted into decimal value. Finally a set of Fingerprint Feature value and iris feature value can be generated [5]. Generated value of fingerprint and iris and it has given input to hybrid Genetic Algorithm and Particle swarm optimization Algorithm for finding best solution. The best solution value act as a key for data encryption and decryption using triple data encryption standard algorithm. The major drawback of this one if you are not finding the best value the intruder can easily Extract the data by using fingerprint and iris image. The main advantage for finding the best value, the intruder does not identify the best value and also which particular portion of fingerprint and iris feature value going to act as a key for data encryption and decryption process. So the intruder cannot be able to access the data in cloud. Figure 1 represents Overall architecture of the research work.

Fig. 1
figure 1

Overall architecture

2 Choosing best value using HGAPSO algorithm

A set of fingerprint feature value and Iris feature value has been combined and it is given input to the hybrid genetic algorithm [6] and Particle swarm optimization algorithm [7,8,9] for finding the best value. One small example to find out the top most height of two persons. Table 1 represents example for how to find the best solution.

Table 1 Finding best solution example

In normal Particle swarm optimization algorithm randomly select the height. Table 2 represents calculate the solution from Table 1 randomly select the persons height. In solution 1 (person 3 and 7) the value of height is 130,130 respectively. In solution 2 (person 2 and 8) the height value 115,165 respectively For finding the purpose of calculating the fitness value. Finally in solution 1 and solution 2 the best fitness value is 280.

Table 2 Fitness calculation for PSO

So the particle swarm optimization algorithm take the best value and replace the worst value. In the next step take the another solution and combine two value, choose the best value and replace the worst value. Same process can be applied for all the values. Finally one best value can be chosen. In our research work Genetic Algorithm can be added for improving the optimization performance. GA + PSO. Genetic algorithm include the cross over + mutation process. Table 3 represents finding the fitness value using cross over and mutation technique from Table 1.

Table 3 Fitness calculation using cross over mutation technique

Particle swarm optimization algorithm finded the best value of 280. In our research work PSO add the GA to find out the best solution is 295. Same process can be applied for finding the best solution of fingerprint and iris. In fingerprint and iris image for finding the best solution Maximum key breaking time can be applied.

2.1 Process of HGAPSO

  • Step 1: Initialize fingerprint and Iris feature extraction values.

  • Step 2: Evaluate the feature values using fitness function (task: maximum key breaking time).

  • Step 3: Choose the best value and update the remaining value.

  • Step 4: Compare the initialized value with updated value and also calculate the fitness function.

  • Step 5: Repeat the iteration, till to find out the best solution.

  • Step 6: Finally stop the iteration.

Best solution act as a key for encrypting the data using TDES Algorithm.

2.2 Pseudo code for optimization procedure

For each particle

{

initialize particle

}

end

(Estimate intensity of particle as an objective)

do

or each particle

{

calculate Fitness value

}

If the fitness value is better than pBest

{

Set pBest = Current fitness value

If pbest is better than gbest

{

Set gbest = pbest

}

end

for each particle, calculate particle velocity according to equation of V

Update particle position according to equation of present x

}

end

2.3 Calculation for HGAPSO algorithm

To generate the local binary pattern which is needed for the input of the proposed algorithm, it is necessary to find the velocity, fitness and the cross over mutation.

Step 1: Derived the feature extraction values from fingerprint and Iris using local binary pattern.

Step 2: Derived feature value has been given input to the hybrid genetic algorithm with particle swarm optimization algorithm for finding best solution.

Step 3: Calculating the best solution the following techniques has been followed. (I) update the velocity (II) Fitness Function calculation (III) Cross over mutation technique.

Velocity position of the feature extraction value.

Fitness function evaluate the quality of the represented solution.

Cross over and mutation recombined two distinct values and then randomly mixes their parts to form the solution.

Mutation randomly perturbs a candidate’s solution.

Step 4: The above mentioned techniques has been followed to find out the best solution. The best solution value act as a key for data encryption and decryption using Triple DES algorithm for more security purpose.

Step 5: Finally encrypted data stored in cloud environment using cloud simulator. So the intruder cannot be able to access the data in cloud environment.

Velocity updation, fitness function calculation, cross over mutation formula is given below.

2.3.1 Calculation of velocity updating

$$\overline{V}_{T + t} = M*\overline{V}_{T} + \frac{{R1*G*\left( {\overline{X}_{T} - \overline{G}_{best} } \right)}}{t} + \frac{{R2*L*\left( {\overline{X}_{T} - \overline{L}_{best} } \right)}}{t}$$
(1)
$$\overline{V}_{T + t} = M*\overline{V}_{T} + \frac{{R1*G*\left( {\overline{X}_{T} - \overline{G}_{best} } \right)}}{{t*\left| {\overline{X}_{T} - \overline{G}_{best} } \right|}} + \frac{{R2*L*\left( {\overline{X}_{T} - \overline{L}_{best} } \right)}}{{t*\left| {\overline{X}_{T} - \overline{L}_{best} } \right|}} + {\overline{S}}\, {\overline{R}} \,{\overline{F}}$$
(2)

where M is the momentum, \(\overline{V}_{T}\) is the velocity, t is the time, \(\overline{X}_{T}\) is the current position of the particle, \(\overline{G}_{best}\) is the global best value, \(\overline{L}_{best}\) Local best value, R1 and R2 are two independent random numbers in the range from zero to one.

2.3.2 Calculation of the fitness function

It is used to measure the quality of the represented solution.

$${\text{f}} = \frac{W1*R1*F1 + W2*R2*F2}{W1*R1 + W2*R2}$$
(3)

Here

$${\text{w}}1 = \frac{D1}{D1 + D2}$$
(4)
$${\text{w}}2 = \frac{D2}{D1 + D2}$$
(5)

where F1 is the fitness, R1 is the reliability, D1 is the distance.

2.3.3 Calculation of cross over and mutation

The progress value of crossover CP as the gain obtained by

$${\text{CP}} = {\text{f}}\_{\text{sum}}_{\text{S}} - {\text{f}}\_{\text{sum}}_{\text{P}}$$
(6)

Here f_sumS is the fitness sum of the two offspring, f_sumP is the fitness sum of the parent individuals.

Mutation MP is

$${\text{MP}} = {\text{f}}_{\text{new}} - {\text{f}}_{\text{old}}$$
(7)

3 Particle swarm optimization versus genetic algorithm

The Table 4 herewith specifies the comparison factors of particle swarm optimization and genetic algorithm.

Table 4 PSO versus GA

4 Data encryption

In this research work find out the best solution 0.0321437095 (This value derived from fingerprint and iris).It can be act as a key for encrypting and decrypting the data using triple data encryption standard algorithm. Triple DES algorithm receives 168 bit keys which is divided into three 56 bit keys [10, 11]. Encryption using First Secret Key, Decryption using Second secret key Encryption using third secret key. Table 5 represents process of data encryption and data decryption.

Table 5 Process of data encryption and decryption

5 Execution of results

Randomly testing fingerprint and iris image to hack encrypted data by using particle swarm optimization algorithm. in our proposed technique Secured the data by using Hybrid Genetic algorithm and Particle swarm optimization algorithm. Therefore hacker couldn’t be hacking the encrypted data. Table 6 represents randomly tested with Fingerprint and Iris image. Figures 2, 3 and 4 proves that HGAPSO could be considered as the best solution.

Table 6 Testing with fingerprint and Iris image
Fig. 2
figure 2

Best solution for the finger print image 5 and iris image 1

Fig. 3
figure 3

Best solution for the finger print image 6 and iris image 2

Fig. 4
figure 4

Best solution for the finger print image 7 and iris image 3

Randomly testing the image of Fingerprint with iris for the purpose of Man in the Middle attack. Initially the user has given input image of fingerprint and iris for feature extraction. Extracting the feature values using local binary pattern. These values can be given input to the HGAPSO algorithm for finding the best solution. First initialize all the fingerprint and Iris Values. Ten evaluating the values to finding the fitness (1–6 iterations can be generated). Choose the best value and replace the worst value, likewise all the values can be calculated to find out the best solution. The best solution value can be act as a key for encrypting and decrypting the data using Triple DES Algorithm. Finally all the best values compared with the algorithm of HGAPSO and PSO. The HGAPSO Algorithm almost finds out the best value compared with existing PSO. And also less attack compared with PSO. Finally encrypted data stored in cloud [12,13,14,15]. Table 7 represents testing process for fingerprint image 109_5 with Iris image109_1 image Table 8 represents test with the fingerprint image 109_6 and iris image 109_2 image. Tables 9 and 10 represents Test with the Fingerprint image 109_7 with iris image 109_3. For finding best value and also identifying less attack.

Table 7 Testing process with fingerprint image 109_5 and Iris image 109_1 image
Table 8 Testing process with fingerprint image 109_6 and Iris image 109_2 image
Table 9 Testing process with fingerprint image 109_7 and iris image 109_3 image
Table 10 Best values for proposed HGAPSO compared with Existing PSO
  1. (i)

    Randomly tested with the fingerprint 109_6 image with the Iris image109_2 image.

  2. (ii)

    Randomly tested with the fingerprint 109_7 image with the Iris image109_3 image.

  3. (i)

    Execution 1: Fingerprint image 109_5.png with Iris Image 109_1.png.

  4. (ii)

    Execution 2: Fingerprint image 109_6.png with Iris Image 109_2.png.

  5. (iii)

    Execution 3: Fingerprint image 109_7.png with Iris Image 109_3.png.

5.1 Man in middle attack

Randomly tested for the purpose of man in middle attack while comparing with 3 fingerprint and 3 iris. Finally the result concluded as proposed Hybrid Genetic algorithm and Particle swarm optimization algorithm is 0.017163456504999995, Compared with the existing particle swarm optimization then the value is 0.039866595835000004. Comparing both algorithms HGAPSO and Existing PSO Algorithm as shown in Fig. 5 it proves that HGAPSO is less Attacked considering existing PSO. Total Running Time 1 min 14 s.

Fig. 5
figure 5

Comparison of HGAPSO with existing PSO for best solution

6 Conclusion

Derived the best solution from fingerprint and Iris with the help of LBP, HGAPSO algorithm, cross over mutation technique, and Triple DES algorithm. (i) Derived the feature value of fingerprint and Iris using LBP. (ii) To find the best solution using HGAPSO algorithm with the help of cross over mutation technique. (iii) To encrypting the data using Triple DES algorithm and it is stored in cloud environment. So the intruder cannot be able to access the data in cloud environment. In this research work at final stage randomly checking the Fingerprint and iris with the help of Proposed HGAPSO algorithm, and also check with the existing particle swarm optimization algorithm. Comparing both algorithms as per the result wise HGAPSO is better than PSO algorithm. The total successful building time is 1 min 14 s. It can be more secure less attack and higher data security in cloud.