nod As I noted, I'm not a lawyer (have taken a bunch of infosec classes towards a Master's degree, but that's more focused on tactics than legality), and I'd imagine there is a line at which it would not be speech (though I'm not sure Samurai would fit that bill). And once it's operating as a worm, that's definitely different (as running the application is inherently an attack). Though it's running the code, not writing or possessing it, that would be the issue here.
Also, the cynical side of me wonders why the government hasn't looked at mining software as something that overheats computers dangerously.