For one of my new nodes, the user needs to generate a key pair (i.e. private key and corresponding public key). To make the whole thing a bit user-friendly, I would like the user to be able to generate a new key pair by a simple button in the node's config screen:
- User clicks the 'Generate new key pair' button.
- On the server side the httpAdmin endpoint generates a new key pair, and returns the key pair as json.
- Both config screen fields will be filled (from the json).
- Under the cover I would of course store both fields into the credentials of my node.
But not sure whether this is a secure way to generate a key pair. Would be nice if anybody can let me know if this is a decent solution, or should I do it somehow else?