Added initial C code.

It compiles (on a system with openssl-dev at least), but beyond that all
bets are still off!