thanks for the example @peg + @dominic.
I don't understand how this code works. Have tried reading docs but haven't been able to find anything that really helps (npm libsodium-wrapper, libsodium.org
Educated guess and then testing for myself I can see that
scalarMult(alice_e.secretKey, bob_e.publicKey) === scalarMult(bob_e.secretKey, alice_e.publicKey)
Is scalarMult
then just a function which is defined to always have this property?
I'm kinda tempted to go down that rabbit hole and just understand what is happening with the maths, but not sure how wise that is