Should sharing knowledge ever be illegal?

Have you heard about the 13 year old girl who was arrested in Japan for copying a link to a JavaScript snippet to a bulletin board? When run, the snippet would force your browser to issue a popup in an infinite loop. This sharing of an “unlawful program” led to the arrest from the Hyogo Prefectural Police Department

Japanese police is charging people for _posting link to a site_ that run

`for(;;){window.alert('lol you can't get rid of this message even you keep closing modal')}`

This outraged me when I first heard of it. Growing up in the age of the internet I’ve become accustomed to the belief that knowledge should be able to move freely. Unfortunately this situation was started by a 2011 law introduced in Japan that made the creation, or distribution, of a computer virus with no justifiable reason face prison terms of up to 3 years.

I’m sure this bill was sold to the populace as a way to help stop the evil hackers. After all with the limited knowledge most lawmakers have about computer science it was probably easy to run towards authority. Instead of educating the public about proper web behaviors it’s much easier to just stamp something as BAD and try to eliminate it.

Unfortunately most times when you run to authority then you end up having issues like this. That’s because you have now asked the authority to begin arbitrarily reassigning natural behavior and they can only do so from their own point of view. Now you’re relying on their knowledge as the sole arbitrator of authority instead of the cumulative knowledge of society. With their limited point of view this person’s script kiddie code could be the same as the NSA’s strongest tools

Individuals like this little girl aren’t the only victims with authoritarian laws like this. Society as a whole is now artificially limiting their knowledge. As a everyday citizen you take less effort learning about risks and instead rely on the authority to dictate where risks are coming from. When this is expounded over the majority of the population then it severely limits the culture’s shared reality to what is the equivalent of sheep.

This made me think to myself, is there ever a time when we as a civilization should make sharing knowledge, or for that matter speech, illegal? As you can tell I would err towards no but I’m sure that some of you may have a differing opinion. If you do please let me know in the comments below what circumstance would find this acceptable.