2. Forensic testimony in the complaint asserted Silk Road used this method and in fact used code identical to that in the answer.
3. Silk Road server encryption was signed with Frosty@Frosty.
#2 and #3 were evidentiary, but #1 is what tied everything to a real person's name.
Yes, something like that.
The very first mention of the Silk Road online was from a user named "altoid" on Shroomery – the post is actually still up: https://www.shroomery.org/forums/showflat.php/Number/1386099...
altoid was also the name of the account that had originally posted another question on SO, not the one about sessions, but one about Tor services: https://stackoverflow.com/questions/15445285/how-can-i-conne...
The SO account was later changed from altoid to frosty. The email address used to register the SO account was rossulbricht@gmail.com.
Also when the FBI imaged the Silk Road server, the username was "frosty". There were just so many links going back to him :-/
There have been long articles about the Silk Road and its demise, the Wired ones have a lot of details including what I mentioned above. Part 1 is here: https://www.wired.com/2015/04/silk-road-1/
Normally the DOJ gets access to all the emails of the target of the investigation, then from there they look through the emails and subpoena any companies that might hold additional information - such as Stack Overflow.