IVSHPDNR6PQRZGJXJLPG2AG5GOXQLAALKD6WWBE4XYUEGAB24EHAC Here’s the corresponding intergation work https://github.com/radicle-dev/radicle-keystore/pull/18
VK5CSP727IVAYHHI7FZJLES6F4YCR3S5GDSZHVPAR5XSPINGZEVAC GNTMCGTBA3QCXVBC3AFD72CVFWLDS3N52M36ABWFLCBDQDNEYD5AC I’m also including a patch for being generic on the runtime :)
As mentioned in https://nest.pijul.com/pijul/thrussh/discussions/46, the need for a generic key in
radicle-keystore#17is only needed for the client.I explored this route by making
PublicKeyandKeyPairgeneric in theclient.rsfile. The goal was then to move that code away fromthrussh-keys. To do this, I decided to create two separate cratesthrussh-agentandthrussh-encoding. The latter is so that other packages that don’t want to rely onthrussh-keyscan use the encoding helpers defined in theencoding.rsfile.thrussh-agenthouses only theagentcode, i.e.client.rsandserver.rs. Any need for a key is handled by a set of traits defined inkey.rs. These traits are:The
thrussh-keyspackage depends onthrussh-agentto have implementations of those traits forKeyPairandPublicKey.This was the most straightforward way to separate out the logic. We had discussed privately the option of
thrussh-keysdefining traits and having packages such asthrussh-libsodiumandthrussh-openssldefine keys and implement the traits. However, this ripped through all ofthrussh-keysandthrusshand became slightly unmanageable for me to implement. I was lacking enough knowledge and confidence to make these changes without worrying about complete breakage.I do think this separation could be a good stepping stone towards that implementing the above though. Where we could eventually move the traits to
thrussh-keys,thrusshcould then be made generic over the keys and would have dependencies onthrussh-agentandthrussh-keys. Then the end-user could pick their key crate du jour. That would fit the auditing vision better too, because then the key logic is audited in each package, while the protocol logic is done viathrussh-agentandthrussh.I’ll submit the patches once I’ve cleaned up the messages :) I’ll also be submitted a draft patch to
radicle-keystoreshowing the signing example working there.