OS1/pads
2024-04-17 23:55:32 +00:00
..
dec_client.c please fix 2023-12-14 03:17:58 +00:00
dec_server.c remove debug loggin 2023-12-14 07:04:17 +00:00
enc_client.c please fix 2023-12-14 03:17:58 +00:00
enc_server.c remove debug loggin 2023-12-14 07:04:17 +00:00
keygen.c complete keygen program 2023-12-06 21:00:18 +00:00
makefile new makefile just dropped 2024-04-17 23:55:32 +00:00
p5testscript Holy shit please test 2023-12-14 03:08:11 +00:00
plaintext1 Holy shit please test 2023-12-14 03:08:11 +00:00
plaintext2 Holy shit please test 2023-12-14 03:08:11 +00:00
plaintext3 Holy shit please test 2023-12-14 03:08:11 +00:00
plaintext4 Holy shit please test 2023-12-14 03:08:11 +00:00
plaintext5 Holy shit please test 2023-12-14 03:08:11 +00:00
readme.md readddddddddddddddddddddddd 2023-12-14 06:57:15 +00:00

pads

Pads is an implementation of a simple one time pad algorithm. There are 5 programs, two pairs of server client programs and one program to generate random keys.

The client validates the input and sends it to the server in a chunk of 70001 chars. The server receives that; one for the text and one for the key. The server encrypts the text with the super special algorithm and then returns the encrypted or decrypted text in another 70001 byte TCP stream.

To handle multiple connections, the process forks, does the transfer encrypts the message, sends the text, and then kills the process. The main process waits for the dead processes after receiving new connections.

Compiling

It is highly recommended to use the make command to compile the 5 required programs.

Simply type:

make

Running

servers

dec and enc server's both require the port to be specified as a launch argument:

./enc_server 69 
./dec_server 420

consider running them in the background with '&' and choosing ports greater than 1024.

clients

The clients communicate with their respective servers only. To connect, you specify the password file, key file, and port as launch args:

./enc_client plaintext_file key_file 69

keygen

The keygen program takes the number of characters as a launch argument:

./keygen 69

consider redirecting output with > somefile