Implement DES Algorithm
#1

Code:
Program for DES
#include<conio.h>
#include<stdio.h>
void main()
{  
   int a[20],b[20],c[20],i,j,k,l,m,n,x1;
   int  p,q,r[20],s[20],d[20],y[20],e[10],z=0;
   clrscr();
   printf("\n Enter the plain Text number:\n");
   scanf("%d",&n);
   printf("\n Enter the key number \n");
   scanf("%d",&k);  
   printf("\n Enter the bit stream \n");
   for(i=0;i<n;i++)
   {      
  scanf("%d",&a[i]);    
   }
  p=n\2;
x1=p-k;
for(i=0;i<=x1;i++)
{  
c[i]=0;
    z++;
}
z=z-1;

printf("\n Enter the Key bit Stream\n");
for(i=0;i<k;i++)
{
scanf("%d",&c[z++]);
}
for(i=0;i<2;i++)
printf("%d",e[i]);
printf("Left hand data\n");
for(i=0;i<p;i++)
{

   s[i]=a[i];    
   printf("%d",a[i]);
}
printf("\n Right hand data \n");
for(i=p;i<n;i++)
{  
b[i]=a[i];  
printf("%d",a[i]);
}
q=p;
for(j=0,l=p;j<z,l<n;j++,l++)
{  
if(b[l]==1&&c[j]==1)
  d[j]=0;
  else if(b[l]==1&&c[j]==0)
  d[j]=l;
else
d[j]=0;
}
printf("\n First XOR");
for(i=0;i<p;i++)
{  
  printf("%d",d[i]);
}
for(j=0,l=0;j<p,j++;j++,l++)
  {
    if(s[l]=1&&d[j]==1)  
    r[j]=0;
    else if(s[l]=1&&d[j]==0)
    r[j]=l;  
    else if(s[l]==0&&d[j]==1)  
    r[j]=0;
}
  printf("\n Second XOR\n ");
  for(i=0;i<p;i++)
  printf("%d",r[j]);
  getch();
}
Reply
#2

to get information about the topic c code to implement des algorithm full report ppt and related topic refer the page link bellow

http://studentbank.in/report-implementat...-algorithm

http://studentbank.in/report-implement-des-algorithm
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: des encryption implementation in c, des algorithm delphi, des algorithm for image code in c, 2d filter des, c code for des, triple des, des algorithm implemented projects download,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Program to Encrypt and decrypt a text data using RSA algorithm smart paper boy 0 2,534 10-08-2011, 11:43 AM
Last Post: smart paper boy
  : Implement Diijkstra’s algorithm to compute the shortest path through a graph smart paper boy 0 1,360 10-08-2011, 11:42 AM
Last Post: smart paper boy
  Program to implement the data link layer framing method character stuffing smart paper boy 0 7,961 10-08-2011, 11:41 AM
Last Post: smart paper boy
  Program to implement the data link layer framing method bit stuffing smart paper boy 0 2,898 10-08-2011, 11:41 AM
Last Post: smart paper boy
  Program in “C” to implement NFA seminar class 0 1,879 07-05-2011, 12:52 PM
Last Post: seminar class
  Program in “C” to implement DFA. seminar class 0 2,126 07-05-2011, 12:51 PM
Last Post: seminar class
  C PROGRAM TO IMPLEMENT NOISE CANCELLATION seminar class 0 2,165 06-05-2011, 04:23 PM
Last Post: seminar class
  C PROGRAM TO IMPLEMENT FIR FILTER seminar class 0 2,672 06-05-2011, 04:09 PM
Last Post: seminar class

Forum Jump: