Couldn't this be solved by Diffie-Helman key exchange? [1]
[1] https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exc...
[1] https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exc...
Essentially, a determined malevolent actor who controls the client could exfiltrate your keys easily. Maybe it's intentionally introducing a subtle vulnerability and then exploiting it server-side[0], or it's just simply doing a file upload of the keys. Basically, you can't be certain there isn't a backdoor from a malevolent actor.
[0] IIRC, there was some vulnerability in the Linux Kernel a few years ago that was basically there due to an errant space. Some people theorized that this could have actually been intentionally introduced by sophisticated actors, to hide in plain-sight open source code.