The right to engage in anonymous speech, particularly anonymous political or religious speech, is an aspect of the freedom of speech protected by the First Amendment.
The Virginia law, however, prohibited this... and, AFAIK, was the basis for overturning the conviction. -- My Site