> Is there an library (like openssl) or an separate fs for that ?

ssl(3), tls(3), rc4(2), pushtls(2), pushssl(2), and related pages
such as rsa(2) and mp(2)