-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numerous design flaws #5
Comments
This is not a secure way to zero memory as far as I know: https://github.com/getqujing/qtunnel/blob/master/src/tunnel/cipher.go#L31 See here (same guy from Tarsnap incidentally): http://www.daemonology.net/blog/2014-09-04-how-to-zero-a-buffer.html |
That line in As far as securely-clearing memory in Go: I haven't found any definite documentation on it, but I'm pretty sure Go zeroes newly-allocated memory (and a couple of tests confirm it). It also forces array bounds checking, so there's not an obvious way in Go to accidentally reveal recycled memory contents to a user. This means you're probably okay regardless of whether you zeroed something unless you link in a vulnerable C library (like an SSL stack) and someone somehow uses it to read your memory. |
@lunixbochs Okay, yeah I thought it was weird that they were using the MD5 object to create |
�Thanks for your professional advice @tarcieri, I'm trying to implement a new version of encryption protocol now:
As I said in README, the reason I'm not using TLS based tools or spiped (this is a great tool, but I didn't know it before), is I'm avoiding the handshake before the real communication, this tool is used in the scenario that client and server may talk to each other oversea, and I don't want cost >500ms for handshaking. A simple but secure enough protocol would be good enough. Any suggestions? |
@ghoulr Go 版 shadowsocks 已经实现 AEAD (aes-gcm) 加密,能移植到 qtunnel 吗? |
Designing a transport encryption protocol is among the most difficult undertakings in cryptography. It's something that I would leave in the hands of a professional cryptographer who is already well-versed in the attacks on TLS.
Your project more or less duplicates the functionality of spiped:
https://www.tarsnap.com/spiped.html
However, you have made a number of mistakes in your design:
...and that's what I found after looking at it for about 20 minutes.
You should probably be using spiped or TLS in PSK mode
The text was updated successfully, but these errors were encountered: