Moved RSA key creation to a separate thread as it takes so much time.