Skip to content
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

Please use TLS #6

Open
codahale opened this issue Jan 31, 2016 · 5 comments
Open

Please use TLS #6

codahale opened this issue Jan 31, 2016 · 5 comments

Comments

@codahale
Copy link

I noticed you're using AES-CBC for each packet, which I think is a mistake for a couple of reasons.

First, it's unauthenticated. If an attacker changes the encrypted packets, even if they don't know the key, they can propagate those changes into the plaintext without you knowing.

Second, it requires a padding scheme, which opens you up to chosen-ciphertext attacks via padding oracles. It depends on how the application is structured, but this can be catastrophic — an attacker can potentially decrypt data, even without the key.

Third, it doesn't protect against replay attacks. An attacker can re-send a particular packet, and you will have no way of knowing that happened.

I strongly recommend you use TLS. Go has wonderful support for it in the standard library with secure default configurations. If you want to avoid managing your own CA chain, you could use a whitelist of certificate fingerprints as a shared configuration to prevent unauthorized access.

@dchest
Copy link

dchest commented Feb 2, 2016

@miolini
Copy link
Member

miolini commented Feb 2, 2016

We working on strong encryption implementation with AES-256-GCM. 48h insufficiently for fully product implementation. We have decided to get working proof-of-concept before 48h will over.

You could follow us here:
https://github.com/meshbird/meshbird
https://twitter.com/meshbird

@codahale
Copy link
Author

codahale commented Feb 2, 2016

I understand. I still strongly recommend TLS, even instead of AES-256-GCM. It is very hard to design and implement a secure cryptosystem, and TLS already fits your use case.

@miolini
Copy link
Member

miolini commented Feb 2, 2016

We woud like to avoid using asymmetric keys in our case. And TLS is not good for UDP.

@miolini
Copy link
Member

miolini commented Feb 2, 2016

We have created related ticket 6 days ago
meshbird/meshbird#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants