Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Encrypting a Text File

Posted on 2015-02-02
4
Medium Priority
?
240 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 1500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

One-stop solution for Exchange Administrators to address all MS Exchange Server issues, which is known by the name of Stellar Exchange Toolkit.
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.
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…

972 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