| Unconvinced. * Lossless UDP? Is there a reason not to do TCP? * There is no way to know if the public key is genuine, so the system is very sensitive to MITM. * The key exchange is inadequate. Why not do DH if it's just to have session keys? * The system is very easy to brute force as the acknowledgement is based on a known plain text. This is very bad. A quick glance at https://github.com/irungentoo/ProjectTox-Core/blob/master/co... I found a potential buffer overflow at line 143. If an attacker sends a large file, what happens? Making crypto software is not just a question of wrapping a crypo lib (in that case NaCl) with a GUI. There are some tricky security issues as how you use the crypto. |
Hole punching.
>There is no way to know if the public key is genuine, so the system is very sensitive to MITM.
If you want to add someone you need their public key (their id) which is 32bytes (It's small because we use ECC instead of RSA). Unless someone somehow replaces the key (your id) when you give it to your friend the system should be secure.
>The key exchange is inadequate. Why not do DH if it's just to have session keys?
The key exchange is designed that way because we want forward secrecy.
>The system is very easy to brute force as the acknowledgement is based on a known plain text. This is very bad.
Can you please elaborate on this. If you are speaking about the the second part of the crypto handshake I can assure you that the fact that the plaintext is known is not a problem.
>I found a potential buffer overflow at line 143. If an attacker sends a large file, what happens?
The function read_packet is hard coded to never return something bigger than MAX_DATA_SIZE.