I'm currently a student that is trying to develop a messaging application on android using java that will implement diffie hellman key exchange in order to ensure that they both will be able to calculate a secret key to decrypt the content that are send within the text.
I have looked for various sources online, but I could not find a library or able to made my own diffie hellman key exchange occur within the app itself. Such as if I use mobile A to generate the key, how does mobile B receive that data and know that it is the public key? Also, once the public key is received, how does he generate his own private key based on the public key?
I have looked at the various sources such as https://stackoverflow.com/questions/34237971/conducting-diffie-hellman-between-java-and-crypto-c http://docstore.mik.ua/orelly/java-ent/security/ch13_07.htm http://www.java2s.com/Tutorial/Java/0490__Security/ImplementingtheDiffieHellmankeyexchange.htm
and many more, but it seems like the codes that they provide is more for running within the app where there are 2 users in the device, and not within the app, but 1 user per device.
Sorry for the trouble, thanks!