Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to encrypt a file?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ressia
n00b
n00b


Joined: 28 Aug 2018
Posts: 4

PostPosted: Wed Aug 29, 2018 2:00 am    Post subject: How to encrypt a file? Reply with quote

Good day! I am Ressia. I am new to this forum. I just want to ask if do you have any knowledge on how to encrypt a file so that it wouldn't be copied? Is there a way how to do it?
Back to top
View user's profile Send private message
PhoenixStarEclipse
n00b
n00b


Joined: 11 May 2017
Posts: 64
Location: Jiangsu/China

PostPosted: Wed Aug 29, 2018 2:12 am    Post subject: Reply with quote

Use zip.
_________________
Think twice,code once.
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 9177

PostPosted: Wed Aug 29, 2018 3:47 am    Post subject: Reply with quote

ressia wrote:
Good day! I am Ressia. I am new to this forum. I just want to ask if do you have any knowledge on how to encrypt a file so that it wouldn't be copied? Is there a way how to do it?
That is not what encryption does. You can copy encrypted files without limitation; the encryption just renders the contents, effectively, unreadable, without the decryption key(s), despite being freely copyable. You could use a device which does not allow files stored on it to be read from it directly, at least via interfaces which it provides, but those are typically used for encryption keys, as opposed to general file storage given the inability to read the file(s) stored therein.

This leaves the question of what your actual use case is: what are you trying to secure, and what are you trying to secure it from?

Also, gpg (app-crypt/gnupg) or a frontend for it would be the more or less canonical recommendation for introductory file encryption software.

Moved from Documentation, Tips & Tricks to Networking & Security.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Thu Aug 30, 2018 10:33 pm    Post subject: Reply with quote

Quote:
I just want to ask if do you have any knowledge on how to encrypt a file so that it wouldn't be copied?
In "classic" (e.g. not quantum) computing, every single use of any data creates a copy.
Copy from disk to RAM, from RAM to CPU registers, copy over the internet to display in user's browser, copy into GPU buffer to display on screen.... Every single action you can take.

You technically could embed your file in hardware. This is actually implemented for public key cryptography with SmartCard. A SmartCard has some memory (with private key) and its own CPU used for encrypting small chunks of data (e.g. hashes for signing or symmetric keys used for data encryption ), so all the copies are contained in a package difficult to disassemble without destroying the data stored inside card's memory.
Obviously, you can't do that with any significant amount of data - cards are small and slow - or with any data you want to use directly.


Now, what is your particular use case?
If you want to create some web service that allows users to browse your data online but without storing it on disk (your initial message sounds like something along those lines), it's not gonna work because #1 described above. Your user already has a usable copy. You can refuse to provide an interface with a big, shiny "save" button, but you can't stop him from using an "alternative" approach like e.x. copying browser's temporary files to another location.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum