Saturday, November 16, 2019

Passive and Active Security Attacks

Passive and Active Security Attacks Ans :- The difference between active and passive attacks in case of active attack involve the updating upon the data means the active attack access the data and then perform alteration upon the data and than data transmit on the network but in case of passive attack the attacker just access the message and the contents of the message without any alteration upon the data means just type attack just involve to read and access the message the content mean just observe the message . The active attack easy to detect but not easy to protect but passive attack difficult to detect easy to prevent Examples of the Active attack Replay Message modification Denial of service Example of the Passive attack Traffic Analysis Q2. List and briefly define categories of security services. Ans :- The various type secure services are :- Authentication Access Control (Authorization) Data Confidentiality Connection Confidentiality Connectionless Confidentiality 4. Data Integrity Connection Integrity with Recovery Connection Integrity without recovery Connectionless integrity Non Repudiation Authentication:- the service of authentication concern with the validate to the user before receiving the data at the receiving end . Means this service provide the way to authenticate the receiving of data after confirming the data coming from the valid user. Access Control :- after authentication the next task is access control means when user request to access the specific data then after perform authentication just next task to check the privileges of user what type of task user can be perform and what type of Resources can be access by the user . user can capable to read the contents of the data and Data Confidentiality:- This service basically refer to provide the confidence the data receive by the receiver not be access and read by any other person during data transmission mean the content of the msg not view by any other person. The type of data confidentiality:- Connection Confidentiality:- Refer to protect the data of all the during from read the content of the data on the connection. Connectionless confidentiality :- Refer to providing the protection from accessing the data of all the user on the Block of data. Data Integrity :- Refer to sure that the data receive by the receiver not be updating during the transmission by any other unrecognized person . mean the data receive by the receiver the actual data that is send by the sender. The following the types of the data integrity: Connection integrity with recovery:-Provide the integrity upon the data during transmission on the connection if there is any updation detect then also recover the message from the alteration and convert into the actual contents. Connection integrity without recovery:- refer to providing the integrity upon the data but not providing the recovery upon the data. Connectionless data integrity:- provide integrity upon the block of data also prevent if any alteration performed but not recover the message. Non repudiation :- refer to provide confidence to the sender the data receive by the receiver is the actual receiver and also provide confidence in the receiver side the data send by the actual sender. Q3. Is there any problem with the one-time pad cipher? Discuss the Problems. Ans :- yes there is problem with one time pad cipher :- Despite Shannons proof of its security, the one-time pad has serious drawbacks in practice: it requires perfectly random one-time pads, which is a non-trivial software requirement secure generation and exchange of the one-time pad material, which must be at least as long as the message. (The security of the one-time pad is only as secure as the security of the one-time pad key-exchange). careful treatment to make sure that it continues to remain secret from any adversary, and is disposed of correctly preventing any reuse in whole or part  Ãƒ ¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬ hence one time. See data reminisce for a discussion of difficulties in completely erasing computer media. Q4. Define types of attacks based on what is known to the attacker. Ans:- The following are the typed of on the based on the known to the attacker Cipher Text Only Known Plaintext Chosen Plaintext Chosen cipher text Chosen Text Cipher Text Only :- in this type attack the attacker only know the algorithm used to encrypt the message from plaintext to cipher text .and also known the cipher text and try to be convert the cipher text into the plain text by using the brute forte attack if the key length if too large than this attack to be used no possible then require to be use the crypt analytical way . Known Plaintext :- in this attack attacker know the algorithm , cipher text and also know having idea and some of knowledge of the plain text and upon the bases of the knowing plain text generate the cipher text and contain the key to be use to convert the message from plaintext to cipher text. Chosen Pain text :- in this attack attacker know the algorithm , cipher text and also also having some of the chosen plain text and also having the cipher text of the plain text with the key used to convert the plain text into the cipher text Chosen cipher text :- in this attacker know the algorithm , cipher text and also known the cipher text that to be chosen and also having the plain text and also the key that use to convert the cipher text into the plain text. Chosen Text:- in this type of attack attacker know the algorithm , cipher text , and also some of plain text and also conversion into the cipher text included key and also having the some chosen cipher text pain with also having the plain text of all the message and also having key information. Q5. Write a Program to implement Play fair cipher? Ans :- /* Program to implemencryptiont ppfair cipher */ #includecryption #includecryption void main() { char pp[5][5],encryption[10],decryption[10],data1[10],kk[10],str[26]=abcdecryptionfghijklmnopqrstuvwxyz; int i,j,k=0,m=0,l,flag=0,lencryption,onx,ony,twx,twy; char on,tw,temp1,temp2; clrscr(); /* Reading the plain text */ printf(n encryptionter the data1 : ); gets(data1); /* Reading the kk */ printf(n encryptionter the kkword : ); gets(kk); /* Implemencryptionting the algorithm */ for(i=0;i { j=0; while(j { on=kk[j]; j++; tw=kk[j]; if(on==tw) { while(kk[j+1]!=NULL) { kk[j]=kk[j+1]; j++; } kk[j]=NULL; } } printf(n t modified kk is : ); puts(kk); for(i=0;i { for(j=0;j { if(kk[k]!=NULL) { pp[i][j]=kk[k]; k++; } else { pp[i][j]=NULL; } } } lencryption=strlencryption(kk); l=0; for(i=0;i { for(j=0;j { if(pp[i][j]==NULL) { flag=0; for(k=0;k { if((str[l]==kk[k])l { flag=1; break; } } if(flag==1) { l++; j; } else { pp[i][j]=str[l]; l++; } }} } printf(n); for(i=0;i { for(j=0;j { printf(t %c,pp[i][j]); } printf(n); } for(i=0;i { j=0; while(j { on=data1[j];j++; tw=data1[j]; if(on==tw) { data1[j]=x; temp1=data1[++j]; data1[j]=tw; while(data1[j]!=NULL) { temp2=data1[++j]; data1[j]=temp1; temp1=temp2; } data1[++j]=NULL; } } } printf(n t modifed data1 : ); puts(data1); i=0;j=0; while(data1[i]!=NULL) { on=data1[i]; i++; if(data1[i]!=NULL) { tw=data1[i]; i++; } else { tw=x; } for(k=0;k { for(m=0;m { if(pp[k][m]==on) { onx=k; ony=m; } if(pp[k][m]==tw) { twx=k; twy=m; } } } if(twx==onx) { encryption[j]=pp[onx][(ony+1)%5]; j++; encryption[j]=pp[twx][(twy+1)%5]; j++; } else if(twy==ony) { encryption[j]=pp[(onx+1)%5][ony]; j++; encryption[j]=pp[(twx+1)%5][twy]; j++; } else { encryption[j]=pp[onx][twy]; j++; encryption[j]=pp[twx][ony]; j++; } } encryption[j]=NULL; // encryptioncrypted data1 printf(n t encryptioncryted data1 is: ); puts(encryption); // decryptioncrypting the givencryption encryptioncrypted data1 i=0;j=0; while(encryption[i]!=NULL) { on=encryption[i]; i++; tw=encryption[i]; i++; for(k=0;k { for(m=0;m { if(pp[k][m]==on) { onx=k; ony=m; } if(pp[k][m]==tw) { twx=k; twy=m; } } } if(twx==onx) { ony=ony-1; twy=twy-1; if(ony==-1) { ony=4; } if(twy==-1) { twy=4; } decryption[j]=pp[onx][ony]; j++; decryption[j]=pp[twx][twy]; j++; } else if(twy==ony) { onx=onx-1; twx=twx-1; if(onx==-1) { onx=4; } if(twx==-1) { twx=4; } decryption[j]=pp[onx][ony]; j++; decryption[j]=pp[twx][twy]; j++; } else { decryption[j]=pp[onx][twy]; j++; decryption[j]=pp[twx][ony]; j++; } } } decryption[j]=NULL; // decryptioncrypted data1 printf(n t decryptionncryptioncryted data1 is: ); puts(decryption); getch(); } Q6. Given the speed of a current ordinary computer (for home or light office use), estimate the amount of time necessary to crack a DES encryption by testing all 256 possible keys. Make a similar estimate for a 128-bit AES key. Ans :- We assume that the household computer has a 2GHZ processor. Also we assume that a machine takes a hundred cycles per brute force against a single 56-bit DES key or 128 bit AES key. To crack a DES encryption, we need: (2^56 key)*100 cycles/60sec/60min/24hour/365days/2000000000hz = 114.246566  years To crack a AES encryption, we need: (2^128 key)*100 cycles/60sec/60min/24hour/365days/2000000000hz = 5.39514154 ÃÆ'- 1023 years

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.