Is it possible to generate 2 pre-shared keys on on system, distribute them to two host A and B, so that A and B can then use those keys for the encrypted connection between them? I'm not talking about Public Keys like RSA, but 2 pre-shared keys that get handed over to the two parties!
I'd have to implement that in C++, so if possible I'd need a working solution for that.