home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mcsun!Germany.EU.net!ira.uka.de!slsvaat!us-es.sel.de!kanze
- From: kanze@us-es.sel.de (James Kanze)
- Subject: Re: ENCRYPTION OF DATA FILE ACCESSED BY MY C++ PROGRAM
- Message-ID: <1992Aug28.141631.12027@us-es.sel.de>
- Sender: news@us-es.sel.de
- Organization: SEL-Alcatel LTS Dept. US/ES
- References: <1992Aug23.165130.15650@eagle.lerc.nasa.gov> <1992Aug27.184155.2111@us-es.sel.de>
- Date: Fri, 28 Aug 92 14:16:31 GMT
- Lines: 45
-
- In article <1992Aug23.165130.15650@eagle.lerc.nasa.gov>, tostan@bert.lerc.nasa.gov (Stan Mohler) writes:
- |>
- |> Hello Turbo C++ programmers. I'm just learning C/C++, teaching myself on my
- |> PC with Turbo C++. I want to write a program that reads a big data file,
- |> which I plan to create, and uses the info. The data file will be very large,
- |> and will be contained on the disk with the program.
- |>
- |> But: when I sell this program, I don't want the buyer to be able to access
- |> the accompanying data file's information EXCEPT through MY PROGRAM.
- |>
- |> It will take alot of effort to create this file.
- |> I want some way of encrypting it so that my C++ program can read it, decrypt
- |> the sentences in there, and display them in plain English. Any ideas on
- |> how to do this? I though of making up my own "ascii codes", and storing the
- |> characters as binary numbers decipherable by my own inveted table. But I
- |> think that might be too easy to decrypt. Any thoughts? Thanks. Note: I
- |> would also like to store images in some manner that no other program will be
- |> able to recreate the images but mine. Any thoughts on that, too?
- |>
- |> NOTE: OBVIOUSLY it will be possible for SOMEONE to decrypt the file. Please
- |> don't waste my time telling me not the bother! My objective is the MINIMIZE
- |> the ease of decryption, not make it impossible.
-
- Well, just compressing it will already do more encryption than a simple Ceasar
- code (which you suggest). There are a couple of public domain encryption programs
- around; if you use one, of course, you'll want to modify it in some personal fashion.
- If not, anyone else with the same program will be able to read your files.
-
- This also has the advantage of reducing the size of the file. On the other hand,
- it doesn't allow random access, but then none of the good encryption schemes I
- know of do either. It can also be a bit slow.
-
- If this doesn't seem sufficient, x-oring the compressed output with (pseudo-)random
- sequence of numbers should make things more difficult. For that matter, since the
- input is now apparently rather random, a Ceasar code might be sufficient.
-
- Of course, anyone who really wants to can back-engineer your program to find out how
- you do it. But that is a lot of work, especially if you use a lot of virtual
- functions (which make the control flow in the disassembled program particularly
- difficult to follow).
- --
- James Kanze GABI Software, Sarl.
- email: kanze@us-es.sel.de 8 rue du Faisan
- 67000 Strasbourg
- France
-