I will give you a high level example of what he is talking about. your software displays a public key to perform encryption. what 'the NSA' can do is put a proxy (or use your isp) in between you and the person you are sending data to. Then they can pose as the person you are sending data to by hosting their own public key to both you and the person you want to send data to. now they can decrypt information that you send, and then encrypt it with their private key and send it to the other person. NOW THE NSA CAN SPY ON YOU USING YOUR APP.
man in the middle attacks can get much more complex than that, but this should help you understand what is going on.
If you are attempting to write security software you should really at least learn crypto AND networking. it seems like you have not accomplished either of these.