Quick Search for:  in language:    
TEA,GOST,RC4,DES,PSC,collection,SECURE,encryp
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,011,557. lines
 Jobs: 117. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic.
Defrag at certain time
By Michael Nipper on 7/1


Click here to see a screenshot of this code!Extended Find Ver 2
By Roger Gilchrist on 7/1

(Screen Shot)

Y! Module
By NightCrawler on 7/1


Files Comperator (the right way)
By Jarry Claessen on 6/30


Simple UDP example
By Mick Walton on 6/30


CAPS Trigger
By Trevor Burley on 6/30


Auto clip picture
By Kenneth. Jakobsen on 6/30


Click here to see a screenshot of this code!Game of life clone (cool math)
By Johannes B on 6/30

(Screen Shot)

String to CHR()
By Nikhil Raj on 6/30


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

SECURE encryption algorithms

Print
Email
 
winzip icon
Submitted on: 10/12/2000 11:59:39 AM
By: Fredrik Qvarfort 
Level: Intermediate
User Rating: By 54 Users
Compatibility:VB 4.0 (32-bit), VB 5.0, VB 6.0

Users have accessed this code 23624 times.
 
(About the author)
 
     This is a collection of SECURE encryption algorithms (BLOWFISH, TWOFISH, SKIPJACK, TEA, GOST, RC4 and DES). This post contains highly optimized code, if a similar post already exist here on PSC this one is at least a couple of 1000x faster!! This is not like everybody else's "unbreakable" code, these are standardized encryption algorithms where the only possible way to crack it is by brute-force. DES is probably the least secure one (it took 22 hours for a supercomputer + 100,000 computers to crack it (distributed.net)). And that's the least secure one. ;)

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzipto decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 2 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
10/12/2000 12:05:19 PM:Fredrik Qvarfort
I forgot a nice feature: The encryption 
routine adds a block of random data at 
the start of the text, and then CBC 
(Cipher-Block Chaining) is used to make 
the
1) Encryption stronger
2) The 
encrypted data will look different 
every time you encrypt, even when 
encrypting the same text with the same 
key!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/13/2000 12:24:03 AM:Liu Yucheng
This is some of the best encryption I 
have seen on Planet Source Code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/13/2000 12:39:48 AM:Nick Johnson
Finally, someone has actually submitted 
some REAL encryption algorythms, not 
just ceasar cipher, etc! Don't forget 
that DES can be used to make triple 
DES, which is an industry standard and 
unbroken with long enough keys. And 
don't forget that public key encryption 
doesn't encrypt all the text - just the 
key for a private key encryption method 
like triple DES@
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/13/2000 10:12:17 AM:Fredrik Qvarfort
^Dark^: That's not a problem from my 
side (I promise ;)), Windoze will 
remove characters after any Chr$(0) 
character (and reformats a couple of 
chars too) when put into the Text 
property (or pasted into a textbox, 
whatever). If you want to cut'n'paste 
encrypted text one idea would be to 
convert the encrypted data to HEX 
values (or 64-base) from the encrypted 
data directly, this way Windoze won't 
be "in the way". In the program I 
stored the encrypted data into the Tag 
property first then the Text property 
(the decrypting phase will read the Tag 
property). The data in the Tag property 
is stored as-is and not 
reformatted.
Example.. run the 
code
  Clipboard.SetText "hello" & 
Chr$(0) & "more"
and use Ctrl^V in 
Notepad, what you get? ;)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/13/2000 10:20:56 AM:Fredrik Qvarfort
3DES can easily be implemented using 
the clsDES class, you will need 2 
different keys however for this, to 
encrypt you:
 1) Encrypt the text 
with 1st key
 2) Decrypt with second 
key
 3) Encrypt with 1st key 
again
To decrypt the data you do the 
opposite:
 1) Decrypt with 1st key
2) Encrypt with 2nd key
 3) Decrypt 
