pub struct CryptoProvider {
pub hash: HashProvider,
pub cert: WebPkiVerifier,
pub signer: SignerProvider,
pub signature: SignatureVerifierProvider,
}
Expand description
Cryptography provider.
§Custom Algorithms
This is the primary interface for extending cryptographic functionality. The various providers can be configured with custom algorithms and implementations.
Algorithms are uniquely identified using an 8-bit ID, eg.
HashAlgId
, half of which is reserved for the
officially supported algorithms. If you think that a new algorithm should be
added to the official set, please open an issue. Beware that other parties
may assign different algorithms to the same ID as you, and we make no effort
to mitigate this.
Fields§
§hash: HashProvider
Hash provider.
cert: WebPkiVerifier
Certificate verifier.
This is used to verify the server’s certificate chain.
The default verifier uses the Mozilla root certificates.
signer: SignerProvider
Signer provider.
This is used for signing attestations.
signature: SignatureVerifierProvider
Signature verifier provider.
This is used for verifying signatures of attestations.