10 ms·
Obviously it matters. Yes, there are other important, even more important, choices when choosing a scheme, this is just attempting to address a single choice yo
by Someone1234 10y ago
Obviously it matters. Yes, there are other important, even more important, choices when choosing a scheme, this is just attempting to address a single choice you may have to make.
Saying it "does not matter" is unhelpful hyperbole that isn't explained.
- tptacek 10y agoNo, with proper choices of algorithms, key size is literally irrelevant; without it, your problems are so big that key size is again irrelevant. Counterexamples welcome.
- Someone1234 10y agoA key size of 1 bit.
- tptacek 10y agoNo secure algorithm is defined at that key size. There is no straightforward way to arrive at, say, 64 bit AES. Key size is not simply a dial you can turn everywhere.
- Someone1234 10y agoYou said "key size is literally irrelevant," if it is "literally irrelevant" and you weren't just being hyperbolic then 1 bit should be sufficient. You can definitely implement most algorithms to take in a 1 bit or 1 byte key, padding for one, just because it isn't widely supported doesn't change that fact. So when you say something is "literally irrelevant" and ask for counterexamples, don't be surprised when someone gives them to you. Obviously a 1 bit or 1 byte key is absurd. But so is claiming that key length is "literally irrelevant" and "does not matter."
- tptacek 10y agoNot interested in this particular semantic debate, sorry.
- deleted 10y ago[deleted]
- zeveb 10y ago> There is no straightforward way to arrive at, say, 64 bit AES. Sure there is: zero-pad to 128, 192 or 256 bits. That'd be horribly, terribly broken, but it would be 64-bit AES. Horrible, terrible 64-bit AES, but AES nonetheless.
- tptacek 10y agoI wrote "no straightforward way" in anticipation of someone coming up with some bizarre way to adapt AES to a small key size. If we all just stipulate that we understand how block ciphers work, we don't have to waste time in blind alleys like this.
- devishard 10y ago> No secure algorithm is defined at that key size. HMAC-SHA256 is.
- geofft 10y agoCan you explain what you mean by "proper choices of algorithms"? WeakDH was an attack that was entirely about poor choices of key size and (to my knowledge) entirely remediable by better choices of key size. It's true that it could have also been solved by switching to a different algorithm, but for many of the affected servers, key size was easy to change and the different algorithm was not available.
- tptacek 10y agoDon't ever use conventional Diffie-Hellman. You'd have problems even with reasonable key sizes.
- tveita 10y agoHMAC-SHA256 is a secure and conservative choice for almost any application, but allows a variable key size. I'm sure I've seen deployments with a 0 bit key. Most algorithms in use happen to be defined only for a 128 bit symmetric key or above, which is also the currently recommended key length, but that is incidental. There is no fundamental truth in your quote, it has been wrong in the past, and it will be wrong in the future.
- tptacek 10y agoSHA-2 is a great example of what I'm talking about. The best SHA-2's to use don't have the highest output size. w/r/t/ variable-sized HMAC key sizes: you don't need to "select" a key size, so much as you want it ideally to be harmonized with the key size of your cipher. Since you're going to use AES-128 anyways, this isn't a tricky decision.
- tveita 10y agoYou said key size does not matter. This post doesn't seem to relate to that at all.
- dsacco 10y agoThat's not really fair to say. The HMAC RFC[1] explicitly discourages key sizes of less than L bytes, which in context is about 128 bits. Variable key sizes can be chosen, sure, but it's not exactly a feature if there is an implicit lower bound. I would say it is a fault of the HMAC construction that any key size can be selected, not a fault of using a key size HMAC is not designed for. An improvement would be explicitly defined key sizes that are compatible with other algorithms in an entire cryptosystem. If HMAC were to be built from scratch today, it would probably be better to have explicitly defined key sizes instead of variable key sizes. I know this might come across as obtuse or stubborn, but if you read the other comment I made in this thread I think it might clarify my point. [1]: https://tools.ietf.org/html/rfc2104#section-3 https://tools.ietf.org/html/rfc2104#section-3
- tveita 10y ago
- schoen 10y agoRSA-1024? Still in use in many applications, considered extremely vulnerable. Are you going to suggest that RSA itself is an improper algorithmic choice, in favor of elliptic curves? That option wasn't necessarily available to all users when some of these RSA deployments happened. Edit: I see that you addressed this point elsewhere in this thread.
- tptacek 10y agoYes, that is what I'm saying.
- schoen 10y agoI think you have a strong point that I hadn't considered in exactly these terms before. But (for example following your discussion with geofft) I'd suggest that it would best be qualified with "if you don't have backwards-compatibility considerations", since a lot of people continuing to use mechanisms that provide a flexible keylength parameter do have these considerations.