with 1st key
You can also use a 3rd 
key to replace step 3, but that's 
optional.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/13/2000 10:41:15 AM:Fredrik Qvarfort
Oops, that should be..
"You can also 
use a 3rd key to replace step 3 on 
ecryption and step 1 on decryption"
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/25/2000 1:40:51 AM:Slurp
Well done this is excellent code. I've 
only just starting learning algorithms 
and am only at the 
bubblesort/quicksort/binpacking level. 
These little algorithms are much more 
juicy! VERY good stuff. Many Thanks.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/8/2000 12:14:02 PM:DoomRater@hotmail.com
I wrote a encryption code that does 
simple 8-bit encryption.  What degree 
of encryption does this use?  I added 
the ascii number of a letter in the 
password to the ascii number of the 
text, plus the checksum (lowest 8 
bits), take the lowest 8 bits, then 
turn the number back into a character.  
I have it able to encrypt ANY size 
file. I'll publish it here.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/8/2000 12:50:53 PM:Danny Young
I salute you 100%
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/15/2000 2:43:56 AM:Bones
Viper, Can you perhaps lead the way in 
how it should be done?????????
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/17/2000 10:15:22 PM:ophoria
hi...yum...but I experience a bug 
(error 9 i think) when trying to 
decrypt something with blowfish...it 
doesn't even work with the 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/17/2000 10:17:01 PM:sophii
Hi..hmm...the blowfish decryption 
doesn't work...generates error 9(i 
think)....it doesn't workl with the 
"test key" either....mail me 
please....would like to correct that.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/18/2000 11:10:34 AM:Viper
bones m8, i hav already made an 
encryption program (with 14 industrial 
strength ciphers) but it's in 
delphi!!
(and much much better than 
this 1, lol)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/23/2000 11:40:35 PM:VBNerd
Cool man! Nice code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/24/2000 11:45:44 AM:Snake
2 Viper. It's true. DES and 3DES can be 
broken. But for the most of us are this 
algorithms really interesting 
becausethere aren't many people who can 
broke it in suck a short time that the 
information is still interesting.
CU 
snake
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/29/2000 12:35:57 PM:Anonymous
*shows head shamefully* hewwo... 
well... it seems 2 me after reading all 
the wee comments by viper.. (yay snake 
:D), that a quotation from Applied 
Cryptography is in order... "this isn't 
a book on number theory" *takes a bow* 
thankyou... thankyou... 
But 
seriously - I believe it says somewhere 
in AC that (viper - 14!? which ones?) 
the strength of an algorithm is not 
just how long it takes 2 crack - but 
whether or not it can be cracked in a 
phesable (i issnt 2 good @ the 
spellink) time by the people who the 
secrets involved will interest - in 
english... the NSA aren't going to use 
their DES crackers (i dint say that;-)) 
cracking a games high scores! ... 
also... it wasn't in the applications 
section... this code is just a demo of 
how 2 use it.. so stop showing off pls 
:-)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/4/2000 4:36:26 AM:Jeremy
Viper, you are full of BS. *Every* 
encryption method can be decrypted, 
given enough time and resources. Point 
is that nobody wants to spend that time 
and effort in decrypting your pathetic 
comments, not even if they were only 
rot13. IOW: for your personal (private) 
communication, *any* of the methods 
showed here would be good 
enough.
You're only proving that 
*you* are the one not knowing anything 
about encryption. Rule number 1: Never 
spend much more time and effort 
encrypting something than anyone would 
want to spend decrypting 
it.
Fredrik: Good code! Compliments.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/7/2000 11:10:04 AM:Viper
dear every1
I am by no means trying to 
dis Mr.Qvarfort's work I am mearly 
pointing out that some of his comments 
are misleading and incorrect and that 
this programs is insecure. Not because 
of the algorithms (although they are by 
no means the best avalable) but because 
of the weakness of the program itself. 
I apologise profusely to anyone who has 
taken any offense to these truths.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/13/2000 9:02:26 AM:Roger
How would the code look like without 
using the CBC routine?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/2/2001 3:47:56 PM:Doug Gaede
To anyone interested in using the 
built-in CryptoAPI that comes with 
Windows (which is preferable over 
straight VB code for business apps for 
many reaons), check out my posting on 
using the CryptoAPI.  I began with 
Fredrik's CryptoAPI module and added 
SALT functionality, public/private key 
encryption, and signing.  I threw in 
compression since you usually use one 
with the other.  
http://www.planetsourcecode.com/xq/ASP/t
xtCodeId.13517/lngWId.1/qx/vb/scripts/Sh
owCode.htm  
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/16/2001 6:23:21 PM:Fairytale
Excuse me if I got something wrong. But 
I always thought that an encrypted text 
may only be decrypted with the same key 
as used when encrypting. Right?
I've 
compiled your code and tried the 
following: Encrypting a textfile with 
twofish (Key: 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/27/2001 6:54:50 PM:Simon
DES is breakable, but the original 
programmer had already stated it had 
been broken.. Secondly, DES is not 
several decades old, it was first 
published in 1977. 3-DES is unbreakable 
in an acceptable amount of time with 
current hardware and current 
cryptanalytic techniques. The least 
secure algorithm he has is 
simple-XOR.
Differential 
cryptanalysis looks at the way 
differences between plain-text pairs 
and cipher-text pairs and how they 
evolve through out the structure of a 
cipher. Whether the plain-text is 
compressed or not makes no difference 
to this attack. Using differential 
cryptanalysis requires around 2^55 
known plain-texts.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/27/2001 6:57:09 PM:Simon
Compression effects simpler algorithm, 
like XOR because the redundancy of the 
compressed text is reduced, making a 
solution harder, but achievable with 
known plain-text.
Blowfish and 
Twofish are good ciphers. TEA is 
insecure, GHOST is probably okay. RC4 
is a good stream cipher, biases become 
detectable after a few gigabytes of 
cipher-text. Skipjack is designed by 
the NSA; if DES is anything to go by, 
its good.
If a implementation meets 
the test vectors, its valid. Which 
makes it better than homegrown. 
Homegrown is a bad idea if u want 
security.
This man has picked some 
nice ciphers. It is a collection i 
would be proud of, i congratulate him 
on his efforts. 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/8/2001 5:05:59 PM:creepy
Problem. I can encrypt text (not a 
file) with any of the algorithms, and 
if i were to copy the encrypted text, 
close the program, then restart the 
program and paste the (encrypted) text 
into the appropriate box (using the 
correct key), it gives an error. It 
works if you keep the program open, but 
that's not very useful. is there 
something that i'm doing wrong? thanks
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/17/2001 7:00:06 PM:Fredrik Qvarfort
As a response to creepy's problem.. As 
the project code was only designed to 
show how to operate on the class file I 
didn't think this "feature" was needed. 
But now I added two new functions in 
the program to convert the encrypted 
text into HEX values before printed 
into the textbox. This allows you to 
cut'n'paste the encrypted text back and 
forth. No change made though to the 
actual code (class file).
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/18/2001 1:27:51 PM:Dirk Mueller
Hi! I'm trying to implement the UNIX 
crypt function in order to be able to 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/18/2001 1:29:17 PM:Dirk Mueller
Hi! I'm trying to implement the UNIX 
crypt function in order to be able to 
"generate" a .htpasswd file for a UNIX 
machine. Obviously this is done by a 56 
bit DES encryption. Is this possible 
using your code? Any ideas welcome! 
Thanx. 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/19/2001 9:29:08 AM:pragsol
This is a terrific functional example 
of encryption alternatives.  It suited 
my purposes perfectly.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/13/2001 1:03:13 PM:Rudy Alex Kohn
This code is (like i see it) high-end 
vb code. And i use it with delight. 
Now, when reading some of the comments, 
i can't stop windering if you guys 
(read = viper) are so hard-core and 
thinks you'r the greatest, then why 
bother with vb code? ;-).. thanks 
Fredrik, for posting this cool piece of 
work..
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/14/2001 11:41:43 AM:Jim Edwards
mrjim@ieee.org
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/14/2001 11:47:17 AM:mrjim
I have examined both Blowfish and 
Twofish and found Password problems as 
follows: Encrypt with 1234 password, 
save to disk and close program. Open 
program, get encrypted code from disk 
and decrypt with the following 
passwords:
1334, 1567, 1245, 1235, 
etc...
This was all that I tested. 
Why?  What is going on??
I do not 
know enough about code to try and find 
the problem.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/19/2001 3:58:55 AM:Xafion
Hello.
I have decided to use these 
encryption rutines in my applications, 
since they is the best I have ever 
seen.
The problem is, when I try to 
massive encrypt/decrypt all DES, 
Blowfish, Twofish and others come up 
with "9 @ Subscript out of 
range".
This happens both in 
Decrypt/EncryptByte and in GetWord / 
PutWord.
Now I must say that I know 
nothing about cryptography, which makes 
me not able to troubleshoot this little 
neat piece of code.
And I was 
wondering if any of you would want to 
help me?
My e-mail is 
mfh@firenet.dk
and my ICQ is 83297796 
(83 29 77 
96)
Example:
Randomize
Dim i As 
Integer
For i = 0 To 1000
Text1(0) = 
Rnd(1 * 100) + 5
Text1(1) = 
EncryptObject.EncryptString(Text1(0), 
Text1(0))
Text1(2) = 
EncryptObject.DecryptString(Text1(1), 
Text1(0))
Me.Caption = 
i
DoEvents
Next i
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/19/2001 12:48:48 PM:Xafion
Just read creepys submission. Seems 
like that's my problem ; but I don't 
know yet. I'm trying it out.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/19/2001 1:05:53 PM:Xafion
I don't know how to import the Bin2Byte 
/ Opposite, and where.
What's 
ByteLen and what should I put there?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/8/2001 2:42:23 AM:Opie Taylor
For the subscript out of range errors, 
perhaps use RTF Box instead of TextBox, 
as Textbox only allows a certain amount 
of text (this is if you're decrypting 
strings). Also, I haven't really 
checked, but if the prog uses integers, 
you may need to change some of them to 
Long or another format, if they're 
receiving values too high. Just 
suggestions, but maybe look into it. 
i'll check it out more tomorrow, but 
right now I'm heading to bed. Too much 
programming...........
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/8/2001 8:40:30 AM:Fredrik Qvarfort
If you store the encrypted data 
directly into a textbox you *will* get 
errors for sure. This is because 
Windows will convert any unreadable 
characters (Chr$(8) and some others) to 
something it can handle. And when you 
try to decrypt incorrect data (remember 
some characters are changed) you *will* 
get subscript out of range or some 
other error.
One way of dealing with 
this (if you really need to store into 
textboxes) is to download the new 
version of the zip file which contans a 
modHEX.bas file which basically 
converts a text string into a 
hexadecimal value (with only 0-9, A-F 
characters). The new code would look 
something like
For i = 0 To 
1000
Text1(0) = Rnd(1 * 100) + 
5
Text1(1) = 
StrToHex(EncryptObject.EncryptString(Tex
t1(0), Text1(0)))
Text1(2) = 
EncryptObject.DecryptString(HexToStr(Tex
t1(1)), Text1(0))
Next
Be aware 
though that converting a string into 
its HEX value will make the string 2x 
the size.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/4/2001 2:14:01 PM:Simon Ingram
Nice Coding, I am impressed by your 
programing skills, Please keep up the 
good work.
BTW, IDEA is considerd to 
be the mose secure Cyphering Available 
to the public. I am working on a 
program that combindes both IDEA, and 
the Square Algorhythem together, givin, 
various attack resistan attempts. 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/16/2001 5:39:42 AM:lalita
nice coding.
the only thing i wanted 
to know is if the user doesn't provide 
a key ,
then how have u generated the 
key to encrypt the data
AND one more 
thing is that can i get some sample 
code if available just like this for 
public key encryption?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/26/2001 10:23:42 PM:Yves
I liked a lot this code. I wonder if 
someday someone will show us how to do 
3DES. Someone wrote that we can call 3 
times DES with different KEY but i 
don't think that is how 3DES is working.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/2/2001 12:24:17 PM:Dave
Fredrik, good code but it would be good 
to see more modern encryption. Could 
you post some code with encryption such 
as Serpent or MARS as I would find this 
very helpfull.
Or could you at least 
point me in the right direction as I 
have searched many sites but found 
nothing. 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/8/2001 2:28:55 PM:Kiwi
Very good code example. Great to see 
people giving freely like this.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/8/2001 11:47:11 PM:Ed
Very nice to see someone willing to 
share code like this around... thank 
you...
One question though... it 
seems that the DES algorithm does not 
use an Initialization vector... Could 
someone kindly point me to how to add 
that into the algorithm. Thanks.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/9/2001 9:48:23 PM:Carl Mercier
Amen!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/14/2001 9:11:35 AM:Nausea
I know it's a bit after the fact, but I 
think this is one of the best posts on 
PSC. I've used it in hundreds of 
applications. Thanks for posting this 
excellent code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/11/2001 3:16:24 AM:Anto
how to make 3DES from this DES class 
file.. coz i have problem about 
"Incorrect size descriptor in DES 
decryption" .. please help me
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/22/2002 10:14:41 AM:Mondor
Well well well, seems I am going to 
make the first comment in this 2002 
year! :)
I will underline the 
perfectness of this code, its style, 
and that fact that Frederik Qvarfort is 
a great coder after all.
One point for 
all people here: if you can, if you 
understand and if you arent lazy, use 
this code not only as a part of your 
application, but also as a basis for a 
future inventions and solutions - fix 
it, add into it, post result here and 
look at reaction of other "progressive 
humanity", the efforts are worth trying.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/3/2002 2:14:05 PM:JTC
Thanks for making this code available 
to us all. How easy would it be to 
store the original filename and 
encryption algorithm used in the 
resulting file, so that decrypting only 
requires input of the correct key. 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
6/20/2002 6:56:05 AM:BB
When using the DES code to perform 
triple-des I get the 'Incorrect Size 
descriptor ...' error.  Can anyone help 
please.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/21/2002 3:08:52 AM:MK Bernard
How long did this take to do?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/31/2002 5:42:48 PM:Fithranda
Thanx 4 letting this apps 
shareable.....
I use thing as my 
reference 4 my final report as a 
collegge stu. It's neat...but the KEY 
(text1(3).text)doesn't work at all....D 
program works eventhought we did put 
any key words.
I believe it's on the 
class module....right on the Private 
Property LetKey..... tried 2 debug 
it.... but failed
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/22/2002 12:37:46 AM:jamsmith
Wante strong encryption? Rijndael!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/21/2002 4:01:22 AM:Plasma
Great code Fredrik, thanks a ton!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/10/2002 9:58:34 AM:Sebastian Mares
Tripple DES is called Tripple DES 
because it has 48 rounds, instead of 16.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/16/2002 8:41:03 PM:
Dave, why do you ask for more "modern" 
algos like "Serpent or MARS?"  Twofish 
was developed at the same time as 
serpent and mars, and was a competitor 
for the AES standard.  Twofish was 
judged to be more secure than Rijndael 
(the current AES standard), but is 
slightly slower.  It is far superior to 
both mars and serpent.  Serpent is very 
secure, but super slow.  The best two 
algos are Twofish and Rijndael (AES).  
Either one would take billions of years 
for the fastest super computer now 
available to break.  Twofish has no 
weaknesses after 4 rounds!  I don't 
know how good this vb implementation is 
(it's probably way slow, as most 
professionals use assembler routines 
for encryption), but one cannot ask for 
a better algo than twofish.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/10/2002 1:32:13 PM:mindopening
Yes I agree those are the most secure 
for the speed.  The others would also 
be interesting to have but not 
neccisary.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/22/2003 12:47:43 PM:David Trep

This looks very nice, but can anyone 
tell me why, using blowfish (and the 
others), when I encrypt text multiple 
times, I get a different encrypted 
value.  Shouldn't it always encrypt the 
same way?
I'm trying to find some 
encryption routines in VB that will 
encrypt the same way with the Blowfish 
routines I have in Java.  Not having 
much luck though.
Thanks,
David
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.