This is an announcement of a 2-week final comment period (ending March 22nd) which will be followed by a 1.0 release of the signature
crate some time thereafter.
Original 1.0 stabilization proposal here.
Current status
I've published signature
v1.0.0-pre.3, which includes significantly more documentation and clearly calls out (using doc_cfg
) the 1.0 stable versus unstable "preview" parts of the API:
Docs: https://docs.rs/signature/1.0.0-pre.3/signature/index.html
I'd love feedback on the docs before a final release, particularly what parts of the current design remain unclear.
Note that I do intend to include more usage examples, but I would like those examples to highlight notable real-world ecosystem examples rather than contrived ones, and there's a bit of a chicken-and-egg problem in doing that.
API to be stabilized
The goal of this stabilization proposal is to stabilize the following types in the signature
crate:
The remaining types (e.g. Digest*
) now require enabling off-by-default *-preview
features which call out their instability, but with a pledge that breaking changes are accompanied by a minor version bump. I've opened separate tracking issues for each of these here:
Rationale for stabilization
The four types/traits called out earlier for stabilization are sufficient for stable use of Ed25519 signatures/signers/verifiers via the ed25519
crate, which is intended to see a 1.0 release as well after a 1.0 release of this crate is published. This is the main impetus for a 1.0 release of this crate.
Current usage
The signature
traits have seen a lot of real world usage, both in libraries that natively use them, and in crates which provide thin wrappers (and therefore a unified object-safe API) across several other notable ecosystem crates:
Crates which natively leverage the signature
traits include:
Alternatives considered
NOTE: See also the "Alternatives considered" section of the signature
rustdoc.
This stabilization proposal is for a trait/object-safe API, as enumerated above. The main audience of this API is consumers of digital signature systems, and thus its design is very much optimized with that audience in mind.
Several people have proposed, and we have previously investigated, an alternative design based on generic signature types with algorithm-specific marker traits, as well as leveraging use of associated types, rather than generic type parameters on traits, to allow the usage of more concrete types. An API like this would be more beneficial to implementers of signature provider libraries, and allow less invasive first-class support of the signature
traits.
The good news is that these approaches aren't orthogonal, and several of the other crates in RustCrypto/traits
provide both an object-safe high-level API as well as an associated type-leveraging lower-level API for similar reasons. Done correctly there can be a blanket impl of the object-safe API for the provider-oriented API.
That said, the design and implementation of such an API isn't considered a blocker on a 1.0 release specifically for the reasons that it can be implemented in the future in a purely additive manner.
signature