Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Triple DES algorithm in C?

Tags:

c

security

Does anyone have code snippet for Triple DES algorithm in C ?

Thanks

like image 884
Zeus Avatar asked Mar 22 '10 03:03

Zeus


People also ask

What is Triple DES algorithm?

What Does Triple DES Mean? Triple Data Encryption Standard (DES) is a type of computerized cryptography where block cipher algorithms are applied three times to each data block. The key size is increased in Triple DES to ensure additional security through encryption capabilities. Each block contains 64 bits of data.

What is difference between DES and 3DES?

Difference between 3DES and DESDES is a symmetric-key algorithm that uses the same key for encryption and decryption processes. 3DES was developed as a more secure alternative because of DES's small key length. 3DES or Triple DES was built upon DES to improve security.

What is DES algorithm with example?

For example, if we take the plaintext message "8787878787878787", and encrypt it with the DES key "0E329232EA6D0D73", we end up with the ciphertext "0000000000000000". If the ciphertext is decrypted with the same secret DES key "0E329232EA6D0D73", the result is the original plaintext "8787878787878787".


2 Answers

OpenSSL is written in C and provides a 3DES algorithm. It may not be as simple as some of the other suggestions, but it may be worth checking out.

like image 89
jschmier Avatar answered Oct 06 '22 00:10

jschmier


Check out the Crypto++ library, they implement tons of algorithms including DES.

like image 37
Vlad the Impala Avatar answered Oct 05 '22 23:10

Vlad the Impala