pub fn key_gen(mode: Mode) -> Result<(Vec<u8>, Vec<u8>), Error>
Generate a new key pair for the given mode. The function throws an error for P256 keys if no valid key can be generated in a reasonable time.
mode