Cryptography methods implementaion in C
Instructions before executing the code.
-
Download the zip file.
-
Unzip the zip file.
-
The zip file contains a. Server side program (SSL-Server.c) b. Client Side program(SSL-Client.c) c. Certificate (MyCert1.pem)
-
Create 3 folders by name “cloud” , “ hmac”,”download” inside the unzipped file.
-
Open the Server Side program and edit the file path as per your system Line 70 : Server side program (path of folder cloud)
-
Open the Client side program and the file path as per your system. Line 106 : client side program (path of folder hmac) Line 250 : client side program (path of folder download)
-
Copy the file that you want to upload into the unzipped folder
-
Login as super user before compiling the code.
-
Compile the server side program as below, (ignore warnings) Compile: gcc -Wall -o ssl-server SSL-Server.c -L/usr/lib -lssl -lcrypto Run : ./ssl-server
-
Open another terminal and login as super user before compiling the code, Use below instructions to compile the client side program. Compile : gcc -Wall -o ssl-client SSL-Client.c -L/usr/lib -lssl -lcrypto Run : ./ssl-client localhost
** Incase you need to create your own Certificate Please use the command below**
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem