Key pair generation working