Live data from Hacker News

TripleSec - Symmetric Encryption combining AES, Salsa20, and Twofish

keybase.io

1–10 of 28 posts

Re: TripleSec - Symmetric Encryption combining AES, Salsa20, and Twofish

#2
I may be wrong as I'm no security researcher, but I was under the impression that combining things like this (and rolling your own crypto in general) could potentially make things weaker. Is this the case here?

Edit: Reading it more, I'm more convinced. It looks like there was a discussion a few days ago: https://news.ycombinator.com/item?id=6401057

Re: TripleSec - Symmetric Encryption combining AES, Salsa20, and Twofish

#3

I may be wrong as I'm no security researcher, but I was under the impression that combining things like this (and rolling your own crypto in general) could potentially make things weaker. Is this the case here? Edit: Reading it more, I'm more convinced. It looks like there was a discussion a few days ago: https://news.ycombinator.com/item?id=6401057

I have the same question, from the same position of ignorance.

can we get some tptacek up in here?

Re: TripleSec - Symmetric Encryption combining AES, Salsa20, and Twofish

#4
I like this idea to reduce dependence on trusting any given algorithm.

If I'm a global passive adversary, I would try to attack your blobs in these ways:

1) weaken your random number generators

2) guess your password by running massive dumps of passwords and passwords mutated with rules against pbkdf2 (why didn't you use scrypt?)

3) try to convince you or your system to decrypt a blob and reveal the plaintext to me surreptitiously (not so passive)

4) try to get your password from security flaws in wherever you store it

5) conduct traffic analysis on who is storing blobs where and when, and how long their blobs are

My bet is that the password is the weak point. Can you do anything to address that?

Re: TripleSec - Symmetric Encryption combining AES, Salsa20, and Twofish

#5
post #3

I may be wrong as I'm no security researcher, but I was under the impression that combining things like this (and rolling your own crypto in general) could potentially make things weaker. Is this the case here? Edit: Reading it more, I'm more convinced. It looks like there was a discussion a few days ago: https://news.ycombinator.com/item?id=6401057

I have the same question, from the same position of ignorance. can we get some tptacek up in here?

I've been under the assumption from reading some crypto over the years that in particular what your thinking of is applying the "same" crypto multiple times. Offering the same cryptography scheme multiple times is horribly bad. Like 3DES is horribly bad when implemented because it eats up the keyspace reducing the issue for it.

If the schemes of cryptography that you use do not reduce the amount of permutations/possibilities that you are using I see no reason why it wouldn't at least add a bit of extra difficulty in attaining the calculations behind the results.

This does sound like the right way to deal with cryptography with Javascript as pointed out by Triplesec: "authenticates with HMAC to protect against (adaptive) chosen-ciphertext attacks; and supplements the native entropy sources (window.crypto.getRandomValues in the browser and crypto.rng in Node.js) for fear they are weak."

Particulary because other ways of dealing with javascript random number generators (especially their api) is awful. You can read about some of that here: http://www.matasano.com/articles/javascript-cryptography/

But, I would still like to hear someone who knows more about using these three schemes back to back. Sometimes the permutations are effected in weird ways.

Re: TripleSec - Symmetric Encryption combining AES, Salsa20, and Twofish

#6

I like this idea to reduce dependence on trusting any given algorithm. If I'm a global passive adversary, I would try to attack your blobs in these ways: 1) weaken your random number generators 2) guess your password by running massive dumps of passwords and passwords mutated with rules against pbkdf2 (why didn't you use scrypt?) 3) try to convince you or your system to decrypt a blob and reveal the plaintext to me s…

1) How do you do that? His random generator is not even controlled by him, it's a bunch of open source browsers.

2) That's basically bruteforcing. Considering he is running pbkdf2 thousands of times, good luck with that. You might get lucky with 5-6 character passwords and a bunch of servers.

3) How?

4) Passwords are usually stored either nowhere (inside user's head) or a program like KeePass. Good luck breaking either.

5) What would that give you? It's still triple-encrypted.

Re: TripleSec - Symmetric Encryption combining AES, Salsa20, and Twofish

#7

I may be wrong as I'm no security researcher, but I was under the impression that combining things like this (and rolling your own crypto in general) could potentially make things weaker. Is this the case here? Edit: Reading it more, I'm more convinced. It looks like there was a discussion a few days ago: https://news.ycombinator.com/item?id=6401057

Combining algorithms, if done properly, isn't necessarily going to make things weaker. But doing it properly isn't trivial (which goes for crypto in general) and the more complex the construction, the more opportunities for screwing it up.

But at the end of the day it's still trying to solve the wrong problem. The chance of a well studied algorithm like AES having a significant weakness is much, MUCH lower than the chance that a particular program using it has a security flaw. Any effort spent layering Twofish and Salsa20 on top of AES would almost certainly be better spent making sure the usage of AES is totally secure.

Re: TripleSec - Symmetric Encryption combining AES, Salsa20, and Twofish

#8

I like this idea to reduce dependence on trusting any given algorithm. If I'm a global passive adversary, I would try to attack your blobs in these ways: 1) weaken your random number generators 2) guess your password by running massive dumps of passwords and passwords mutated with rules against pbkdf2 (why didn't you use scrypt?) 3) try to convince you or your system to decrypt a blob and reveal the plaintext to me s…

Passwords have always been a weak point. This has been widely discussed for the last two decades of security research. Solving the password dilemma is not his or her intention.

Re: TripleSec - Symmetric Encryption combining AES, Salsa20, and Twofish

#10

I may be wrong as I'm no security researcher, but I was under the impression that combining things like this (and rolling your own crypto in general) could potentially make things weaker. Is this the case here? Edit: Reading it more, I'm more convinced. It looks like there was a discussion a few days ago: https://news.ycombinator.com/item?id=6401057

There is no way this construction is weaker than the weakest of the three. To convince yourself of this, assume one of the ciphers is 100% broken and spits out all 0s. Then you're XOR'ing your ciphertext with all 0s (or some other known pad). So it's just a noop. As the FAQ says, because one cipher is not used as the input to another, there's no way a weakness can spread up or down the chain.

There was a discussion on twitter among cryptographers/security practitioners (search for @agl___), and in spite of some unnecessary flaming, we are almost certain now that the cipher cascade and the MAC scheme are both as strong as their strongest components.

See this publication for more information about the cipher cascade: http://rd.springer.com/article/10.1007%2FBF02620231

See this publication for more information about the HMAC construction: http://tuprints.ulb.tu-darmstadt.de/2094/1/thesis.lehmann.pd...

Post reply on HN