1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! Signer trait — uniform interface for producing a DSSE signature.
//!
//! See `docs/specs/SPEC-ATTESTATIONS.md` §6.1. A signer is handed the DSSE PAE
//! bytes by the envelope builder and returns the raw signature bytes;
//! `envelope::encode` base64-wraps them on the way into the final JSON.
//!
//! The trait deliberately says nothing about *how* a signer produces its
//! signature. Concrete implementations:
//!
//! * [`crate::signer_repo_key::RepoKeySigner`] — Ed25519 over the same
//! key the commit signer uses.
//! * [`crate::signer_external::ExternalSigner`] — length-prefixed buffa
//! `SignerFrame` protocol over stdin/stdout to a caller-supplied
//! subprocess (see `rust/crates/mkit-rpc/proto/mkit/rpc/v1/signer/signer.proto`).
//! * [`crate::signer_sigstore::SigstoreSigner`] — scaffold; returns
//! `Error::SigstoreNotImplemented`.
//!
//! Verification lives separately (see [`crate::verify`]) because the
//! verifier often has no knowledge of how the signature was produced.
use crateError;
use crateAlgorithm;
/// Dynamic-dispatch Signer. Used as a `&dyn Signer` so attest pipelines
/// can hold heterogeneous signer collections without genericising every
/// call site.
/// Convenience tuple form returned by helper builders that want to
/// surface both fields in one shot. Not used by the trait itself.