Added x509 code from book, altered for GNU MP and my coding style. Need SHA512 to test/integrate.