C unix, asymmetric socket encryption

I have a client / server application in C unix and I need to encrypt / defragment the data using RSA (but not necessarily RSA). Is there a library (and related documentation) for this kind of function?

+4
source share
2 answers

You can see the SSL / TLS C API .

+1
source

For a client / server application, the best way to ensure security is to use TLS / SSL.

The latest version of TLS is TLS 1.2 ( RFC 5246 ), and as WagnerVaz rightly mentioned, the best open source library available for TLS is a href = "http://www.openssl.org/" rel = "nofollow" > OpenSSL. OpenSSL not only provides a library for TLS / Crypto. But it also provides you with a tool for creating certificates and private keys (based on RSA / DSA, etc.) in various formats.

Although OpenSSL is the best TLS library available on the market, it is a little difficult to understand and use for the first timer. There is a very wonderful tutorial written by Eric Rescorla himself on using OpenSSL.

Introduction to OpenSSL Programming (Part I) / Introduction to OpenSSL Programming (Part II)

It would be better if you first tried to understand what SSL is, and then start writing code for it.

As an alternative, suppose you are only interested in asymmetric encryption / decryption, but the OpenSSL Crypto libraries can be used.

+1
source

Source: https://habr.com/ru/post/1415304/


All Articles