Fix key and certifiacate parsers

- private key param d is little endian
- point expander contained bugs (test added)
- extract pubkey from certificate