Support custom signing routines in SignaturePrivateKey#424
Support custom signing routines in SignaturePrivateKey#424rcombs wants to merge 1 commit intocisco:mainfrom
Conversation
This enables support for signing with non-extractable private keys (e.g. TPM-bound).
|
Hi @rcombs, thanks for submitting this. Just to confirm I understand the architecture correctly:
I would prefer to handle this a little more systematically, in the sense of not having an alternative path for functions like this as opposed to other keys. For example, we could have signing always be a function, and supply a default function when constructing a key from bytes. In line with #425, it would also be good to push most of the complexity here into the Given those considerations, how about an approach something like the following:
From the caller's perspective, you would just from The main drawback that occurs to me is that we end up exposing what are currently some internal interfaces. But we're going to have to expose that sort of thing anyway if we're going to allow this sort of runtime adaptation. |
|
Your understanding is correct, yes. I considered having all keys use a I went with this route largely to try to keep the API change as small as possible (this doesn't introduce any API incompatibility with existing code). The API-wise, I think the change proposed here should be compatible with any future architecture change moving more of the implementation down into the |
This enables support for signing with non-extractable private keys (e.g. TPM-bound).