Ensuring-Data-Security-in-Cloud-ComputingCloud computing Java Project  has been envisioned as the next-generation architecture of IT enterprise. In contrast to traditional solutions, where the IT services are under proper physical, logical and personnel controls, cloud computing moves the application software and databases to the large data centers, where the management of the data and services may not be fully trustworthy. This unique attribute, however, poses many new security challenges which have not been well understood. In this article, we focus on cloud data storage security, which has always been an important aspect of quality of service.

To ensure the correctness of users’ data in the cloud, we propose an effective and flexible distributed scheme with two salient features, opposing to its predecessors. By utilizing the homomorphic token with distributed verification of erasure-coded data, our scheme achieves the integration of storage correctness insurance and data error localization, i.e., the identification of misbehaving server (s).

Unlike most prior works, the new scheme further supports secure and efficient dynamic operations on data blocks, including: data update, delete and append. Extensive security and performance analysis shows that the proposed scheme is highly efficient and resilient against Byzantine failure, malicious data modification attack, and even server colluding attacks.

Project Source Code.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
import java.rmi.*;
import java.rmi.server.*;
import java.net.*;
import java.io.*;
import javax.swing.*;
import java.awt.event.*;
import java.lang.*;
import java.awt.*;
import javax.swing.filechooser.FileSystemView;
import java.util.StringTokenizer;
import java.net.InetAddress;
import java.rmi.Naming;
import java.util.Date;
import java.util.Vector;
import java.util.Random;

public class Login extends javax.swing.JFrame

{

//String honey="127.0.0.1";

RMISIntf ref;

JOptionPane op;

Vector v= new Vector(2);

String sss=null;

static String username;

 

/** Creates new form Login */

 

public Login()

{

initComponents();

}

 

private void initComponents()

{

//GEN-BEGIN:initComponents

jPan = new javax.swing.JPanel();

jLabel1 = new javax.swing.JLabel();

user = new javax.swing.JTextField();

jLabel2 = new javax.swing.JLabel();

submit = new javax.swing.JButton();

reset = new javax.swing.JButton();

exit = new javax.swing.JButton();

pass = new javax.swing.JPasswordField();

jLabel3 = new javax.swing.JLabel();

op=new JOptionPane();

getContentPane().setLayout(null);

jPanel1 = new javax.swing.JPanel();

listres = new javax.swing.JList();

jLab = new javax.swing.JLabel();

download = new javax.swing.JButton();

resArea = new TextArea();

save = new javax.swing.JButton();

 

getContentPane().setLayout(null);

addWindowListener(new java.awt.event.WindowAdapter()

{

public void windowClosing(java.awt.event.WindowEvent evt)

{

exitForm(evt);

}

});

 

jPan.setLayout(null);

 

jPan.setBackground(new java.awt.Color(0, 116, 232));

jPan.setBorder(new javax.swing.border.EtchedBorder());

jLab.setFont(new java.awt.Font("Arial", 0, 14));

jLab.setForeground(new java.awt.Color(255, 255, 255));

jLab.setText("User ID:");

jPan.add(jLab);

jLab.setBounds(40, 40, 90, 30);

 

jPan.add(user);

user.setBounds(140, 40, 100, 30);

 

jLabel2.setFont(new java.awt.Font("Arial", 0, 14));

jLabel2.setForeground(new java.awt.Color(255, 255, 255));

jLabel2.setText("Password:");

jPan.add(jLabel2);

jLabel2.setBounds(40, 90, 90, 30);

 

submit.setBackground(new java.awt.Color(255, 255, 255));

submit.setFont(new java.awt.Font("Arial", 0, 14));

submit.setForeground(new java.awt.Color(0, 0, 0));

submit.setText("Submit");

 

submit.addActionListener(new java.awt.event.ActionListener()

{

public void actionPerformed(java.awt.event.ActionEvent evt)

{

submitActionPerformed(evt);

}

});

 

jPan.add(submit);

submit.setBounds(20, 150, 80, 27);

 

reset.setBackground(new java.awt.Color(255, 255, 255));

reset.setFont(new java.awt.Font("Arial", 0, 14));

reset.setForeground(new java.awt.Color(0, 0, 0));

reset.setLabel("Reset");

 

reset.addActionListener(new java.awt.event.ActionListener()

{

public void actionPerformed(java.awt.event.ActionEvent evt)

{

resetActionPerformed(evt);

}

});

 

jPan.add(reset);

reset.setBounds(120, 150, 80, 27);

 

exit.setBackground(new java.awt.Color(255, 255, 255));

exit.setFont(new java.awt.Font("Arial", 0, 14));

exit.setForeground(new java.awt.Color(0, 0, 0));

exit.setLabel("Exit");

exit.addActionListener(new java.awt.event.ActionListener()

{

public void actionPerformed(java.awt.event.ActionEvent evt)

{

exitActionPerformed(evt);

}

});

 

jPan.add(exit);

exit.setBounds(220, 150, 70, 27);

 

jPan.add(pass);

pass.setBounds(140, 91, 100, 30);

 

getContentPane().add(jPan);

jPan.setBounds(60, 100, 320, 200);

 

jLabel3.setFont(new java.awt.Font("Arial", 0, 20));

jLabel3.setForeground(new java.awt.Color(255, 0, 0));

jLabel3.setText("Ensuring Data Storage Security in Cloud Computing");

getContentPane().add(jLabel3);

jLabel3.setBounds(200, 10, 700, 30);

JLabel imageLabel = new JLabel();

ImageIcon ii = new ImageIcon(LoginDialog.class.getResource("images/network.JPG"));

imageLabel.setIcon(ii);

imageLabel.setBounds(400,50,481,241);

imageLabel.setBackground(new Color(0, 116, 232));

this.getContentPane().add(imageLabel);

 

pack();

 

jPanel1.setLayout(null);

jPanel1.setBackground(new java.awt.Color(0, 116, 232));

jPanel1.setBorder(new javax.swing.border.EtchedBorder());

listres.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED));

