Simple, readable TLS implementation