I'm thinking about the way to build encryption mechanism for 'peer-2-peer' communication. This is a mechanism I had a thought of:
Alice wants to communicate with Bob
First of all, Alice and Bob must know and trust the existence of the same public key server, and retrieved its static DH public key from secure mechanism (like downloading it from secure website.)
Alice randomly generates a new DH key-pair, and calculates secret key for the server, then send the public key to the server.
Server receives public key from Alice, calculate a secret key from Alice, and send encrypted reply back to her.
Alice decrypts the message, if the decrypted is as expected, means the connection is now secure and ready to do key-exchange with Bob.
Bob does the same thing as Alice to establish a secure key exchange mechanism.
Alice and Bob, yet again, generate a new DH key-pair, and tell the server about the key to exchange with each other.
Alice requests a location and public key of Bob from the server.
Alice sends a public key from (5) to Bob.
Bob calculates secret key for Alice, and sends an encrypted response back.
Alice decrypts the message, if the result is as expected, the connection is now established.
Is this (or relevant) method exist in real-world? If so, are there any references?
Sincerely