Updated Keygen and Makefile

Keygen now creates an 8 byte key and writes it to a file
Makefile links in crypto libs.