Subject: Hack Proposal : DeCSS in JavaScript

From: Shlomi Fish <[email-masked]>
Date: Wed, 18 Jul 2001 06:04:24 +0300 (EEST)

Hi!

In a discussion we had here about DeCSS, Chen suggested that a DeCSS
decoder be written in JavaScript. Now, thinking about it, it could be a
very good idea: Imagine violating the DMCA, just by accessing your browser
because you will have two input boxes and a button with which you can
decode CSS!

We are actually talking about running code. What I think it may require
is:

1. A function to convert from a backslash-escaped string to pure data.

2. A function to backslash encode a binary string.

3. The DeCSS code converted from C (or from something else) to JS.

4. Some GUI sugar.

If it is finished, I will put it straight at the DeCSS Gallery, because I
don't want all this traffic ending up on iglu.org.il or on Technion
servers. It might start a trend: a DeCSS mini-console in a few lines of
JS-enabled HTML! (I assume the script is "src=\"...\""'d.)

Naturally converting from C to JS takes some time, but is not very
challenging. I thought of a method to make it more challenging:

1. Write a heuristic of a C to JS converter. There are ANSI C parsers out
there, so we may use them as the basis. Or we can hack something from
scratch in perl.

That way we wouldn't even write the code directly.

2. Compile DeCSS with gcc to a simple virtual machine. And then create an
interpreter for it in JavaScript. I think the G-Machine from the book
"Computation Structures" would be perfect for this, because an open-source
JS interpreter of it, would save the lifes of thousands of students who
has to work its crappy DOS debugger.

This will take more time and generate larger code, but it could be more
worthwhile.

In any case, I think I'll take the standard method of manually converting
the code to JavaScript. The DeCSS gallery already contains a code in Java,
but JS is more portable and accessible.

Of course, there could be legal implications: I'm not aware that an absurd
law such as the DMCA was passed in Israel, but it may pass, especially now
that the European Union passed a similar law. But I personally am not
afraid of such laws, and assuming I get busted (I also have a DeCSS mirror
on my homesite), I will make sure to make as much publicity of it as I
can. Copyright law needs a major re-vamp due to the digital revolution,
and the DMCA is a retro-active law which helps no-one. (including not the
movie industry)

I may work on it somehow on my own, but I cannot promise anything. If
anybody wants to do it instead of me, let me know or just do it.

Chen, do you consent that I will post further notices about the progress
of this crazy hack to this list? It is managed by an American servers and
who knows what the DMCA has to say about coordinating so-called crime
through this list.

Regards,

	Shlomi Fish

----------------------------------------------------------------------
Shlomi Fish        [email-masked]
Home Page:         http://t2.technion.ac.il/~shlomif/
Home E-mail:       [email-masked]

A more experienced programmer does not make less bugs. He just realizes
what went wrong more quickly.

---

From: Shlomi Fish <[email-masked]>
Date: Wed, 18 Jul 2001 06:55:35 +0300 (EEST)

Just a side note. I don't know how many of you visit DeCSS regularily, but
I noticed that somebody wrote DeCSS in pure lambda calculus. While the
Scheme version is quite legible, I could not undertsand the LC one.

Oh well, I cannot understand my own LC code...

Regards,

	Shlomi Fish

---

From: Adi Stav <[email-masked]>
Date: Wed, 18 Jul 2001 19:09:37 +0300

> 3. The DeCSS code converted from C (or from something else) to JS.
[...]

Use file uploads. Modern browsers supports them and will be very easy to
both use and write. No need for backslashing.

> and the DMCA is a retro-active law which helps no-one. (including not the
[...]

IANAL, but I doubt a formal law will be needed to harrass you. I'm sure 
there are plenty of existing laws vague enough for you to violate, and
they will be used IF someone cares enough. Look what happened to Jon
Johansen in Norway -- it could very well be worse here. All more fun 
if you're a willing to play the game, of course.

---

From: "Nadav Har'El" <[email-masked]>
Date: Wed, 18 Jul 2001 10:47:27 +0300

> if you're a willing to play the game, of course.

And it doesn't even have to be a real law: what if you get some formal
letter from some Israeli music/video importer, stating that unless you
remove your site you'll be sued for 100,000 shekels for <some-obscure-
and-irrelevant-law>. Unless your cousin is a militant lawyer, or something
like that, I doubt that many people will have the guts to say, "yeah? I'm
not afraid! let's see you sue me!". They will - it doesn't mean they'll win
but they can drain every bit of energy and money you have in such a lawsuit.
Unless legal battles are your cup of tea, you're going to suffer, a lot,
even if they have no case.

And it's even worse if your website is not on a machine you own yourself,
but rather on a computer belonging to a company, university, or just a group
of friends. The company (or university or group) will probably want to keep
its ass covered, telling you to remove your page immediately instead of giving
them legal trouble.

-- 
Nadav Har'El                        |   Wednesday, Jul 18 2001, 27 Tammuz 5761
[email-masked]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |How much wood would a woodchuck chuck if
http://nadav.harel.org.il           |a woodchuck would chuck wood?

---

From: Shlomi Fish <[email-masked]>
Date: Wed, 18 Jul 2001 11:18:58 +0300 (EEST)

> its ass covered, telling you to remove your page immediately instead of giving

Yes, but everybody know that _I_, Shlomi Fish was the one who wrote this
JavaScript thingy, no-one will buy that the lawcase is accidental, and
they importer will get a very bad publicity throughout it.

There should be a law against abusing the court system. Right now, with
all those lawyers floating around, there are too many suitcases, and many
of them are irrelevant. If a party A could sue party B for wasting its
time in a needless court battle, then I believe people would be less
reluctant to wage such non-sense.

But then again, you could make the law canon, a simpler and smaller one,
so there is going to be less non-sense in it. How many of you have read
the Neo-Tech Constitution? Here's a link (search for "CONSTITUTION" in all
caps):

http://www.neo-tech.com/advantages/advantage83.html

It says that the only thing that can be considered illegal is initiatory
force, threat of force or fraud against a person or his property. Now, how
many laws in Israel or in other countries deviate from that?

Of course, even the N-T Constitution itself can be interpreted in
different ways. For example, does property include intellectual property?
And if so, what kinds of intellectual property. But it is still clear
enough to understand that the canon of laws deviate from it drastically.

The fact is that laws are harmful _because_ they contradict this concept.
And that way, trouble arise, so more laws are needed to solve these
troubles. And that way, more and more useless laws get passed in the
parliament, and it is easier to abuse them. And irrational law-suits
become more common.

Just my 20 agoroth,

	Shlomi Fish

> To unsubscribe from this group, send an email to:
> [email-masked]
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>