Simple AES chat program
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
thajohns 3583cb5ec9 Added README il y a 10 mois
README.txt Added README il y a 10 mois
aes.c Got ElGamal and AES handshake working il y a 10 mois
aes.h Got ElGamal and AES handshake working il y a 10 mois
client.c Added README il y a 10 mois
comm.c Finished chat loop il y a 10 mois
comm.h Finished chat loop il y a 10 mois
keygen.c Finished key generator il y a 10 mois
randsource.c Got ElGamal and AES handshake working il y a 10 mois
randsource.h Finished key generator il y a 10 mois
server.c Finished chat loop il y a 10 mois
sgprime.c Got ElGamal and AES handshake working il y a 10 mois
sgprime.h Finished key generator il y a 10 mois

README.txt

Here is a very simple chat application in which parties have to take turns.

The tool has three parts:
keygen, the key generation tool
server, the listener
client, the connector

BUILDING

All three components depend on libgmp and certain POSIX APIs.
server can be built from server.c, aes.c, comm.c, and randsource.c.
client can be built from client.c, aes.c, comm.c, and randsource.c.
keygen requires pthreads, and can be built from keygen.c, sgprime.c, and randsource.c.

RUNNING

In the current implementation, randsource.c depends on the existence of
/dev/urandom. If there is a different source of entropy on your system, use it
instead by changing randsource.c.

keygen <bits> <output file> [threads]
will create a <bits>-bit key and store it in <output file>. If [threads] is
specified, that many threads will be used for the computation; otherwise just
one will be used.

client <connect address> <port>
will connect to a given address on a given port and begin encrypted
communication.

server <key file> <bind address> <port>
will bind a listener on the given address and port, and use the given key file
to exchange keys upon a client connecting.

CAVEATS

Communication is entirely turn-based. This is to simplify the code and prevent
inconvenience on a dumb terminal.

There are probably a handful of memory errors; for example, providing a key
shorter than an AES block size uses uninitialized memory.

The AES implementation is not rigorously tested, and thus may not be
completely conformant. Also, no inverse was ever implemented, so it uses a
strange encryption mode.

In addition to network sockets, UNIX file sockets are also supported. Instead
of a network address, use a string of the form unix:/path/to/socket to use a
UNIX file socket.

Due to the poor specification of certain parts of POSIX involving sockets,
it's possible that this program won't work outside of Linux.