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
Solved

Encrypting a Text File

Posted on 2015-02-02
4
206 Views
Last Modified: 2015-02-07
I have a .NET program which uses a text file from which some information is read and inserted into the application during its use.  Over time, it has turned out that the information in the text file has become valuable, sensitive and confidential.  I would want to encrypt that text file, and some how have it loaded into RAM after the application decrypts it when called upon.

Could someone please provide some guidance on how this could be done, and maybe some steps that would need to be taken to accomplish the application restructuring.

Thanks.
0
Comment
Question by:DigitalCro
  • 2
4 Comments
 
LVL 5

Expert Comment

by:R. Toby Richards
ID: 40584778
Keep in mind that reading what's in RAM isn't very difficult. Even an intermediate level baddy could easily figure that out. Please give us more information about what's in the text file, and how the application uses it.
0
 

Author Comment

by:DigitalCro
ID: 40584785
The text file contains proprietary numbers, codes and fees.

Then a second part to that question would/could be .... how could it be encrypted and secured properly?

Thank you.
0
 
LVL 5

Accepted Solution

by:
R. Toby Richards earned 500 total points
ID: 40584818
I really for the life of me cannot imagine how you would use a value in a program without having it be unencrypted somewhere in RAM. One approach to at least make it more difficult to find would be to do some math to the numbers, and then have the program undo the math when the number needs to be used. Here's a simple example. What you do should be more complex: In the text file, store what the number is squared. Then the program reads the number, and does a square root before using it. Then be sure to set the variable to null as soon as it's no longer in use. Better still: Never store the number in a variable. Only use it as you need it.

Alternatively, if you have the programming expertise (I don't), encrypt each number separately. That way, you don't have to have the whole decrypted file in RAM. The program would decrypt each number as needed. Still remember to set the variable to null as soon as it's no longer in use.
0
 
LVL 5

Expert Comment

by:Sean Jackson
ID: 40584838
I've never had to have an application decrypt a file, but I know it's possible.  

I would use PGP to create the keys, and then use it to encrypt the file. Put the key into the application and have it decrypt it and use the data.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Abstract Express Replacement Software 12 38
How to Convert a Quote to an Order in SalesForce 2 74
Password Management 4 38
How to safely test out TFTP server software 12 92
Let’s list some of the technologies that enable smooth teleworking. 
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

792 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