Solved

How to implement Data Encryption Algorithms (DES) in C++

Posted on 1998-11-06
5
4,367 Views
Last Modified: 2012-06-21
I would like to understand how the des(data encryption standard) algorithm run and then to write a program using C++ or C. Can someone help me with this ??
Thank you.
0
Comment
Question by:zakirin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Author Comment

by:zakirin
ID: 1177202
Edited text of question
0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 170 total points
ID: 1177203
look at:
http://www.aci.net/Kalliste/des.htm
it doesn't have code but it has a very good explanation of the algorithm.
Aboute code: (usual C)
ftp://ftp.funet.fi/pub/crypt/cryptography/symmetric/des/
or
http://www.eskimo.com/~weidai/cryptlib.html (C++)

0
 

Expert Comment

by:nibbler
ID: 1177204
I don't know exactly which algorithm you mean with DES...
Is PGP-encryption / description ok ?? (This is the encryption they use to send data between banks etc..)

Here's how PGP-encrypion /decription algorithm works

- Get 2 big prime numbers (with 100 digits or so)
  we calls these p and q
- n = p * q (rember this, we need this value)
  phi(p) = p - 1
  phi(q) = q - 1
  phi(n) = phi(p) * phi(q) = (p-1)*(q-1) (also remember phi(n))
- E is the encryption key,
  D is the decryption key..      
  (E*D) mod phi(n) = 1
- Now we are going to calculate the D (decryption key)
 
Sorry, I forgot this step, I need to search it in my Mathematics book at home...

- When you get the D, you can calculate the E, by solving this
  equation.
  E*D = 1 (mod phi(n)) note '=' must have three bars...

- The message(M) can be encoded this way:
     E
  (M)
  It can be decoded with:
     D
  (M)
The big advantage of this method is that the description(D) can't be calculated (very fast, more then a few hundred years with a LOT of fast computers).

Well I will give you another comment when I've got the book at home...
 



0
 
LVL 22

Expert Comment

by:nietod
ID: 1177205
That is the DES algorythm.

>>The big advantage of this method is that the description(D) can't be
>> calculated (very fast, more then a few hundred years with a LOT
>> of fast computers).
Techniques have been developed to break this system using multiple computers.  A large key was broken in less than 3 months using 100 computers.  It is still a very good safeguard, but...
0
 

Author Comment

by:zakirin
ID: 1177206
Thanks a lot Alex.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question