I have HTML and SWF files that I want to put on a CD. How can I protect the contents on the CD, or make it difficult for someone to burn or duplicate them?
Fundamentally, you can't. It's impossible.
This is because you are unable to distinguish between an attacker and a legitimate user. You want the legitimate user to be able to access the data, you want the attacker not to be able to, but you can't tell if Alice is a legitimate user or an attacker.
Despite it being impossible, a lot of people have put a lot of effort and resources into trying to do it anyway. The closest they've come is with two approaches:
- Have the users access the data only using computers that you control.
- Authenticate each user before giving them access to the data, analyze their usage patterns, and revoke their access if you believe them to be an attacker.
Note that neither of these techniques work (because it's impossible) but they can sometimes delay unsophisticated attackers very briefly. (While unsophisticated attackers can't break these techniques, they can download copies of your data from sophisticated attackers.)
Realistically, you cannot. Anyone who has the CD in their possession and can read the files on it, can make a copy of it.
Your best course of action is one of two options: physical security (only give the CD to people who you trust will not act contrary to your interests), or encryption (encrypt the files on the CD so that only people who have the decryption key can read the files, and only give the decryption key to people who you trust will not act contrary to your interests).
But once someone has a cleartext copy of the file (e.g., the HTML or the SWF file), you can't realistically stop them from making copies and sharing copies of the file.
If you have a high budget, you may be able to embed a unique watermark in the file that is different for each person you give the CD to. The idea would be that, if they do share copies of the file widely, and if you later come across a copy, you can tell which person was the original source. But you can't prevent copying and sharing.
P.S. Please don't cross-post your question on multiple Stack Exchange sites.
You are basically asking for a DRM system
Digital Rights Management systems provide the features you are requesting.
TL;DR: don't waste your time and re-think your security model. Someone will make a lot of copies if they have interest
The theory is that when you burn data on media, it is perfectly readable as it is made of
0/1 bits. Everyone with a CD/DVD reader can access those
1s, so you need a system on top of those that prevents people from running the content after cloning the media.
The practice is that you basically can't protect an HTML page which is a static content. I'm not sure about SWF, as Adobe Flash is gone dead, and that possibly all past DRM systems running on the user's machine have been eventually broken. Of course, they make it harder to make a copy.
As I recall, old DRM schemes for PCs and consoles relied on special sectors that are sculptured into the media by the very factory, e.g. if you buy a TDK blank media at your store, that brand is marked (and visible by software such as Nero Burning Rom) permanently on an area you can't write.
If your Adobe Flash-fu 🥋 is great, you could try to read those special sectors. But you can't burn the
master gold with a dekstop CD/DVD burner, as you need a factory to make the media for you.
[Edit] I lack knowledge of the exact functioning of the PS1 DRM scheme, and I lack knowledge of Adobe Flash (ActionScript) programming