-1

I'm not sure if this is possible but here goes.

I have a proprietary file (.kct extension) for use on a program I created. It has sensitive information in it but unfortunately, a user on the other end can open this file with notepad and read the contents of it.

Sending this file with the program is required but is there any way to stop a user on another from seeing the contents of this file or opening the file? Whether with notepad or a hex editor, the contents can be read.

I tried changing the security ownership but then I can't open it myself. Was hoping for a way to lock it so any other user on any other pc can't open and read the contents.

Anyone know if this is possible?

Thanks

10
  • quick question, have you tried obfusticating the code, or encrypting it so only your app can read it?
    – td512
    May 12, 2015 at 11:47
  • 1
    I doubt it - this is why/how piracy exists... I would suggest you change the file contents, may be have it encrypted which your program can decrypt.
    – Dave
    May 12, 2015 at 11:47
  • I know, I've written many apps myself, but even if it's cracked, at least it will slow the user down
    – td512
    May 12, 2015 at 11:49
  • 1
    @AFH - That only works on the author's system. What about another person's system, one they have access to root, which means they can change the permission on any file on their system.
    – Ramhound
    May 12, 2015 at 12:27
  • 2
    @AFH - You don't seem to understand what the author is asking. He wants to control access to a file after he send it to somebody. The very nature of that act means file permissions won't work and is NOT an option.
    – Ramhound
    May 12, 2015 at 12:44

2 Answers 2

1

Sending this file with the program is required but is there any way to stop a user on another from seeing the contents of this file or opening the file?

You would need to encrypt this file. You cannot use file permissions for obvious reasons, you have no control over their system, and any permissions you setup would only be valid on your system anyways.

An alternative solution is not to use a text file to store sensitive information. One simply way would be modify the data stream slightly. You could in theory perform several bit operations on various parts of the data, then when your program reads it, perform the operations to reverse them.

Another solution would be to compress the data and uncompress the data.

These solutions are only being offered since your intial ideas on how to protect the files are simply not possible.

0

The obvious answer here is to encrypt the file from the very start so only your program can open it. You've not mentioned what language you've written the program in so its hard to suggest a good Library.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .