Is there at present a way to open a SSH connection using pre-existing symmetric session keys?
In other words, if I create a list of symmetric keys can I send that list to the recipient on a CD or USB key (or otherwise) and we can then connect without the use of a key exchange algorithm that generates and transmits the session key over the wire.
My once-over of RFC4253's a key exchange section indicates that some sort of key exchange is mandatory, typically but not necessarily being one of Diffie-Hellman (RFC4419), RSA (RFC 4432), or GSSAPI (RFC4462). I was wondering if anyone had ever implemented external, pre-existing session keys.
The algorithm for such a key exchange is degenerate, falling into one of at least two possible categories: one-time use or temporal.
For one-time use, the key-exchange would be the client saying
use key N where
N is the next key the client believes to be unused. If the fifth key had already been used by the server, then the exchange fails. The client can then try the
N+1. If the connection succeeds, the server then increments a next-valid-key index.
One close alternative is to use date/time-based keys, where the chosen key is based on the date and time. In this way the keys would have a predictable temporal lifespan. One could, for example, share keys for the next 5 years with 15 minute granularity – for 256 bit (32 byte) AES keys this is only ~3.5MB (3,506,400 bytes).
In any case, I would think there are folks who have done this but my searches have yielded no luck. The clear disadvantage is that the keys will have to be exchanged from time to time in another manner, but the symmetric keys need not ever be transferred over the same connection (or even medium) as the encrypted communication.
There seems to be no built-in option for this. With
OpenSSH_6.6p1, OpenSSL 1.0.1g 7 Apr 2014 on OS X/Mavericks, the kex algorithms are:
$ ssh -Q kex diffie-hellman-group1-sha1 diffie-hellman-group14-sha1 diffie-hellman-group-exchange-sha1 diffie-hellman-group-exchange-sha256 ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group1-sha1 firstname.lastname@example.org
Is SSH inherently capable, or has anyone extended it, to implement a key exchange (or no key exchange at all) of the sorts described above?