In single-blind peer-review, can you reveal your identity without the editor's consent?
I would think that it's a bad idea to open the possibility of referees communicating with authors, since this opens the possibility of authors' influencing referees, compromising the process. Of course, this is not to say that there aren't some positive possibilities, but the conflict-of-interest criterion seems to me in this case to be clearly manifest.
That is, it should be understood, implicitly or explicitly, that referees will remain anonymous "in perpetuity", so that there is no hint or possibility that authors could communicate with them or influence them. E.g., either overt or subtle invitations from authors to a referee to communicate (and get some credit for the paper, maybe co-authorship, etc., as discussed around here some time back...) would be understood in advance to fail absolutely.
Thus, editors who discover referees willing to engage in such would probably regretfully stop asking them to referee, since if such activity became known it would seriously damage the reputation of the journal... if only in principle, but "principle" would seem to be the point...
In my opinion, informing anyone that you was their referee is a serious betrayal of the system. The fact that the reviews are (at least) single-blind by default has a good reason, which is that you don't feel unsafe writing a very negative review to a paper if it deserves it. As such, it works only if it's standard that this information stays secret.
Imagine a situation when 15 people vote for something in secret vote, but vast majority of them plan to reveal publically their vote. It stresses the minority to state their opinion as they feel it. And the uttermost reason for reviews is that reviewers state their opinion as they feel it.
There are some exceptions when it is acceptable, like:
When you reject to review the paper for whatever reason, you can of course tell them that you saw the paper.
Another exception is when the paper is really excellent and contains some breaking results (so that it is really really far from giving a negative review), but even then I would be quite careful.
AFAIK, in some countries, even a randomly-chosen portion of PhD theses get single-blind reviewed after they are published, to ensure that the thesis oponents take it more seriously in general.
The fact that others do it doesn't mean that it's correct.
It is overwhelmingly clear from the answers at https://mathoverflow.net/questions/98308/when-if-ever-disclose-your-identity-as-a-reviewer that in the mathematical research community it is perfectly acceptable to sign one's reviews. I know people who do so, and their purpose in doing so is to ensure that they keep the tone and content of their reviews such that they are not embarrassed to be acknowledged as the author of the review. I think that other mathematicians largely consider this a courageous and responsible action. Some may think it is unwise, but I don't know of any who think it is unethical.