rsa buffer encryption decryption

The following article explains how to encrypt/decrypt buffer with rsa private key and public certificate (or public key). It’s a proof of concept.

The entire source code is available here.

cc -o dcrypt file.c -W -Wall -lssl

The first thing to be made is to extract the contents from the key in order to obtain a reusable RSA. You can thereafter use the functions of encoding and decoding. In certain case the use of buffers can be expensive for the memory. One will privilege for example the use of flow of file.

Generating private key and public certificate
Generating public key

~ par vchav sur Mai 14, 2008.

Laisser un commentaire