To give you the best experience, this site uses cookies. Continuing to use 9bis.net means you agree to our use of cookies.
 

English version Russian version Version française Nederlandse versie Versión española Version portuguese Version polonaise Italian version Versiunea româna   KiTTY News

KiTTY : Forum

Last modification : -

KiTTY web site




Forum Home
 

modifying kitty to include the symmetric key in the logs

yawnmoth - Sat 07/02/2009 16:58:53 CET +0100

I'm trying to modify kitty to include the symmetric key in the logs
and had a few questions about it.

In ssh.c, there's this:

ssh->sccipher->setkey(ssh->sc_cipher_ctc, keyspace);

I added, after that, this:

logevent("key is:");
logevent((char *)keyspace);

I then compile kitty and, in the logs, see something like this:

??\? w A?#???J 1 ??J?f ?$??r??az?X?)
L????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????@
?

Since, according to the Event log,AES-256 is being used, it's a 32
byte long string that ought to be output - not a string as long as the
one that is being output.

I also tried logevent(keyspace) since that's what's done for the host
key fingerprint:

     if (!s->got_session_id) { /* don't bother logging this in
rekeys */
     logevent("Host key fingerprint is:");
     logevent(s->fingerprint);
     }

That yielded almost exactly the same thing, though, as logevent(char *)
keyspace), though. Instead of 1 it was %1, but, aside from that,
logevent(keyspace) and logevent((char *)keyspace) returned almost the
exact same things. Ideally, I'd like it to be displayed in the same
format as the Host key fingerprint is.

Any ideas?




Answer


The forum is actually closed