I Want to create my own safe connection for a VOIP app.
Now I am looking into key exchange which seems to be much more Tricky than encrypting/decrypting.
Are there any better approaches than Diffie-Hellman in practice ?
I understand the concept of Diffie-Hellman but I think it needs the right values to be safe since with natural numbers it could be easily be guessed. How can I get those values using python, what are they and is it really safe from key guessing?
Please help me with some background informations / inspiring.
DH is fine for this purpose, just make to sure to use 2048 bit keys or more.
However for VoIP the standards are TLS with SRTP/zrtp so it would be better if you would implement these. With DH you loose compatibility and will introduce a lot of complications. Also note that DH is only for key exchange, so you will need something also for the encryption itself. With TLS you could handle all these in one step by using a well know implementation instead to write your own encryption stack from scratch.
Diffie-Hellman Parameters and safety