Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Communications > How to create a "secure" protocol


Reply
 
Thread Tools Display Modes
  #1  
Old 12-16-2002, 04:37 PM
excaliber's Avatar
excaliber excaliber is offline
Senior Contributor

* Expert *
 
Join Date: Nov 2002
Location: Ohio, USA
Posts: 1,828
Cool How to create a "secure" protocol


I'm creating an app that will deal with sensitive information over winsock. How can i create a "secure" protocol. My current protocol is failry simple. A handshake, (used to give IP's, version number, etc.) then onto main communication.

Should i encrypt all the data before sending, then decrypt it? All that is being sent is text. Is there anything else that could help create a powerful protocol that ensures security? Rotating the key for the password depending on day? Once the connection is established, create a temp key for only the client and server connection, then trash it once they close?

Thanks for any help!
__________________
RandomIRC - Your neighborhood's friendly IRC channel (irc.randomirc.com - #code)

"Perl - The only language that looks the same before and after RSA encryption."
Reply With Quote
  #2  
Old 12-16-2002, 05:58 PM
ChiefRedBull's Avatar
ChiefRedBull ChiefRedBull is offline
ISearchGoogle

Retired Moderator
* Expert *
 
Join Date: May 2001
Location: england
Posts: 6,321
Default

"Secure" is a very vague word, and yet very complex. The level
of security you want is probably a good guide to what you should
do - if you want protection from the governments of the world,
I'd go for a 16 round implementation of IDEA, or maybe DES (bear
in mind that the NSA probably has DES crackers purpose built...).

If, on the other hand, you're just looking to protect agains the
casual eavesdropper, then any other algorithm - Blowfish,
Twofish, RC4, etc..etc.. would be suitable. Heck, you could even
create your own.

Of course, the problem with peer to peer secure protocols is that
there has to be some form of plaintext encryption to start
with in order to setup the encryption. There are lots of key
exchange protocols out there, search for "Diffie-Hellman" to get
start (sp?). Here's what I do:

Client connects to the server
Server sends an initialisation vector (random seed)
Client hashes the password using the IV
Client sends the hash to the server
Server does the same action - if they match, user is ok.
All further communications are encrypted with the original
password.
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
Reply With Quote
  #3  
Old 12-16-2002, 07:09 PM
excaliber's Avatar
excaliber excaliber is offline
Senior Contributor

* Expert *
 
Join Date: Nov 2002
Location: Ohio, USA
Posts: 1,828
Default

Quote:
Server sends an initialisation vector (random seed)
Client hashes the password using the IV
Client sends the hash to the server
Server does the same action - if they match, user is ok.
You lost me here. I searched for the Diffie-Hellman, and got completely confused trying to figure it out. Could you explain it in slightly simpler terms?

Whats the intialisation vector?

I believe i know what hashing is...you run a password through a one way math function of some sort to create a garbled hashed password, which is irrecoverable. To check the password, you run the one in question back through and see if they match.
__________________
RandomIRC - Your neighborhood's friendly IRC channel (irc.randomirc.com - #code)

"Perl - The only language that looks the same before and after RSA encryption."
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->