Motivation
We omitted RSA signing in the initial implementation. We should support
it.
As part of this, we need to decouple the idea that we know what the
digest algorithm is based solely on the key type. There's no particular
reason not to support ECDSA with SHA256 when using a P521 key, so we
need to tolerate that as well.
Modifications
- Explicitly pass the signature algorithm to our various cryptographic
operations.
- Add a Digest type to handle the various digest types we create.
- Add tests for the various cross products.
Results
RSA signing works, as do weirder flavours of ECDSA.