Connecting to Mobile Server via XMLHttpRequest: Public Key generation

I am aware that to perform the “Connect” command, I will need to generate a pubIic key and send it to the mobile server. Is there a specific way that I need to follow in generating my platform’s public key? How?

Just for context, I have read the documentation pages below:

https://doc.developer.milestonesys.com/mipsdkmobile/reference/protocols/mobile_intro.html

https://doc.developer.milestonesys.com/mipsdkmobile/reference/protocols/mobile_appendix.html

https://doc.developer.milestonesys.com/mipsdkmobile/reference/protocols/mobile_logon.html

I assume that you posted the same question here - https://developer.milestonesys.com/s/question/0D53X0000ATnl4oSQB/mobile-server-login-via-xmlhttprequest-how-to-perform-the-diffiehellman-key-exchange-generate-secret-key

Yes and I have managed to solve both questions. Thank you for the response.