new gen keys pair function