make generate_keypair available as a class method