I want to share my 500 GB hard drive with a friend but I want to encrypt it in a way that all data can be read normally but cannot be copied or edited in any way.
Is that possible?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
If you can read it, you can copy it. A concept the RIAA or MPAA have yet to grasp.
Note: This answer is not considered a good answer according to Stack Exchange guidelines. However, it is retained due to its popularity and effectiveness in the context of the question.
A "copy" is defined as reading data and then writing the same data to another location. Since he's read your data into his computer, the data will be under his control at the time. He can then do whatever he likes with it.
The one thing that may be barely possible is to protect your data against unauthorized modification. You'd need an NTFS or similar filesystem. But even in that case, he'd be able to read all data, format your disk, clear any permissions, and write all files back - possibly modified.
500 GB is just billions of numbers. Let me boil it down to a simple example:
5. That's one number. You can read it, and nothing I can do will prevent you from writing down that number. Nor can I prevent you from writing the number
Let's try to ask a little bit, do you want him not to modify files without your notice? If so, you could checksum all files and reverify.
Another way is a hardware write blocker, you may look here: http://www.forensicswiki.org/wiki/Write_Blockers
Encryption is just math. Think about this for a bit and you will understand its capabilities and limitations better:
But you can't use math to stop people from copying a message down. That's just not something math can do. (Copying data is less 'math' and more 'physics'. :)
The closest that you can come is to use math to encrypt some data, use math to verify that a computer is only running the software that you want it to be running, and only then give the computer the magic number to decrypt the data, meanwhile making extra extra sure that software doesn't end up letting the magic number out or let anyone copy the data. This is trusted computing and is more or less what things like DVD players and video game consoles try to do. It is less than practical for most setups, and tends to end up being broken one way or another (e.g. 09 f9).
As far as I'm aware, there are ways to reduce the risk of data being altered on your hard disk, via software and hardware. However, once your friend has your hard disk, they could probably circumvent or override any write-protect methods, if they put enough effort into it. For example:
As others have said, it's impossible to prevent copying, because if it can be read, it can be copied.
You could try asking your friend not to copy or change anything. Presumably, if they're your friend, they'd be happy to comply...
Although you can't let someone read your data and simultaneously prevent copying, there's a very simple way that you can easily prevent them from editing it: don't give them the original.
If you copy your data to a separate hard drive and keep the original, clearly the recipient of the copy can't modify your original.
This defeats your "can't copy" request immediately, but that's impossible to satisfy anyway.
The no-cloning theorem is a result of quantum mechanics that forbids the creation of identical copies of an arbitrary unknown quantum state. [...] Cloning is a process whose end result is a separable state with identical factors.
As many others have pointed out, under normal circumstances "share and read normally" implies "can be copied", and the answer to your question is "no".
The only way to get to "yes" is to redefine "read normally" by changing the circumstances:
Lock your friend into a room, hand over a device on which you have entered a key, ensure the device has no I/O or network that could let copying happen, ensure your friend does not possess a camera or a photographic memory (with which to copy the display), retrieve the device and return it to a unreadable state, remove the device, then free your friend from the room. (Note, if they can examine the device in depth they may still find private or ephemeral keys, so "no I/O" means lack of physical access to the internals.)
Does that sound like "read normally" to you? If so, you're all set. I wouldn't count on making it a habit or building a business plan around the process, though.
Reading IS copying.
Any data you access on any computer is a copy of the data on the hard drive, that has been copied into the computer's RAM (memory), not the actual data on the hard drive itself. If you really want to get deep, there are more intermediate copies throughout the hard drive controller and various subsets of computer memory, but that's just interesting for the technogeeks. When you visit a website, that website's server's hard drive information is copied to your computer's hard drive, and then to its memory, so it's an extra step deeper again. And I didn't even include the server's memory, or the data packets sending across the internet, among many other copy steps.
You are asking to allow something to take place and then not allow it to. It is possible, perhaps, in an extreme case of a Draconian society where everyone obeys government ruling against "copying". Read about Sony's attempt to do this here and how ugly it can get: http://en.wikipedia.org/wiki/Sony_BMG_copy_protection_rootkit_scandal
What you can do:
What you cannot do:
What you should not do:
I would say no, just like everyone else above, but I can give a brief idea on how it can be done.
If every file on the hard drive was encrypted with a key, the data obviously could not be copied because it would not contain the unencrypted data. But if you somehow made the computer decrypt the data every time a read function is called from the computer, and encrypt the data every time a write function is called from the computer, I think it would work.
I also am pretty sure that speed would be a very big problem if a hard drive worked this way, but who knows, maybe we will see it in the future. Also, the thing about this is that anyone who really wanted to get the data on this hard drive could if they knew what they were doing, by just removing the encryption call every time a write function is called, leading to an unencrypted hard drive.
Anyway, that is just an idea, and I really don't see that being a very good solution in the near future.
If a file can be read, it can be copied. After all, copying is the same as telling your computer to read your file and copy whatever it sees. When you read a file, its contents are loaded into the RAM. When you copy a file, the contents are loaded into RAM and written from RAM to HDD. Since the RAM isn't under your control, you can't stop the second step.
If there's only one (or a few) types of files you want to share (eg text, videos, ppts, etc), follow these steps (programming capabilities required):
Program your fileviewer to work only on the external hard drive. You can do this by interspersing system files in the HDD (use attrib +s +h on the Windows command line), and require these in your program startup. You can also make it not work if it is on the C: Drive (look at the current drivepath with File.getCanonicalNamespace)
5.There you go! Your friend can view all files using the viewer, but the files themselves are next to useless.
The method won't work for text documents, but your garbage-creating algorithm can be made more sophisticated to garble the entire file in a reversible manner (rot13 is a simple example).
Neither would this method be advised if you have only one copy of the stuff. The garbling should be reversible, but, things can go wrong.
A bit of a bother to do all this, but the only way I can think of. It's exactly how Netflix and all make their online movies unstealable. They use their own formats (probably a lot more sophisticated than this), and they have their own viewer.
Write protecting can be done, but its easily crackable (whoever has the physical device has everything).
If you have a separate copy of these files, then using the above copy-protect method will automatically write-protect the files, as the user won't be able to edit the files subtly. He can delete them.
If you don't have a separate copy, then NTFS file systems have a read only option; but this is easily bypassed.
Everyone...bear with me, this is an exercise in being naive.
I think the OP was asking for something simple. I also thing that if you propose such a profound question to a bunch of people, many will over think it.
The goal here isn't to prevent or guarantee them from doing anything. It's actually to make it so much work to get around what they want to do - that they'd rather give up or obtain it "the easier way" purchasing or whatever.
So the real question is: "How do I make things difficult for a friend of mine if he tries to copy these files."
IF we assume that your friend is the average person and not capable of reading memory and we assume they aren't going to read this post... :-)
As suggested above an API could work.
Remember anything read into memory is "obtainable".
Same can be said for the file system, obviously.
Off the top of my head, one could build an interpreter.
It's a loose concept, but one I think it would work fine.
If you don't want to write stuff yourself, then proceed no further.
So encrypt your harddrive.
There are plenty of other threads on how to do that so I won't cover that here.
When you encrypt it, it only makes sense to be able to decrypt it.
You can use keys here. If you wrote a binary file, that contained the private key + a salt key that was unique (or really close to unique) to the hardware you were sharing - like the serial number of the device. The binary file would decrypt the files and read them in a wrapper.
So if the files and the binary were moved to another device...it would just fail. Because the keys don't match up as expected.
Now - granted that a truly skilled person would probably still be able to get around this in a number of ways.
BUT - your average person, probably won't want to invest the time/effort/money.
Some light reading:
Some software (so you can play around with encryption):
The easiest kind of "wrapper" you could build is an Adobe Air app...
This will work across platforms (in theory).
The barrier to entry into this kind of programming relatively low.
I hope this helped in some small way.
The best you could do is to use some kind of checksum, MD5 hash, or similar, to be able to at least detect if something was changed on your hard drive. You can't stop anyone from modifying data on the drive if they have physical access, but you can make them promise not to do so, and explain to them that you will be able to detect if they did.
No. You can use a write protected medium to prevent editing, but if data is readable, one can always store the read stream someplace else to reproduce it.
You can of course go some extra miles by requiring an online-connection enforcing decryption routine, but even then the user can simply log the servers response and fake the internet.
You can go quantum and try to apply the no-cloning theorem, but since the read data will still be accessed in a classical way, the output can once again be copied.
In short: Don't waste time trying to protect readable data from copying and invest it in something useful instead. Going to the cinema, for example.
You can share your harddrive via LAN. That way he'll be not having physical access to harddrive. You don't need to encrypt it at all for this. Just set the permissions right and you are on your way.
You can setup SSH. Google on how to setup SSH in your platform. There are many software packages available to share data between computers.