jPanel1.add(listres);

listres.setBounds(20, 50, 150, 220);

 

jLabel1.setFont(new java.awt.Font("Arial", 0, 17));

jLabel1.setForeground(new java.awt.Color(255, 255, 255));

jLabel1.setText("Resources Available:");

jPanel1.add(jLabel1);

jLabel1.setBounds(20, 5, 200, 40);

 

download.setBackground(new java.awt.Color(255, 255, 255));

download.setFont(new java.awt.Font("Arial", 0, 15));

download.setForeground(new java.awt.Color(0, 0, 0));

download.setText("Download");

download.addActionListener(new java.awt.event.ActionListener()

{

public void actionPerformed(java.awt.event.ActionEvent evt)

{

downloadActionPerformed(evt);

}

});

 

jPanel1.add(download);

download.setBounds(180, 60, 110, 27);

getContentPane().add(jPanel1);

jPanel1.setBounds(20, 40, 340, 280);

getContentPane().add(resArea);

resArea.setBounds(20, 330, 450, 200);

 

save.setBackground(new java.awt.Color(255, 0, 0));

save.setFont(new java.awt.Font("Arial", 0, 15));

save.setForeground(new java.awt.Color(255, 255, 255));

save.setText("Save");

save.addActionListener(new java.awt.event.ActionListener()

{

public void actionPerformed(java.awt.event.ActionEvent evt)

{

 

saveActionPerformed(evt);

}

});

 

getContentPane().add(save);

save.setBounds(500, 340, 70, 27);

resArea.setVisible(false);

save.setVisible(false);

jPanel1.setVisible(false);

setBackground(new java.awt.Color(0, 204, 204));

}

//GEN-END:initComponents

 

private void exitActionPerformed(java.awt.event.ActionEvent evt)

{

//GEN-FIRST:event_exitActionPerformed

System.exit(0);

}

 

 

private void resetActionPerformed(java.awt.event.ActionEvent evt)

{

//GEN-FIRST:event_resetActionPerformed

 

user.setText("");

pass.setText("");

}

 

private void submitActionPerformed(java.awt.event.ActionEvent evt)

{

try

{

 

ref= (RMISIntf)Naming.lookup("rmi://"+"127.0.0.1"+"/RMIServer");

//System.out.println(ref.res("sdsd","dsa"));

 

 

if(user.getText().trim().equals(""))

{

op.showConfirmDialog(this,"Enter The User Name","Alert",JOptionPane.DEFAULT_OPTION,JOptionPane.ERROR_MESSAGE);

user.grabFocus();

}

else

{

if(pass.getText().trim().equals(""))

{

op.showConfirmDialog(this,"Enter The PassWord","Alert",JOptionPane.DEFAULT_OPTION,JOptionPane.ERROR_MESSAGE);

pass.grabFocus();

}

else

{

InetAddress Address = InetAddress.getLocalHost();

String c =Address.getHostAddress();

ref= (RMISIntf)Naming.lookup("rmi://"+"127.0.0.1"+"/RMIServer");

String ss=ref.CliDet(user.getText(),pass.getText(),c);

if(ss.equals("notok"))

{

op.showConfirmDialog(this,"UnAuthorised User","Alert",JOptionPane.DEFAULT_OPTION,JOptionPane.ERROR_MESSAGE);

user.grabFocus();

}

 

else

{

 

username=user.getText();

String key=(String)JOptionPane.showInputDialog(this,"Enter your Key:");

ref=(RMISIntf)Naming.lookup("rmi://"+"127.0.0.1"+"/RMIServer");

String status=ref.CliDet_key(user.getText(),key);

if(status.equals("ok"))

{

username=user.getText();

//getContentPane().remove(jPan);//.visible(false);

jPan.setVisible(false);

jPanel1.setVisible(true);

resArea.setVisible(true);

save.setVisible(true);

StringTokenizer token=new StringTokenizer(ss,";");

while(token.hasMoreTokens())

{

String nextToken = token.nextToken();

v.addElement(nextToken);

System.out.println(nextToken);

}

listres.setListData(v);

}///inner if

else

{

op.showConfirmDialog(this,"UnAuthorised User","Alert",JOptionPane.DEFAULT_OPTION,JOptionPane.ERROR_MESSAGE);

user.grabFocus();

}

}

 

}

}

}catch(Exception e){System.out.println(e);}

 

 

 

}

 

private void downloadActionPerformed(java.awt.event.ActionEvent evt)

{

//System.out.println(username);

//GEN-FIRST:event_downloadActionPerformed

 

sss=(String)listres.getSelectedValue();

System.out.println(sss);

int ch=0;

try{

InetAddress Address = InetAddress.getLocalHost();

String c =Address.getHostAddress();

/////////////////////////////////////////////////////

 

String aa[]=new String[4];

ref= (RMISIntf)Naming.lookup("rmi://"+"127.0.0.1"+"/RMIServer");

/////////////////////////

String chh=ref.checkipp(c,sss);

StringTokenizer st=new StringTokenizer(chh,";");

String ipp=null;

String opp=null;

//while(st.hasMoreTokens()) {

ipp=st.nextToken();

System.out.println(ipp+"hai");

 

opp=st.nextToken();

System.out.println(opp);

//}

String optiontest="null";

if(ipp.equals("ok")||opp.equals("true"))

{

optiontest="true";

String a=(String)JOptionPane.showInputDialog(this,"Enter your password:");

aa[0]=a;

a=(String)JOptionPane.showInputDialog(this,"Enter your  correct password:");

aa[1]=a;

a=(String)JOptionPane.showInputDialog(this,"Enter correct password:");

aa[2]=a;

System.out.println(aa[0]+aa[1]);

aa[3]=new Date().toString();

ref.store(aa,c,username,sss);

}

/////////change

String ssss=ref.res(sss,c,optiontest);

/********File ss=ref.res(sss,c,);

//File file = new File(ss);

FileInputStream in = new FileInputStream(ss);

int i = in.available();

char st[]=new char[i];

int j =0;

while((ch=in.read())!=-1)

{

st[j] = (char) ch;

j++;

}

String str=new String(st);

resArea.setText(str);

***********/


System.out.println("new             "+ssss);

resArea.setText(ssss);

 

} catch(Exception e)

{

System.out.println(e);

}

}

