session: first approximation implementation of tls