Thread View: alt.msdos.programmer
5 messages
5 total messages
Started by Brian R. Sandberg
Fri, 04 Sep 1992 17:40
MS-BASIC file security possible?
Author: Brian R. Sandberg
Date: Fri, 04 Sep 1992 17:40
Date: Fri, 04 Sep 1992 17:40
7 lines
575 bytes
575 bytes
I am writing an application in MS-BASIC V7.1 which uses random access data files. Here's the problem: these files contain confidential information. Is there a way to keep people from reading (accessing) these files? -- Brian Sandberg sandberg@carroll1.cc.edu
Re: MS-BASIC file security possible?
Author: Miles Kehoe
Date: Fri, 04 Sep 1992 22:43
Date: Fri, 04 Sep 1992 22:43
22 lines
1187 bytes
1187 bytes
sandberg@carroll1.cc.edu (Brian R. Sandberg) writes: >I am writing an application in MS-BASIC V7.1 which uses random access data >files. Here's the problem: these files contain confidential information. >Is there a way to keep people from reading (accessing) these files? >-- >Brian Sandberg >sandberg@carroll1.cc.edu Brian: I don't think the fact that the files are random access and from BASIC is an important issue - any file that any program saves can be hacked. The best you can do it somehow encrypt the data in the buffers before you write (PUT) it. It can be as simple (subtract 20 from the ascii value) or as complex (run a dod encryption scheme on the entire buffer), but it is up to your code to do. Good luck! Miles
Re: MS-BASIC file security possible?
Author: Bryan D. Nehl
Date: Sun, 06 Sep 1992 01:34
Date: Sun, 06 Sep 1992 01:34
22 lines
1713 bytes
1713 bytes
In <3302@carroll1.cc.edu> sandberg@carroll1.cc.edu (Brian R. Sandberg) writes: >I am writing an application in MS-BASIC V7.1 which uses random access data >files. Here's the problem: these files contain confidential information. >Is there a way to keep people from reading (accessing) these files? Someone else mentioned encrypting the data before saving it out to disk. This is a pretty good idea. Another thing that you might want to do that is fairly easy is to put at the beginning of the file ascii text like the following: Only Authorized Personnel may access this data file.^Z the ^Z would be a ctrl-Z. You could write a similar string in the header of your file in binary. This way if someone tried to simply TYPE out the file then all they get is your message. DOS will see the ^Z and stop. You might want to throw in a few or a LOT of ^G's depending on what your size constraints are and how annoying you want to be. Bryan. /* === Bryan Nehl ========== kodiak@Kodiakpc.Manhattan.KS.US =========+ [ USDA-ARS-NPA-WERU ][ bdn@chepil.weru.ksu.edu ] [ 913.532.6233 or 913.532.6495 ][ kodiak@matt.ksu.ksu.edu ] +_______________ ...!rutgers!matt.ksu.ksu.edu!kodiak _______________ */
Re: MS-BASIC file security possible?
Author: Paul Penrod
Date: Wed, 09 Sep 1992 07:10
Date: Wed, 09 Sep 1992 07:10
40 lines
2619 bytes
2619 bytes
In article <18bn7qINNnet@matt.ksu.ksu.edu> kodiak@matt.ksu.ksu.edu (Bryan D. Nehl) writes:
>In <3302@carroll1.cc.edu> sandberg@carroll1.cc.edu (Brian R. Sandberg) writes:
>>I am writing an application in MS-BASIC V7.1 which uses random access data
>>files. Here's the problem: these files contain confidential information.
>>Is there a way to keep people from reading (accessing) these files?
>
>Someone else mentioned encrypting the data before saving it out to
>disk. This is a pretty good idea. Another thing that you might want
>to do that is fairly easy is to put at the beginning of the file ascii
>text like the following: Only Authorized Personnel may access this
>data file.^Z the ^Z would be a ctrl-Z. You could write a similar
>string in the header of your file in binary. This way if someone
>tried to simply TYPE out the file then all they get is your message.
>DOS will see the ^Z and stop. You might want to throw in a few or a
>LOT of ^G's depending on what your size constraints are and how
>annoying you want to be.
>
>Bryan.
>
>/* === Bryan Nehl ========== kodiak@Kodiakpc.Manhattan.KS.US =========+
>[ USDA-ARS-NPA-WERU ][ bdn@chepil.weru.ksu.edu ]
>[ 913.532.6233 or 913.532.6495 ][ kodiak@matt.ksu.ksu.edu ]
>+_______________ ...!rutgers!matt.ksu.ksu.edu!kodiak _______________ */
One other suggestion that would be a little easier to work with is
to use a simple encryption scheme like ANDing or ORing with a
rotating bit pattern and storing your data in this format. This way
you prevent easy access to your data from someone who can
disassemble your work or even snapshot it in memory, since you
decrypt on the fly. Yes, a smart cookie can figure it out in a
matter of time, but it sounds like you want to keep honest people
honest, and this method will keep the overly curious at bay.
Paul
--
--------------------------------------------------------------------
Bureaucracy: noun, plural - Bureaucracies.
The process of turning energy into solid waste.
---------------------------------------------------------------------
Re: MS-BASIC file security possible?
Author: Jerry Greenwood
Date: Sun, 13 Sep 1992 14:51
Date: Sun, 13 Sep 1992 14:51
23 lines
1567 bytes
1567 bytes
....or you might try a simple scheme that I used for password encryption. Again, it's not the most secure but it will keep non programers out of your business. Generate a random number that will be used to add the the ASCII code of each individual letter. The random number should be such that it kicks each letter into the upper (non letter) range. This random number can be store at the begining of the file and is used as the decode key for the rest of the file. This way if you encode the same word or group of words twice.....each copy if different. I don't have a copy of the codes with me as I write but it makes you encoded file look like garbage and can be done with only a few lines of code. My examples are off my machine at present but I'd be glad to post an example if you like. -- Submitted for your approval..... Jerry Greenwood N9NRG grnwood@gagme.chi.il.us 312-545-2219 --
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads