Do not get public key from user when creating a key. Generate it on server instead