This is exactly what I was thinking today. I've spent the last couple of weeks implementing TLS (This is the second time I've had to do this now, it's endless fun) and this time I'm sort of "cheating", because the platform I'm writing for already has high quality ASN.1, crypto and X.509 libraries and enough of PKCS#1 that I scarely have to lift a finger.
Web programming is horrifically dull scut work to my mind, I'd far sooner be writing the heavy lifting in the back end.