make sure crypto is loaded before creating a keypair