I want to create some software that performs diffie hellman group key agreement but I don't want to reinvent the wheel even if I know how it's done. So I came accross the NaCl library, especially the
As far I know you can perform Diffie Hellman key agreement on elliptic curves therefore, my thought is if I combine it with
crypto_box ones for key generation, I can do a Diffie Hellman Key agreement.
My Idea is (described in some sort of pseudocode) shown in the following image:
Would you recommend it as shown above?