160-bit key limit



From PuTTy's SSH.c:

/*
* Work out the number of bits of key we will need from the key
* exchange. We start with the maximum key length of either
* cipher...
*/
{
int csbits, scbits;

csbits = s->cscipher_tobe->keylen;
scbits = s->sccipher_tobe->keylen;
s->nbits = (csbits > scbits ? csbits : scbits);
}
/* The keys only have 160-bit entropy, since they're based on
* a SHA-1 hash. So cap the key size at 160 bits. */
if (s->nbits > 160)
s->nbits = 160;

I thought that the maximum key size was whatever the modulo for the
diffie-hellman key exchange was. If you're using diffie-hellman-
group1-sha1, that'd be 1024 bits. I don't see where SHA-1 factors
into it. Diffie-hellman cetainly doesn't use SHA-1. The exchange
hash does but the exchange hash doesn't have anything to do choosing
the key - it just provides a signature that can be used to verify a
servers identity.

.



Relevant Pages