TripleDES

SaunieraLuxe

New Member
I've been looking into using encryption within a new app I am building using .NET (my very first .NET project I may add).<BR><BR>I've found some wonderful examples of using DES & Symmetric Algorithm encryption but I am stumped on TripleDES.<BR><BR>TripleDES is supposed to encrypt the data 3 times with 3 different 56bit keys (according to MSDN). Looking at the example on the site (see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemsecuritycryptographysymmetricalgorithmc lasstopic.asp), they show one single key being passed in. Is this right? Is the function supposed to be called three times?<BR><BR>The issue is probably my ignorance but I'd like some help if anybody can. My biggest problems with .NET have been trying to figure out what all the classes and namespaces are and the syntax to use them. I don't have access to visualstudio.net but I'd like to find one really good source of .NET info that shows all of this without have to rely on Google. - CheersI still haven't found the answer to this...I've used some of the other crypto classes in .Net and your question peaked my curiousity because there is clearly only one key being passed into the CryptoStream. After looking around on the internet about Triple DES I figured that the one 192 bit key was broken into 3 seperate keys and if they each didn't reach the 64 bit length then they were padded(similiar to other encryption/hashing methods that pad if necessary).<BR><BR>This link gives more info on triple DES itself and how they keys are used to encrypt:<BR>http://www.tropsoft.com/strongenc/des3.htmI just read the remarks in the .Net help file:<BR><BR>The length of the key must be either 128 or 192 bits.I might as well reply once again in case anyone stumble upon it.<BR>The 2 key (128 bit) key scenario can work because one key is effectively used twice.<BR><BR>The three keys key1, key2 and key3 can be independent OR<BR>key1 and key2 are independent, but key1 = key3. <BR><BR><BR>http://www.rsasecurity.com/rsalabs/faq/3-2-6.html<BR>Interesting... i've been using a 1024 bit key for the single DES method for strong encryption and it works there. I'll try to use the same method under Triple and see if I can make it work.
 
Back
Top