I need to be able to perform a DH Key Exchange as part of an app I’m working on, that is to say your standard diffie-hellman (not elliptic curve).
A = g^a mod p
B = g^b mod p
S = B^a mod p = A^b mod p
where g is the base (2), p is a large prime number, a and b are large private integers and S is the resulting shared secret
I note that Xojo’s Crypto module doesn’t implement any functions for this but the Crypto++ library which it uses does apparently support it. I wondered therefore, if it was possible through external API declares to call the necessary functions from the library within my app? Can anyone offer any advice in this regard?
Xojo doesn’t seem to support an integer type bigger than 64bit, otherwise I could just perform the maths directly.
NOTE: I’m trying to avoid using an external plugin for this solution