?
Solved

Basic encryption and data transmission

Posted on 2004-04-08
6
Medium Priority
?
283 Views
Last Modified: 2013-11-13
I have to write an application in VB6 to implement some basic encryption algorithm and subsequently transmit this ciphertext across a LAN to another terminal where it will be decrypted. This algorithm will be devised by me and doesnt have to be hacker proof just make the data pretty unreadable. Since the data is not neccesarily ASCII (ie could be images etc.) I was thinking that the best course of action would be to do some data manipulation (such as  simple XOR) on the binary data of the file.

My overall question is would the MSCOMM control be the best thing to use the get the PC's to communicate? I will simply be setting up 2 PC's in a lab, connected by a crossover cable in order to demonstrate my program.

How do I go about opening a file in binary format, to do the encryption on it?

Im a bit of a newbie so any suggestions at all would be greatly appreciated. Thanks for your time. Steve
0
Comment
Question by:steveybop
[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
6 Comments
 
LVL 5

Expert Comment

by:phyderous
ID: 10783378
I would use the following senarion,

please let me know if you need any help,

encrypt the data use CAPICOM from microsoft,

it is a com implemntaion of encrypt alogarithms like des,3des and so on,

then I would use WINSOCK you can use the com version by adding MSWINSCK.OCX
the documentaion is avilable under "Winsock Control" in the msdn

then simply use the send command,

now about open a file in binaty format

just use the open statment of vb

dim a() as byte
open "c.dat" for binary access read as #1
get #1,,a
close #1

a will be an array of the file bytes,

how ever you may want to consider reading chunk of filesif the file is to big for example

dim a() as byte

open "c.dat" for binary access read as #1

do while not eof(1)
erase a
redim a(1024) as byte
get #1,,a

x.send encrypt(a)

loop


this is a psedo code,

there sould be no problem implement it





0
 
LVL 12

Accepted Solution

by:
venkateshwarr earned 500 total points
ID: 10783385
There are several algorithms that are already implemented.
Take a look at these sites.

http://www.echeque.com/Kong/tools.htm
http://www.emu8086.com/vb/enigma.html
http://www.codearchive.com/list.php?go=0206
0
 
LVL 14

Assisted Solution

by:Matti
Matti earned 500 total points
ID: 10783413
MSCOMM don't have use in this. it's for serial ports and cables only.

Try Winsock control and ofcause need TCP/IP protocoll

Apply this sample:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=36217&lngWId=1

Or just simple a shared folder where to put crypted files and filecopy over network and let OS do all protocol's and such.

Matti
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

762 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