private void saveActionPerformed(java.awt.event.ActionEvent evt)

{

//GEN-FIRST:event_saveActionPerformed

 

try {

FileDialog fd=new FileDialog(this,"File Store", FileDialog.SAVE);

fd.setVisible(true);

String f= fd.getFile();

fd.setFile(f); // Filename filter

fd.setDirectory("."); // Current directory

//fd.show();

FileOutputStream out=new FileOutputStream(f);

String s=resArea.getText();

System.out.println(s);

byte b[]=s.getBytes();

out.write(b);

} catch(Exception e)

{

System.out.println(e);

}

}

/** Exit the Application */

 

private void exitForm(java.awt.event.WindowEvent evt)

{

//GEN-FIRST:event_exitForm

System.exit(0);

}

/**

* @param args the command line arguments

*/


public static void main(String args[]) {

JFrame jf1=new Login();

jf1.setResizable(false);

jf1.setSize(900,600);

jf1.setTitle("Ensuring Data Storage Security in Cloud Computing");

jf1.show();

}

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JButton exit;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JPanel jPan;

private javax.swing.JPasswordField pass;

private javax.swing.JButton reset;

private javax.swing.JButton submit;

private javax.swing.JTextField user;

private javax.swing.JButton download;

private javax.swing.JLabel jLab;

private javax.swing.JPanel jPanel1;

private javax.swing.JList listres;

private java.awt.TextArea resArea;

private javax.swing.JButton save;
// End of variables declaration//GEN-END:variables

} 
Existing System:

From the perspective of data security, which has always been an important aspect of quality of service, Cloud Computing inevitably poses new challenging security threats for number of reasons. 

1 . Firstly, traditional cryptographic primitives for the purpose of data security protection can not be directly adopted due to the users’ loss control of data under Cloud Computing. Therefore, verification of correct data storage in the cloud must be conducted without explicit knowledge of the whole data. Considering various kinds of data for each user stored in the cloud and the demand of long term continuous assurance of their data safety, the problem of verifying correctness of data storage in the cloud becomes even more challenging. 

2 . Secondly, Cloud Computing is not just a third party data warehouse. The data stored in the cloud may be frequently updated by the users, including insertion, deletion, modification, appending, reordering, etc. To ensure storage correctness under dynamic data update is hence of paramount importance. 

These techniques, while can be useful to ensure the storage correctness without having users possessing data, can not address all the security threats in cloud data storage, since they are all focusing on single server scenario and most of them do not consider dynamic data operations. As an complementary approach, researchers have also proposed distributed protocols  for ensuring storage correctness across multiple servers or peers. Again, none of these distributed schemes is aware of dynamic data operations. As a result, their applicability in cloud data storage can be drastically limited. 

Proposed System:

In this paper, we propose an effective and flexible distributed scheme with explicit dynamic data support to ensure the correctness of users’ data in the cloud. We rely on erasure correcting code in the file distribution preparation to provide redundancies and guarantee the data dependability. This construction drastically reduces the communication and storage overhead as compared to the traditional replication-based file distribution techniques. By utilizing the homomorphic token with distributed verification of erasure-coded data, our scheme achieves the storage correctness insurance as well as data error localization: whenever data corruption has been detected during the storage correctness verification, our scheme can almost guarantee the simultaneous localization of data errors, i.e., the identification of the misbehaving server(s).

1. Compared to many of its predecessors, which only provide binary results about the storage state across the distributed servers, the challenge-response protocol in our work further provides the localization of data error. 

2. Unlike most prior works for ensuring remote data integrity, the new scheme supports secure and efficient dynamic operations on data blocks, including: update, delete and append. 

3. Extensive security and performance analysis shows that the proposed scheme is highly efficient and resilient against Byzantine failure, malicious data modification attack, and even server colluding attacks.

download Project Report, project Code and  paper presentation  of  CSE Cloud computing Java Project.