In single-blind peer-review, can you reveal your identity without the editor's consent? In my field (chemistry), review is always done in a single blind process, i.e. the author does not know who the referees were, but the referees do know who the authors are. In ten years, I have never seen a referee breaching this anonymity, e.g. by signing their review, unless they got prior approval by the editor (in order to continue discuss things further with the authors, once the manuscript was accepted for publication).

So, it seemed logical to assume that in single blind peer-review, the reviewer should not disclose his identity without the editor's consent. Yet, some people have told me (here and there; also IRL a friend from human sciences) that they have seen people sign their reviews, or write emails to them after the review but before the paper is published.

So, in single-blind peer-review, can you reveal your identity without the editor's consent? Does it depends on the customs of each field, or is there a hard rule? (in which case, the few anecdotes I heard were outliers)
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...