PROBLEM STATEMENT:
Implementation of ceaser cipher & perform Brute Force Attack on ceasercipher.
PROGRAM:
#include<stdio.h>#include<string.h>void main(){char str[50];char c[50],c1[50];int n=0, x, a,i=0,key, key1,j,sub;printf("Enter Plain text:-") ;gets(str);n=strlen(str);printf("Enter the key :-");scanf("%d",&key);if(key>26)key1= key %26;for(i=0;str[i]!=NULL;i++){x=str[i];if(x==32){c[i]=32;printf("%c",c[i]);}if(x>=65 && x<=90){if( (x+key) >90 ){c[i]=64+x+key-90;}else{c[i]=x+key;}}if(x>=97 && x<=122){if( (x+key) >122 ){c[i]=96+x+key-122;}