pub struct Authenticator<UP, T>where
UP: UserPresence,{ /* private fields */ }Expand description
Trussed® app implementing a FIDO authenticator.
It implements the ctap_types::ctap1::Authenticator and ctap_types::ctap2::Authenticator traits,
which, in turn, express the interfaces defined in the CTAP specification.
The type parameter T selects a Trussed® client implementation, which
must meet the TrussedRequirements in our implementation.
NB: T should be the first parameter, UP should default to Conforming,
and probably UP shouldn’t be a generic parameter at all, at least not this kind.
Implementations§
Source§impl<UP, T> Authenticator<UP, T>where
UP: UserPresence,
T: TrussedRequirements,
impl<UP, T> Authenticator<UP, T>where
UP: UserPresence,
T: TrussedRequirements,
Trait Implementations§
Source§impl<UP, T, const N: usize> App<'static, N> for Authenticator<UP, T>where
UP: UserPresence,
T: TrussedRequirements,
impl<UP, T, const N: usize> App<'static, N> for Authenticator<UP, T>where
UP: UserPresence,
T: TrussedRequirements,
Source§fn call(
&mut self,
command: Command,
request: &[u8],
response: &mut Bytes<N>,
) -> Result<(), Error>
fn call( &mut self, command: Command, request: &[u8], response: &mut Bytes<N>, ) -> Result<(), Error>
Source§fn interrupt(&self) -> Option<&'static InterruptFlag>
fn interrupt(&self) -> Option<&'static InterruptFlag>
Source§impl<UP, T, const R: usize> App<R> for Authenticator<UP, T>where
UP: UserPresence,
T: TrussedRequirements,
impl<UP, T, const R: usize> App<R> for Authenticator<UP, T>where
UP: UserPresence,
T: TrussedRequirements,
Source§fn select(
&mut self,
interface: Interface,
_: CommandView<'_>,
reply: &mut Data<R>,
) -> Result
fn select( &mut self, interface: Interface, _: CommandView<'_>, reply: &mut Data<R>, ) -> Result
poll().Source§impl<UP, T> App for Authenticator<UP, T>where
UP: UserPresence,
impl<UP, T> App for Authenticator<UP, T>where
UP: UserPresence,
Source§impl<UP: UserPresence, T: TrussedRequirements> Authenticator for Authenticator<UP, T>
Implement ctap1::Authenticator for our Authenticator.
impl<UP: UserPresence, T: TrussedRequirements> Authenticator for Authenticator<UP, T>
Implement ctap1::Authenticator for our Authenticator.
Source§fn register(&mut self, reg: &Request<'_>) -> Result<Response>
fn register(&mut self, reg: &Request<'_>) -> Result<Response>
Register a new credential, this always uses P-256 keys.
Note that attestation is mandatory in CTAP1/U2F, so if the state is not provisioned with a key/cert, this method will fail. https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#registration-request-message---u2f_register
Also note that CTAP1 credentials should be assertable over CTAP2. I believe this is currently not the case.
Source§fn authenticate(&mut self, auth: &Request<'_>) -> Result<Response>
fn authenticate(&mut self, auth: &Request<'_>) -> Result<Response>
fn call_ctap1(&mut self, request: &Request<'_>) -> Result<Response, Status>
Source§impl<UP: UserPresence, T: TrussedRequirements> Authenticator for Authenticator<UP, T>
Implement ctap2::Authenticator for our Authenticator.
impl<UP: UserPresence, T: TrussedRequirements> Authenticator for Authenticator<UP, T>
Implement ctap2::Authenticator for our Authenticator.