I want to exchange a public key between a c++ application and and android application. I decided to use Diffie-Hellman . On the C++ side this library looks promising for generating the keys with c++. Now I am looking for an implementation for java to generate the keys on the android smartphone.
What libraries would you suggest, also on the c++ side? In the end i want to share the public key as a string via UDP.
kind regards
A long time ago I used Crypto++ for the C++ which worked well for me and has support for many different algorithms.
For android the KeyAgreement class can be used on some JavaVM, it is initialized with a String to choose the algorithm. You could try to instantiate it with "DiffieHellman" and see if you get an instance.
According to Java7 docs, http://docs.oracle.com/javase/7/docs/api/javax/crypto/KeyAgreement.html - " Every implementation of the Java platform is required to support the following standard KeyAgreement algorithm: DiffieHellman "
Test it and see if that includes dalvik or not.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.