Improve consistency in key generation and signing

- Public keys are in X.509 style and private keys are in the traditional format
- Minor edits to improve readability