Fixes #22 by adding support for P-256 account keys (the default remains RSA).
Take this with a good amount of "I don't know what I'm doing here": I do not consider myself to be qualified to write cryptographic code. However, this passes both the included tests with pebble, and my bespoke integration tests with pebble through agnos. In any case, the worst we can do here is form an invalid signature, which the server will reject, I guess?
Took the liberty to do a minor refactoring, because my initial attempt to add P-256 was quite ugly; fixed a few Clippy lints while I was at it.
Fixes #22 by adding support for P-256 account keys (the default remains RSA).
Take this with a good amount of "I don't know what I'm doing here": I do not consider myself to be qualified to write cryptographic code. However, this passes both the included tests with pebble, and my bespoke integration tests with pebble through agnos. In any case, the worst we can do here is form an invalid signature, which the server will reject, I guess?
Took the liberty to do a minor refactoring, because my initial attempt to add P-256 was quite ugly; fixed a few Clippy lints while I was at it.